All CLI flags are parsed by Node’s built-inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-monorepo-parallel/llms.txt
Use this file to discover all available pages before exploring further.
parseArgs from the util module. The result is memoized with singleshot from functools-kit so getArgs() can be called from any module without re-parsing process.argv. The helper lives at packages/main/src/helpers/getArgs.ts and is consumed by every entry-point module in packages/main/src/main/.
getArgs() Source
Flag Reference
| Flag | Type | Default | Description |
|---|---|---|---|
--entry | boolean | false | Activates Mode A: enables the CC_SYMBOL_LIST loop in the active mode module |
--backtest | boolean | false | Activates the backtest mode (replay historical candles) |
--live | boolean | false | Activates live trading mode against a real exchange |
--paper | boolean | false | Activates paper trading mode (live data, simulated fills) |
--session | boolean | false | Runs Telegram MTProto auth and saves the session string to ./session.txt |
--cache | boolean | false | Pre-warms MongoDB with OHLCV candles before the backtest symbol loop starts |
All flags default to
false. Passing a flag without a value (e.g. --entry) sets it to true. Because strict: false is set, unknown flags are silently ignored rather than throwing.Mode Compatibility Matrix
| Mode | --entry | --backtest | --live | --paper | --session | --cache |
|---|---|---|---|---|---|---|
| Parallel backtest | ✓ required | ✓ required | — | — | — | optional |
| Single backtest (Mode B) | — | ✓ required | — | — | — | — |
| Live trading | ✓ required | — | ✓ required | — | — | — |
| Paper trading | ✓ required | — | — | ✓ required | — | — |
| Telegram auth | — | — | — | — | ✓ required | — |
Example Commands
Parallel backtest (all symbols, no cache pre-warm)Positional Arguments and the Strategy File Path
parseArgs is configured with allowPositionals: true, which means anything on the command line that is not a --flag is collected as a positional. The strategy file path (e.g. path/to/strategy.ts) is passed as the first positional argument.
getArgs() itself does not read or process the positional arguments — it only exposes the boolean flags through values. The strategy file path is handled upstream by @backtest-kit/cli (the npm start entry point), which loads and executes the file before any entry-point module sees the parsed flags.