@koodosbots/kprcli
Version:
KprCli - Global CLI automation client for Telegram bot integration
138 lines (103 loc) ⢠3.62 kB
Markdown
# KprCli - Telegram Bot Automation Client
[](https://www.npmjs.com/package/@kprcli/client)
[](https://nodejs.org/)
Global CLI client for connecting your computer to a Telegram bot for automation tasks.
## š Quick Install
```bash
npm install -g @kprcli/client
```
That's it! Now you can use `kprcli` anywhere.
## š± Usage
### 1. Link Your Device
```bash
kprcli login
```
- Go to your Telegram bot and run `/link`
- Copy the 6-digit code
- Enter it when prompted
### 2. Start Automation
```bash
kprcli start
```
Your device is now ready to execute automation tasks from Telegram!
### 3. Check Status
```bash
kprcli status # View device info
kprcli help # Show all commands
```
## šÆ How It Works
1. **Install globally** - Available as `kprcli` command everywhere
2. **Link to Telegram** - Authenticate with your bot using a secure code
3. **Auto-execute tasks** - Your CLI polls for jobs and executes them
4. **Real-time feedback** - Results sent back to Telegram instantly
## š Commands
| Command | Description |
|---------|-------------|
| `kprcli login` | Link device to Telegram bot |
| `kprcli start` | Start automation agent |
| `kprcli status` | Show device status |
| `kprcli help` | Show help information |
## š§ Requirements
- **Node.js 18+** (includes npm)
- **Internet connection**
- **Telegram bot** with KprCli integration
## š Features
- ā
**Zero dependencies** - Pure Node.js, no external packages
- ā
**Global installation** - Use `kprcli` from anywhere
- ā
**Secure authentication** - 6-digit codes with expiration
- ā
**Real-time polling** - Checks for jobs every 5 seconds
- ā
**Graceful shutdown** - Press Ctrl+C to stop
- ā
**Cross-platform** - Works on Windows, Mac, Linux
- ā
**Auto-save credentials** - Remembers your login
## š Security
- Auth codes expire in 10 minutes
- Credentials saved locally in `.kprcli-config`
- No sensitive data transmitted
- Device linking required per machine
## š Example Session
```bash
$ kprcli login
š¤ KprCli Login
===============
1. Go to your Telegram bot and run /link
2. Copy the 6-digit code from Telegram
Enter authentication code: ABC123
š Authenticating with code: ABC123
ā
Device authenticated successfully!
š± Device ID: 12345678-abcd-efgh...
š¾ Credentials saved to .kprcli-config
$ kprcli start
š KprCli Agent Starting...
š± Device: 12345678...
š Polling for jobs every 5 seconds
Press Ctrl+C to stop
š¬ Found 1 job(s):
⢠Job ID: task-456
⢠Task: form_fill
⢠Status: pending
ā” Executing job: task-456...
ā
Job task-456... completed successfully
```
## š Troubleshooting
### "Command not found: kprcli"
```bash
# Reinstall globally
npm uninstall -g @kprcli/client
npm install -g @kprcli/client
```
### "Authentication failed"
- Make sure you copied the exact 6-digit code from Telegram
- Codes expire in 10 minutes - get a fresh one with `/link`
- Check that your bot is running and accessible
### "Connection error"
- Verify your bot server is running on the correct port
- Check firewall settings
- Ensure you have internet connectivity
## š License
MIT License - see [LICENSE](LICENSE) file for details.
## š¤ Support
- š Report bugs: [GitHub Issues](https://github.com/yourusername/kprcli/issues)
- š¬ Ask questions: [Telegram Support](https://t.me/kprcli_support)
- š Documentation: [Wiki](https://github.com/yourusername/kprcli/wiki)
---
**Made with ā¤ļø by the KprCli Team**