CLI
Everything the platform can do, from a terminal — strategies, backtests with their verdicts, agent activity and research.
It speaks MCP
alphonce tools.Install
Requires Node.js 18 or later.
npm install -g @alphonce/cliSigning in
Create a token under Settings → Connected accounts, then:
alphonce auth login
alphonce auth status
alphonce auth logoutThe token is read from a prompt rather than a flag, because command arguments end up in shell history and in ps output. It is checked against the server before being saved, so a bad paste fails immediately, and is written to ~/.alphonce/config.json with mode 0600.
For CI, set ALPHONCE_TOKEN — the environment always wins over the file, so no config needs writing.
Portfolio
alphonce portfolio
alphonce holdings
alphonce holdings --json | jq '.[] | select(.unrealized_pnl < 0)'Strategies
Strategies live on the platform and are referenced by id, not by a local directory. alphonce strategy list shows yours with their ids.
Create
alphonce strategy create \
--name "spy-dca" \
--type dca \
--symbol SPY \
--capital 5000| Name | Default | Description |
|---|---|---|
--name | — | Strategy name (required). |
--type | — | dca, grid, momentum, mean_reversion or custom (required). |
--symbol | — | Instrument to trade (required). |
--capital | 1000 | Capital to allocate. |
--config | — | Extra parameters as JSON, e.g. '{"investment_amount":250}'. Varies by type. |
--broker | — | alpaca or trading212. |
Test
Runs a simulation and prints the result with its verdict — the checks on whether those numbers can be trusted. A strategy that beat buy-and-hold on too few trades will say so.
alphonce strategy test \
--id 6cae6060-… \
--from 2015-01-01 \
--to 2024-12-31| Name | Default | Description |
|---|---|---|
--id | — | Strategy id (required). |
--from | — | Start date, YYYY-MM-DD (required). |
--to | — | End date, YYYY-MM-DD. Must be in the past (required). |
--capital | — | Starting capital. Defaults to the strategy's allocation. |
--quick | false | Skip the parameter sweep, walk-forward and cost sensitivity studies. They cost under a second, so this is rarely worth it. |
Run
alphonce strategy deploy --id <id>
alphonce strategy pause --id <id>
alphonce strategy resume --id <id>
alphonce strategy stop --id <id>Stopping leaves positions open
--liquidate flag — one was documented before, and implementing an unattended mass-exit behind a single flag is not something to do casually.Agent activity
alphonce bot status
alphonce bot logs --id <id> --tail 100
alphonce bot logs --id <id> --follow
alphonce bot trades --id <id>
alphonce bot alerts --id <id>| Name | Default | Description |
|---|---|---|
--id | — | Bot / strategy id (required). |
--tail | 50 | Entries to show. |
--follow | false | Keep watching for new entries, polling every 5 seconds. Ctrl-C to stop. |
bot logs merges alerts and executed trades into one chronological feed — the fills alongside the reasoning that led to them, rather than either half on its own.
Research
alphonce research NVDARuns the full pipeline on one instrument: market data, news, analyst coverage and a synthesised view with its sources.
A symbol, not a question
Everything else
The commands above are conveniences. The full surface is whatever your plan can reach:
alphonce tools
alphonce call GET_STRATEGIES
alphonce call PLACE_ORDER '{"symbol":"SPY","side":"buy","quantity":1}'Configuration
alphonce config get
alphonce config set apiUrl http://localhost:3000
alphonce config path| Variable | Purpose |
|---|---|
| ALPHONCE_TOKEN | Overrides the stored token. Use this in CI. |
| ALPHONCE_API_URL | Point at a different environment. |
| NO_COLOR | Disable colour output. |
Every command accepts --json for machine-readable output, and failures exit non-zero with the reason on stderr, so set -e scripts stop where they should.