AlphaFox

AlphaFox CLI

Published Nov 27, 2026

The AlphaFox CLI (command alphafox) lets your own AI agent or your terminal call the AlphaFox public application API, for example to list strategy templates, run backtests and manage strategies. It ships with a set of Agent Skills that tell an agent which operations exist and what each one takes. The CLI is open source and published on npm as @alphafox/cli.

The same entry in the web app: in the console sidebar, click Install AlphaFox and switch to the CLI tab.

The CLI tab of the Install AlphaFox dialog
Console sidebar Install AlphaFox → CLI: copy the prompt for your agent, or the manual install command.

Install

You need Node.js 20 or later. Both methods install the CLI and the Skills together; pick one.

Send this to an AI agent such as Claude Code, Cursor or Codex:

Help me install AlphaFox CLI: https://www.alphafox.app/alphafox-cli-installation-guide.md

The agent follows the install guide: it installs the CLI, syncs the Skills, and walks you through sign-in and a self-check. When it finishes, restart the AI tool so it loads the new Skills.

npm install -g @alphafox/cli on its own does not install the Skills. If you install that way, also run alphafox skills sync so your agent can find them.

Sign in

The CLI signs in with your AlphaFox account. It neither needs nor accepts a pasted token.

alphafox auth login --browser

The CLI opens your system browser; sign in there and confirm. If no browser opens, open the link the terminal prints.

The CLI signs in to production (production) by default.

Check the install

alphafox doctor alphafox auth status --verify alphafox whoami

doctor checks the Node.js version, the sign-in configuration and the system keychain; auth status --verify confirms your session is still valid; whoami shows the signed-in account. If the session has expired, sign in again as above.

Common commands

CommandWhat it does
alphafox versionShow the CLI version
alphafox doctorCheck the environment and sign-in configuration
alphafox whoamiShow the signed-in account
alphafox schema <operationId>Show the parameters an operation takes
alphafox api GET /api/v1/meCall an allowed /api/v1/* endpoint directly
alphafox engine-backtest helpShow how to use the local backtest commands
alphafox skills statusCheck whether Skills are missing, out of date or modified
alphafox update --checkCheck for a new version

The CLI’s own help is the reference for each command’s full options.

Safety rules

  • Sign-in tokens are kept in the system keychain. They are never written to config files and cannot be passed with --token.
  • High-risk writes run only with --yes.
  • alphafox api reaches only the allow-listed /api/v1/* endpoints.
  • Before a write is sent, --body or --config @file is validated against that operation’s schema. An agent should run alphafox schema <operationId> first and never invent fields.

Orders placed through the CLI or an agent are as real as orders placed on the web: a live strategy trades with your trading account. Try it in paper trading first; see First Paper Strategy.

Update

The CLI and its Skills are released and upgraded together:

alphafox update --check alphafox update

alphafox update upgrades the CLI, then syncs the Skills bundled with that version. Skills you have edited are kept and reported. During normal use, the CLI checks for a new version at most once every 24 hours and only prints a notice; it never upgrades itself. Restart your AI tool after upgrading.

Uninstall

Uninstalling uses a standalone script, not an alphafox subcommand. Preview what it will remove first:

curl -fsSL https://raw.githubusercontent.com/alphafoxai/alphafox-cli/main/scripts/uninstall.cjs | node -- --dry-run

Then run it:

curl -fsSL https://raw.githubusercontent.com/alphafoxai/alphafox-cli/main/scripts/uninstall.cjs | node -- --yes

The script removes the globally installed CLI, the Agent Skills, local config, sign-in tokens and local backtest caches. It does not delete strategies or account data on the server, and running strategies keep running; to stop one, use My Strategies.