Introducing Kite CLI (Beta)– Kite in your terminal

It is an official, open-source terminal app and command-line interface for Kite, built in Rust for macOS, Linux, and Windows. If you spend most of your day in the terminal, you can now track live markets, analyse charts and option chains, and manage orders, GTTs, and alerts without leaving your keyboard. You can use it as a full-screen Terminal UI (TUI) or run subcommands directly from your shell and scripts.

It works out of the box with your regular Zerodha Kite login.

What is Kite CLI?

Kite CLI is built as an interactive Terminal User Interface (TUI) optimised for high performance and minimal resource overhead. It lets you monitor tickers, analyse charts, and manage orders using dedicated keyboard shortcuts.

Core Highlights:

  • Fast and lightweight: Runs natively in your terminal with minimal CPU and memory usage. Mouse support (clicking tabs, rows, and dragging pane borders) works alongside full keyboard navigation.
  • Live streaming: Streams real-time market ticks, 5-level market depth, live P&L on positions and holdings, and instant order status updates over WebSockets.
  • Synced with Kite: Watchlists, orders, GTTs, and price alerts stay in sync with Kite Web and the Kite mobile app.
  • Charts and indicators: View candlestick charts (1m, 5m, 15m, 1h, 1D) with volume bars and built-in overlays and indicators (SMA, EMA, Bollinger Bands, RSI, and MACD).
  • Command palette and local notes: Press : to place quick orders (buy NSE:INFY 10 @ 1520), switch watchlists, or jump across panes. Press n to open a local scratchpad for trade notes tagged to specific instruments.
  • Customisable layout and themes: Resize or zoom panes (z), and press T to switch between 22 built-in colour themes (including Dracula, Catppuccin, Gruvbox, Tokyo Night, and Solarized) or configure your own palette.
  • Scriptable CLI: Query quotes, historical candles, portfolio data, margins, and mutual funds from standard UNIX pipelines with --json output.
  • Safe by default: Every order, GTT, or position conversion in the TUI goes through a review screen showing a live margin and charges breakdown before submission. In the CLI, all write commands run in dry-run mode unless you pass --confirm.

Exploring the Workspaces

The TUI is organised into six workspaces. Switch between them instantly using number keys 1 through 6.

1 Overview

A read-only snapshot of your account: portfolio value, day P&L, total P&L, and available funds. It also shows snapshots of your Positions and Holdings, watchlist indices, and top NSE gainers and losers (press u to cycle between Nifty 50, Nifty 100, Nifty 500, and F&O stocks).

2 Trading

Your primary trading screen. It combines your synced Kite watchlists on the left with interactive candlestick charts, 5-level market depth (with upper/lower circuit limits and day range), and a live order book on the right.

3 Portfolio

Tracks open and closed Positions, equity Holdings, Mutual Funds, and equity/commodity Funds & Margins in a four-pane layout.

4 Option Chain

Displays strikes, CALL and PUT open interest (OI), LTP, change percentages, and an integrated real-time chart of the underlying spot instrument. You can browse strikes directly and trigger buy/sell orders.

5 Orders

A multi-pane view to inspect executed/open Orders, monitor GTT Triggers (including active trailing stop-loss triggers), and toggle Kite Alerts.

6 IPO & Bids

Browse IPO, Govt. securities, Auctions, Corporate actions, and SSE IPO. Review instrument details, dates, price ranges, lot quantities, and track or place your applications.

Using the Scriptable CLI

Alongside the full-screen UI, kite provides subcommands for scripts, and quick terminal checks.

Bash

kite auth login                                 # Sign in from the shell (use `kite doctor` to verify)
kite market quote NSE:INFY                      # Live quote and 5-level market depth
kite portfolio holdings                         # Demat holdings and P&L
kite portfolio positions                        # Net and day positions
kite orders list                                # Today's order book
kite user margins                               # Available and utilised funds
kite alerts list                                # Active server-side price alerts
kite mf holdings                                # Mutual fund holdings (plus `orders` and `sips`)
kite stream ticks --token 256265 --limit 5       # Stream live WebSocket ticks

Pass --json to any command for machine-readable output.

Web Handoff for Security & Verification

Certain actions require Kite web in your default browser for verification and security reasons. When you initiate any of the following actions, Kite CLI opens Kite web automatically:

  • Authorising delivery holdings: When you press a in the 3 Portfolio workspace, Kite CLI opens Kite web to complete your CDSL T-PIN authorisation.
  • Applying for IPOs and Bids: Pressing Enter on an IPO, government security, auction, or corporate action opens Kite web so you can submit your bid.

How to Install & Get Started

Kite CLI supports macOS, Linux, and Windows.

1. Installation

macOS and Linux (x86_64 and aarch64 / Apple Silicon):

Bash

curl -fsSL https://raw.githubusercontent.com/zerodha/kite-cli/main/scripts/install.sh | sh

Windows (x86_64 via PowerShell):

PowerShell

irm https://raw.githubusercontent.com/zerodha/kite-cli/main/scripts/install.ps1 | iex

2. Launching & Setup

Once installed, start the client:

Bash

kite

On initial launch, follow the standard terminal prompt to authenticate your Zerodha account securely via 2FA/TOTP.

3. Logging Out & Exiting

  • Quit the UI: Press q or Ctrl+C. Your session stays active until daily token expiry so you can relaunch quickly.
  • Log out completely: Press Ctrl+K inside the TUI and select Log out, or run kite auth logout from your shell to revoke the session token.

Essential Keyboard Shortcuts

