Skip to content

TgCaller CLI

The TgCaller Command Line Interface provides powerful tools for testing, diagnostics, and managing your TgCaller installations.

Installation

The CLI is automatically installed with TgCaller:

pip install tgcaller

Available Commands

Test Installation

Test your TgCaller installation and verify all components are working:

# Basic test
tgcaller test

# Test with API credentials
tgcaller test --api-id 12345 --api-hash "your_api_hash"

Expected Output:

๐Ÿงช Testing TgCaller installation...
โœ… Pyrogram imported successfully
โœ… TgCaller types imported successfully
๐ŸŽ‰ TgCaller installation test completed successfully!

System Information

Display detailed system information and dependency status:

tgcaller info

This shows: - TgCaller version - Python version and platform details - Dependency status (required and optional) - System architecture information

Diagnostics

Run comprehensive diagnostic checks:

tgcaller diagnose

Provides: - Complete system analysis - Missing dependency detection - Installation recommendations - Performance insights

Show Examples

Display usage examples and code snippets:

tgcaller examples

Help and Version

# Show help
tgcaller --help

# Show version
tgcaller --version

# Show links
tgcaller links

CLI Options

Global Options

  • --version - Show TgCaller version
  • --no-banner - Don't show the ASCII banner
  • --help - Show help information

Test Command Options

  • --api-id - Your Telegram API ID
  • --api-hash - Your Telegram API Hash

Examples

Complete Installation Test

# Test everything with your credentials
tgcaller test --api-id 12345 --api-hash "abcdef123456"

Quick System Check

# Check if all dependencies are installed
tgcaller info

Troubleshooting

# Run full diagnostics
tgcaller diagnose

Troubleshooting CLI Issues

Command Not Found

If tgcaller command is not found:

# Install with user flag
pip install --user tgcaller

# Or use python module
python -m tgcaller.cli --help

Permission Errors

On some systems, you might need:

# Use sudo (Linux/Mac)
sudo pip install tgcaller

# Or install in user directory
pip install --user tgcaller

Missing Dependencies

The CLI will show which dependencies are missing:

tgcaller diagnose

Follow the recommendations to install missing components.

Advanced Usage

Scripting

You can use the CLI in scripts:

#!/bin/bash

# Check if TgCaller is properly installed
if tgcaller test --no-banner; then
    echo "TgCaller is ready!"
    python my_bot.py
else
    echo "TgCaller installation issues detected"
    exit 1
fi

CI/CD Integration

Use in continuous integration:

# GitHub Actions example
- name: Test TgCaller
  run: |
    pip install tgcaller
    tgcaller test --no-banner

The CLI provides comprehensive tools for managing your TgCaller development workflow efficiently.