ChartnautDocs

Overview

The Chartnaut CLI runs your indicators, definitions and studies from a terminal, or from a coding agent such as Claude Code or Codex. You keep the scripts as files in your own folder. The CLI checks them, runs them on Chartnaut's servers and saves them to your account, where they open in the app like anything you built there.

The CLI is open source: the code, the install scripts and a guide for coding agents are on GitHub at chartnaut/cli. Read it, build it yourself, or open an issue there.

The CLI and the API need Starter or above. On Free, every command that reaches Chartnaut stops with plan_limit and exit code 3. Plans

What a run gives you

Nothing runs on your computer and you never download market data. The CLI sends the script, Chartnaut runs it on the instrument, timeframe and window you name, and returns what the script produced:

Script

A run returns

Indicator

Its output series: a time and a value per bar for each output

Definition

Its events: one row each time the setup happened

Study

Its result blocks: metrics, tables, distributions and charts

You never receive raw candles. The scripts are the same ones the builders in the app write, in the same language. The Scripting section is their reference, and chartnaut docs prints any page of it in the terminal.

Runs from the CLI take from the same pool of runs at once as the app and its agents.

What you can do with it

  • Write an indicator in your editor and run it on 30 days of BTC before you save anything.

  • Run one definition on BTC and ETH in one command and compare the event counts.

  • Save a new version, or pull down a script you built in the app and keep editing it locally.

  • Run a definition over a year of history so a study can read its events.

  • Let Claude Code or Codex write a script, test it and fix it until the numbers make sense.

The commands

$ chartnaut --help
Usage: chartnaut [options] [command]

Author and run Chartnaut indicators, definitions and studies. Scripts run on
Chartnaut servers.

Options:
  -v, --version                   output the version number
  --json                          print the raw API JSON
  -h, --help                      display help for command

Commands:
  init [options]                  set up a Chartnaut project here:
                                  chartnaut.json, script folders and the agent
                                  guide in CLAUDE.md + AGENTS.md. Additive:
                                  never removes or overwrites what you wrote
  new [options] <kind> <slug>     write a starter script folder:
                                  <kind-plural>/<slug>/
  validate [options] [path]       lint and resolve a script without saving or
                                  running it (free)
  push [options] [path]           save the local folder as a new version
                                  (create on first push)
  pull [options] <ref>            write a saved version to local files
  diff <slug>                     unified diff of local files vs the latest
                                  remote version
  ls [options]                    your scripts
  versions [options] <slug>       version history of a script, newest first
  open [options] <target>         print the app link for a script or run
                                  (--browser opens it)
  run [options] <target>          run a local script folder/file (inline) or a
                                  saved ref on Chartnaut servers
  runs [options]                  list recent runs; see also runs
                                  get|results|cancel
  events [options] <definition>   a definition's stored events from running
                                  over history, or --summary for counts per
                                  instrument and timeframe
  collect [options] <definition>  run a definition over history on a window so
                                  its events are stored for studies; only the
                                  missing part runs
  login [options]                 sign in through your browser (--token for CI)
  logout                          sign out
  whoami                          user, plan and token scopes
  usage                           compute used this period and every plan cap
  library                         search every script you can use: yours,
                                  Chartnaut's and the community's (never their
                                  source)
  instruments [options] [q]       instruments you can run on, with coverage
  docs [topic]                    scripting reference: topic list, or one topic
                                  as markdown
  upgrade [options]               update chartnaut to the latest version
  help [command]                  display help for command

chartnaut collect runs a definition over history, the same as running it over history in the app. chartnaut library searches the scripts you can run, including Chartnaut's built-ins and other people's public ones. Every command and flag is in the Command reference.

Pages in this section

To

Read

Put the CLI on your computer

Install

Connect it to your account

Sign in

Write and run a first indicator

Your first run

Have a coding agent do the work

Working with Claude Code and Codex

Save versions and edit scripts from the app

Saving and versions

Read full results, and study runs made in the app

Runs and results

Read and filter a definition's events

Definition events

Call Chartnaut from your own code

API overview

Know how much you can run

Limits

Understand a failure

Errors and exit codes

Read the code, build it from source or report a bug

chartnaut/cli on GitHub