Shortcut Description
1 – 6 Switch tabs (1 Overview, 2 Trading, 3 Portfolio, 4 Option Chain, 5 Orders, 6 IPO & Bids)
j / k Navigate / move selection up / down
b / s Buy / Sell
g GTT
a Alert (or Authorise in Portfolio)
Enter Open item in Kite web (in 6 IPO & Bids)
c Chart
Tab Cycle active pane
r Refresh
T Theme switch
Ctrl + K Commands / Palette
? Help
q Quit

Kite CLI is open source under the MIT License and powered by kiteconnect-rs GitHub - zerodha/kiteconnect-rs: The official Rust client library for the Kite Connect trading APIs · GitHub , our standalone Rust client for the Kite Connect v3 API.

Try it out and share your feedback, shortcut requests, or bug reports in the comments below or on GitHub Issues!

17 Likes

Whooaa.., dis is so cool man

2 Likes

closed position symbol and PNL color, add greyish tint

If this kite CLI is used for automation of trading does it come under the algo trading domain?

Thank you for the feedback; we’ve noted your suggestions and will implement the necessary changes.

See change percentage, it is showing option LTP change not position change.

Thanks for flagging this! The column is currently showing the day’s change instead of the change based on your average price. We’ve logged this and will address it in an upcoming patch.

2 Likes

Building this natively in Rust instead of wrapping Python or Electron is a fantastic architectural decision. Eliminating garbage collection pauses during peak market volatility and keeping binary size and cold-start latency negligible is exactly what a terminal trading utility needs.

A few practical observations and feature suggestions from a CLI/TUI systems perspective:

  1. Structured Output for Shell Pipelining (–output json / NDJSON):
    While the Ratatui TUI mode is great for visual monitoring, the real superpower of a CLI is composability. Having a clean --output json flag across all subcommands (e.g. kite orders list --output json, kite positions --output json) enables seamless piping into tools like jq, fzf, or custom risk-monitoring scripts without brittle regex screen scraping.

  2. Secure Credential Storage:
    Ensure the CLI integrates with OS-level credential vaults (via Rust’s keyring crate for Secret Service on Linux, macOS Keychain, and Windows Credential Manager) rather than leaving persistent access tokens stored in plaintext in ~/.config/kite/config.toml.

  3. Ticker Backpressure & Decoupled Rendering:
    During heavy market moves (e.g. weekly expiry opening bells), tick volume can spike rapidly. Keeping the WebSocket ingestion pipeline on a dedicated tokio task decoupled from the terminal drawing loop via bounded MPSC channels prevents frame render latency from delaying order dispatch or market state updates.

Kudos to the Zerodha tech team for shipping this—looking forward to testing the beta builds on Linux!

3 Likes

I just have to use keyboard UP and DOWN arrow keys and chart automatically changing for selected scrip on left side. really useful feature :clap:

4 Likes

How to open chart? c just opens conversion screen. Could you provide a better target like Enter or Space?

Building Kite CLI in Rust is an exceptional technical choice. For terminal power users, developers, and systematic traders, the memory safety and predictable latency of compiled Rust make it ideal for low-overhead market monitoring.

A few architectural suggestions from a systems engineering perspective:

  1. Zero-Copy Binary Parsing on WebSocket Ticker:
    The KiteConnect binary WebSocket protocol emits fixed-length byte packets (8-byte LTP, 28-byte Quote, 44-byte Full quote with depth) encoded in big-endian integers. Using zero-copy parsing crates like zerocopy or nom allows mapping raw byte buffers directly to POD structs without intermediate heap allocations, ensuring sub-microsecond tick processing even on rapid multi-quote updates.

  2. Decoupled Tokio Channel Topology for TUI Redraws:
    If the TUI is built on ratatui / crossterm, separating the WebSocket ingestion loop from the UI rendering thread via a bounded tokio::sync::mpsc or crossbeam-channel is essential. Decoupling ensures that terminal resize events or terminal frame rendering (e.g. locked at 30fps) do not introduce backpressure jitter into the network socket buffer.

  3. Secure Credential Storage (Platform Keyring):
    Rather than writing access tokens or API secrets to plaintext ~/.config/kite/config.toml files, integrating the keyring crate to interface with OS credential managers (FreeDesktop Secret Service on Linux, Apple Keychain on macOS, and Windows Credential Manager) would safeguard session tokens from malicious scripts scanning dotfiles.

  4. Headless / Unix Pipeline Support (--json and --csv flags):
    Allowing commands like kite positions --json or kite orders --watch to emit NDJSON or raw text enables seamless integration with standard Unix utilities (jq, awk, cron jobs, or notification daemons).

Kudos to the Zerodha tech team for shipping native terminal tooling!

3 Likes

I noticed that some of the numbers are not displaying correctly

The option to open a chart from the Position window is not currently available. However, we’ve noted your feedback and will address it in an upcoming patch.

Please note that you can use the shortcut to open a chart from the Orders and Holdings tabs.

1 Like

Thank you for highlighting this. We’re looking into it and will get it sorted out.

@Suny_Banerjee Hi, In chart if i go to search instrument/symbols i need to add it to watchlist then only chart will appear… what if i dont want to add it to watchlist just want to see the chart??

This is great. Please mention how to upgrade to successive versions. Interested in Windows OS.

Can we run kite mobile, kite web and this kite cli all at the same time?

Do we need kite api subscription and static ip registered to use this cli tool?

Two kite cli does not seem to be supported, but one of each seem to be supported

No

2 Likes

All of @NorthByte 's points should be considered seriously.

Are bug reports, pull requests etc welcome in github?

I am not much of a programmer. But could help in minor things.

It would be really nice to have multiple windows running kite cli. If this is made possible, then each window need not to squeeze multiple items (watch list, positions, chart etc) in single window.

1 Like