Skip to content

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.create or alerts.update.
  • Compatibility aliases are older names that run the canonical command with the same validation and retry identity. Most are simulation.* spellings of backtesting.*, plus legacy backtesting.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-start and demo-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.

SkillWhat it coversRepresentative commands
tl-desktopConnection, tabs, panels, theme, activity, native input and recordingworkspace.getState, workspace.openSidebar, workspace.setPanel, workspace.getActivity, ui.waitIdle, demo.prepare
tl-chartsSymbol, feed and interval, view, Compare, built-in studies, drawings, layouts, Chart Grid, native replaychart.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-marketsWatchlists, symbol details, peers, indices, heatmap, Market Intelligence, Futures, raw candleswatchlists.getRows, watchlists.create, watchlists.addSymbols, watchlists.manage, symbol.details, peers.get, heatmap.configure, futures.getReport, marketData.getBars
tl-alertsSaved price alerts and trigger historyalerts.list, alerts.create, alerts.update, alerts.setEnabled, alerts.delete, alerts.activity
tl-screeningScan sidebar, results grid, refinement, history, saved screeners, local broker scansscreening.catalog, screening.configure, screening.run, screening.getResults, screening.refine, screening.save, screening.listHistory, providerScreener.run
tl-patternsHistorical Patterns: one ticker across weekdays and IST time windowspatterns.configure, patterns.run, patterns.getResults, patterns.openOccurrence
tl-researchSaved HTML research reports in the right sidebarresearch.create, research.update, research.list, research.show
tl-tlscriptTLScript-Pine indicator authoring and chart instancesindicators.listCapabilities, indicators.validate, indicators.save, indicators.apply, indicators.update, indicators.setSettings
tl-pythonPython indicator authoring, source history and chart instancespythonIndicators.capabilities, pythonIndicators.validate, pythonIndicators.save, pythonIndicators.apply, pythonIndicators.history, pythonIndicators.restore
tl-backtestingPython and Pine backtests, applied strategies, saved runs, presets, comparison, exportbacktesting.capabilities, backtesting.run, backtesting.get, backtesting.compare, backtesting.export, backtesting.applyStrategy, backtesting.librarySave
tl-strategy-optimizationStrategy Optimizer sweeps, holdout, walk-forward, reportsbacktesting.optimizePreview, backtesting.optimize, backtesting.optimizeRerun, backtesting.optimizeReport
tl-paper-tradingReplay practice, backtest-derived replay, forward paper and simulated ordersbacktesting.practice, backtesting.replay, backtesting.forward, backtesting.step, backtesting.order, backtesting.protect, backtesting.close
tl-strategy-researchDeprecated router to tl-strategy-optimizationnone of its own
tl-testingAgent-run YAML test suites of real commandsnone 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:

  1. tradinglead agent-guide: the bundled workflow guide.
  2. tradinglead skills list and tradinglead skills read NAME --file DOCUMENT: the 14 skills and their command references. tradinglead skills status reports the active bundle version and its compatibility.
  3. tradinglead tabs: the open TradingLead tabs. The assistant passes --tab explicitly, even when only one tab is open.
  4. tradinglead capabilities --tab ID: the live catalog for that tab, which is the authoritative list. Domain discovery commands such as backtesting.capabilities, indicators.listCapabilities or screening.catalog follow.
  5. tradinglead exec chart.getState --tab ID and workspace.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:

EffectMeaning
noneA local, observational read
navigateCan change the chart's symbol, interval, pane or date
panelOpens or changes a visible panel or sidebar
uiPresentation-only demo changes
quotaCan use account or provider allowance, as scans and history loads do
networkContacts TradingLead or provider services
codeCompiles or runs indicator or strategy code
writeChanges 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.

Last updated: