Kite Connect CLI — Multi-account Zerodha trading positions viewer
Project description
Kite Connect CLI (kitecli)
A multi-account Zerodha Kite Connect trading positions viewer with a beautiful interactive terminal user interface (TUI).
╦╔═╔═╗╦ ╦
╠╩╗║ ║ ║
╩ ╩╚═╝╩═╝╩
Kite Connect CLI
Key Features
- 🔒 Local-Only Architecture: No server layer, no database, no cloud deployment. Your Zerodha API credentials and session tokens stay strictly on your local machine.
- 👥 Multi-Account: View and manage open positions and order books from multiple Zerodha accounts in a single consolidated screen.
- ⚡ Parallelized Requests: All network calls (positions, orders, initialization) are executed concurrently in a thread pool, keeping updates extremely fast and fluid.
- 🔑 Auto-Login: Session tokens are cached securely in
~/.kcli/sessions.json. Using your credentials (user_id,password,totp_secret),kcliautomatically handles authentication and daily OTP generation in the background. - 🌐 Proxy Routing: Map different HTTP/HTTPS proxies to each account individually to comply with Zerodha API connection requirements.
- 📊 Interactive TUI Dashboard: Launch the live dashboard to view:
- Consolidated active positions with soft-color styling.
- Live indices panel (NIFTY 50, SENSEX, and INDIA VIX).
- Info Pane to view Pending Orders, Executed Orders, or Option Chains (
F1,F2,F3). - Active logs with color-coded alerts and focus highlights for simple navigation.
Installation
Install the package via pip:
pip install kitecli
(For local development or installing from source):
git clone https://github.com/vgolugur/kitecli.git
cd kitecli
pip install -e .
Quick Start
1. Initialize Configuration
Create a default configuration template:
kcli config --init
This generates a config file at ~/.kcli/config.yaml.
2. Configure Accounts
Open ~/.kcli/config.yaml in your text editor and add your accounts. Include your login credentials and TOTP secrets to enable auto-login:
accounts:
- name: "Account 1"
api_key: "your_api_key_1"
api_secret: "your_api_secret_1"
user_id: "your_zerodha_user_id_1"
password: "your_zerodha_password_1"
totp_secret: "your_totp_secret_1"
proxy: "http://username:password@ip:port" # Optional per-account proxy
3. Log In & Authenticate
Authenticate and start your sessions (auto-login will run in the background for accounts with complete credentials):
kcli init
4. Run commands
- Interactive Dashboard:
kcli live - Positions Snapshot:
kcli positions - Status Check:
kcli status
CLI Command Reference
| Command | Description |
|---|---|
kcli live |
Launch the interactive live TUI dashboard |
kcli init |
Initialize and authenticate account sessions |
kcli positions |
Print a quick snapshot of active positions |
kcli status |
Check authentication status of configured accounts |
kcli config --init |
Generate a default configuration file |
kcli config --show |
Display current configuration (secrets masked) |
kcli config --path |
Print the configuration file path |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kitecli-0.1.0b2.tar.gz.
File metadata
- Download URL: kitecli-0.1.0b2.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8ebc2938c20af489d4469de837e28a6c4e974e1ce1f4a8bcd3cffc5b6b8616a
|
|
| MD5 |
59a4618b57cd9b2cfa9156407269829e
|
|
| BLAKE2b-256 |
efa1f73165581a514bf67fbc565649d381885116be952e70ae431bc513d47ea0
|
File details
Details for the file kitecli-0.1.0b2-py3-none-any.whl.
File metadata
- Download URL: kitecli-0.1.0b2-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fbf6fa9b25a220affc48b6aa03ded526564f5d711057052edbbfd2fba26b053
|
|
| MD5 |
163f4201a1c3b2e28b7cb266f9b5e4e9
|
|
| BLAKE2b-256 |
7435f0304b166a55a23783d2f645fd1f8fe806e07f123da12d37abe8ac36a01c
|