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:
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:
This shows: - TgCaller version - Python version and platform details - Dependency status (required and optional) - System architecture information
Diagnostics
Run comprehensive diagnostic checks:
Provides: - Complete system analysis - Missing dependency detection - Installation recommendations - Performance insights
Show Examples
Display usage examples and code snippets:
Help and Version
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
Quick System Check
Troubleshooting
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:
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.