Skip to content

CLI Reference

Ossie Irondi edited this page Sep 2, 2026 · 2 revisions

CLI Reference

Run commands from your instance directory in module form, or from the repository root by script path. The instance created in Getting Started is a uv project that depends on the engine, so uv run python -m src.<tool> works there with no extra flags. The source-backed inventory is maintained in the repository’s CLI reference.

Analysis examples

These examples use script paths from the repository root:

uv run python src/analysis/risk_metrics_cli.py AAPL --days 252 --benchmark SPY
uv run python src/analysis/correlation_cli.py AAPL MSFT SPY --days 252
uv run python src/strategies/backtester_cli.py AAPL --days 252 --strategy rsi
uv run python src/strategies/optimizer_cli.py AAPL MSFT SPY --days 252 --method max_sharpe

Additional checked-in analysis surfaces include factor, margin, options, hedging, rolling-metrics, total-return, momentum, volatility, moving-average, market-data, and screening commands. Use each command’s --help output for arguments and ensure output does not contain private account data.

Local data refresh

uv run python -m src.integrations.refresh_all

Configured provider modules can also be inspected directly:

uv run python -m src.integrations.snaptrade.cli --help
uv run python -m src.integrations.simplefin.sync_expenses_db --help

The refresh orchestrator independently runs configured positions, transactions, and expense synchronization and returns a nonzero outcome for a partial error. Run it from your instance directory so it reads the instance .env and snaptrade-accounts.yaml and writes family_office.db under the instance root. See Architecture and Data Flow before connecting accounts.

Known command limitations

  • The Momentum CLI help formatter has a tracked defect in issue #108.
  • The input-validation CLI imports a removed symbol; see issue #120.

Finance Guru output is educational only, not investment advice. Loss of principal is possible; consult licensed professionals before acting.

Clone this wiki locally