Interactive Brokers is an incredibly powerful platform, but using their official desktop client (TWS) feels like a punishment. It's a massive, resource-heavy Java app from the late 90s that makes simple workflows incredibly tedious.
I got tired of clicking through archaic menus, so I built ibkr-cli: a local-first, modern command-line interface to bypass the TWS UI entirely.
But a terminal wasn't the endgame. By turning trading actions into simple terminal commands with structured JSON outputs, it essentially acts as the perfect "pair of hands" for AI agents to interact with your portfolio directly.
Instead of fighting the GUI, you can now manage your trading through agents: - *Claude Code*: Just run `npx skills add fatwang2/ibkr-cli`. Once installed, you can literally tell Claude: "Check my IBKR account, what's my current PnL, and prepare an order to buy 10 shares of AAPL." - *OpenClaw (ChatOps)*: Hook it up to Telegram or Discord, and turn your bot into a personal, conversational trading assistant.
To answer the obvious question—"Is it safe to let an LLM near my brokerage account?"—I built it with a strict Safety-First design. All order commands default to a safe `--preview` (what-if) mode. A real trade will only execute if the agent or user explicitly appends the `--submit` flag.
It handles local profile management (TWS/IB Gateway), TCP connectivity checks, portfolio queries, and market data snapshots out of the box.
If you share the pain of using IBKR's default UI, or if you're experimenting with letting LLMs manage your trades, I'd love for you to try this out and let me know what you think!
fatwang2•1h ago
I realized the real motivation wasn't just taming the API, but avoiding the TWS desktop client at all costs. If you've ever felt the pain of navigating that 1998 Java interface just to check your PnL or place a simple trade, you know exactly why I wanted to replace it entirely with a CLI and AI agents.
I'm around to answer any questions, especially about the local TWS/Gateway setup or piping this into your AI agent workflows.
May your code compile on the first try, your agents never hallucinate a margin call, and your 2026 PnL stay safely in the green!