Feature
TradingLead Commands for AI Agents
TradingLead exposes a documented command layer that AI assistants such as GitHub Copilot or Claude Code call through the tradinglead CLI in TradingLead Desktop. The public command index lists 210 canonical commands, 59 compatibility aliases and 67 native Desktop controls, each owned by one of 14 public skills. Commands cover charts, drawings, watchlists, screening, alerts, indicators, backtesting, optimization, paper trading and research pages. There are no live broker orders.
What the command layer is
TradingLead's chart workspace registers a catalog of named commands, such as chart.open, screening.run or backtesting.run. TradingLead Desktop carries those commands from a local terminal to the open chart tab. Your AI assistant runs the bundled tradinglead command-line tool. GitHub Copilot CLI, Claude Code or any agent that can run shell commands will work. The tool sends a command to the tab and returns the app's JSON answer.
The commands call the same controllers as the visible buttons, so every change shows up in your chart. TradingLead does not supply the AI model. It supplies the commands and 14 public skills that explain how to use them. The skills are published at github.com/Shubham-vish/tradinglead-skills. For the setup steps, see control TradingLead with AI. For ready-made requests, see the AI prompt cookbook.
How big the command surface is
The public COMMANDS.md index states: 210 canonical commands, 59 compatibility aliases and 67 native Desktop controls.
- Canonical commands are frontend product commands such as
drawings.createoralerts.update. - Compatibility aliases are older names that run the canonical command with the same validation and retry identity. Most are
simulation.*spellings ofbacktesting.*, plus legacybacktesting.research*names for the optimizer. - Native Desktop controls belong to the app shell rather than the website. Examples are
status,screenshot,ui-click,ui-run,record-startanddemo-browser-open. These drive clicks, typing and recording; see AI demo recording.
The index is generated from a frontend source snapshot. It records which skill owns each command, whether a retry key is required, and the command's effects.
Commands by skill
Every command has exactly one owning skill. Assistants start with tl-desktop and load the one skill that owns the requested outcome.
| Skill | What it covers | Representative commands |
|---|---|---|
| tl-desktop | Connection, tabs, panels, theme, activity, native input and recording | workspace.getState, workspace.openSidebar, workspace.setPanel, workspace.getActivity, ui.waitIdle, demo.prepare |
| tl-charts | Symbol, feed and interval, view, Compare, built-in studies, drawings, layouts, Chart Grid, native replay | chart.open, chart.getState, chart.setView, chart.compare, chart.snapshot, studies.apply, drawings.create, drawings.update, studyTemplates.manage, layout.set, layout.saved, grid.open, chart.replayControl |
| tl-markets | Watchlists, symbol details, peers, indices, heatmap, Market Intelligence, Futures, raw candles | watchlists.getRows, watchlists.create, watchlists.addSymbols, watchlists.manage, symbol.details, peers.get, heatmap.configure, futures.getReport, marketData.getBars |
| tl-alerts | Saved price alerts and trigger history | alerts.list, alerts.create, alerts.update, alerts.setEnabled, alerts.delete, alerts.activity |
| tl-screening | Scan sidebar, results grid, refinement, history, saved screeners, local broker scans | screening.catalog, screening.configure, screening.run, screening.getResults, screening.refine, screening.save, screening.listHistory, providerScreener.run |
| tl-patterns | Historical Patterns: one ticker across weekdays and IST time windows | patterns.configure, patterns.run, patterns.getResults, patterns.openOccurrence |
| tl-research | Saved HTML research reports in the right sidebar | research.create, research.update, research.list, research.show |
| tl-tlscript | TLScript-Pine indicator authoring and chart instances | indicators.listCapabilities, indicators.validate, indicators.save, indicators.apply, indicators.update, indicators.setSettings |
| tl-python | Python indicator authoring, source history and chart instances | pythonIndicators.capabilities, pythonIndicators.validate, pythonIndicators.save, pythonIndicators.apply, pythonIndicators.history, pythonIndicators.restore |
| tl-backtesting | Python and Pine backtests, applied strategies, saved runs, presets, comparison, export | backtesting.capabilities, backtesting.run, backtesting.get, backtesting.compare, backtesting.export, backtesting.applyStrategy, backtesting.librarySave |
| tl-strategy-optimization | Strategy Optimizer sweeps, holdout, walk-forward, reports | backtesting.optimizePreview, backtesting.optimize, backtesting.optimizeRerun, backtesting.optimizeReport |
| tl-paper-trading | Replay practice, backtest-derived replay, forward paper and simulated orders | backtesting.practice, backtesting.replay, backtesting.forward, backtesting.step, backtesting.order, backtesting.protect, backtesting.close |
| tl-strategy-research | Deprecated router to tl-strategy-optimization | none of its own |
| tl-testing | Agent-run YAML test suites of real commands | none of its own |
Historical Patterns studies dated weekday and time-of-day windows for one ticker. It is not automatic chart-pattern detection. Feature details live on the chart, drawing tools, screener, alerts, Pine Script, Python indicators, backtesting, strategy optimizer, paper trading and bar replay pages.
How discovery works
An assistant should never guess a command. The documented order is:
tradinglead agent-guide: the bundled workflow guide.tradinglead skills listandtradinglead skills read NAME --file DOCUMENT: the 14 skills and their command references.tradinglead skills statusreports the active bundle version and its compatibility.tradinglead tabs: the open TradingLead tabs. The assistant passes--tabexplicitly, even when only one tab is open.tradinglead capabilities --tab ID: the live catalog for that tab, which is the authoritative list. Domain discovery commands such asbacktesting.capabilities,indicators.listCapabilitiesorscreening.catalogfollow.tradinglead exec chart.getState --tab IDandworkspace.getState: the current account, symbol, feed and interval before anything changes.
Native controls are listed separately by tradinglead desktop capabilities. A compatible skill bundle does not prove that every command works on every page. The website and Desktop app update separately.
Effects and retry keys in plain language
Each command declares effects. They describe what it might do, not which permission it needs:
| Effect | Meaning |
|---|---|
none | A local, observational read |
navigate | Can change the chart's symbol, interval, pane or date |
panel | Opens or changes a visible panel or sidebar |
ui | Presentation-only demo changes |
quota | Can use account or provider allowance, as scans and history loads do |
network | Contacts TradingLead or provider services |
code | Compiles or runs indicator or strategy code |
write | Changes saved or app state |
mutates:false does not mean "no side effects". For example, screening.run is not a write, but it still uses scan allowance and opens the Scan panel.
Commands marked as mutating need a retry key. This is a unique operation name of 1 to 80 letters, numbers, underscores or hyphens. If a response times out, the assistant inspects state and retries with the same key and parameters, so the app does not create a second alert or a second watchlist. A new action gets a new key. Success means a final JSON status:"ok". "Accepted", "preparing" or dispatched:true do not mean the work has finished.
Safety boundaries
- No live trading. Backtesting, replay and paper-trading commands are simulations. Broker credentials, real broker orders and arbitrary JavaScript are not exposed.
- Human-only areas. Sign-in, broker connection, purchases, permission approval, Feedback send, the product Tour and Guided Practice Labs stay with you, even while UI control is on.
- Permissions come from you. Local access is automatic for the active account unless you pause it in the AI Workspace. Agents cannot grant themselves access, unpause it or bypass Python isolation. Cloud writes need a real sign-in.
- Stopping. Pausing cancels pending commands but does not undo submitted changes. Native UI control and recording also stop through Help > Stop AI control and recording or Cmd/Ctrl+Shift+Escape.
Desktop versus browser
The website at tradinglead.in/charts runs the same workspace. Only Desktop exposes the local command transport, so an assistant cannot control an ordinary browser tab. The managed CLI and skills arrived in Desktop 0.1.8 for Apple Silicon Macs. The current public Mac build is 0.1.18. The public Windows build is 0.1.7, which predates managed AI integration. Download Desktop, and see pricing for plan access.
Limitations
- Requires TradingLead Desktop; the managed CLI is in the Apple Silicon Mac build (0.1.8 and later, currently 0.1.18). The public Windows build 0.1.7 does not include it.
- The command index is a source snapshot, not a certification of every command on every tab or website deployment.
- No live broker orders, broker sign-in, broker connection, purchases or permission approval through commands.
- Some areas remain UI-only, such as trendline alert geometry, saved-layout rename and Guided Practice Labs.
- Scans, backtests, reloads and history requests can consume account or provider quota.
Frequently asked questions
- How many commands can an AI agent use in TradingLead?
- The public command index lists 210 canonical commands, 59 compatibility aliases and 67 native Desktop controls. It is a documentation snapshot, so an assistant should read the live catalog of the actual chart tab before using any command.
- How does an assistant find out which commands exist?
- It runs tradinglead agent-guide and tradinglead skills list, lists open tabs with tradinglead tabs, then reads that tab's live catalog with tradinglead capabilities. Only commands advertised by the addressed tab should be used.
- What is a retry key?
- Commands that change something require a unique operation key. If a response is lost, the assistant repeats the same command with the same key and parameters so the change is not applied twice. A genuinely new action uses a new key.
- Can these commands place real trades?
- No. Backtesting, replay and paper-trading commands are simulations. Broker credentials, real broker orders and arbitrary JavaScript are not exposed by the product commands.
- Do the commands work in a normal browser tab?
- No. The external command transport is provided by TradingLead Desktop. Browser-only tabs show that external assistants need Desktop.
- What does mutates false mean for a command?
- Only that the command needs no write grant or retry key. It can still open panels, navigate the chart, start a scan or use quota. The effects list on each command describes those possible consequences.
Related
Last updated: