User GuideCLI Reference

CLI Reference

Complete guide to using the Copinance OS command-line interface.

Running Commands

After installation:

copinance <command>

Without installation:

python -m copinanceos.cli <command>

Stock Commands

Search Stocks

Search for stocks by symbol or company name.

copinance stock search "Apple"
copinance stock search "AAPL" --limit 5

Options:

  • --limit <number>: Maximum results (default: 10)
  • --type <type>: Search type - auto, symbol, or general

Profile Commands

Profiles customize analysis output based on your financial literacy level.

Note: When you run analyze or ask without a profile, the system will prompt you to set your financial literacy level for more personalized results.

Create Profile

copinance profile create --literacy intermediate --name "My Profile"

Literacy levels: beginner, intermediate, advanced

List Profiles

copinance profile list

Get Profile

copinance profile get <profile-id>

Get Current Profile

copinance profile current

Shows the currently active profile (if any).

Set Current Profile

copinance profile set-current <profile-id>

Set a profile as the current default. Omit the profile ID to clear the current profile.

Delete Profile

copinance profile delete <profile-id> --force

Analyze Commands

Run one-off analysis. Results are saved under .copinance/results/; profiles and cache live under .copinance.

Analyze a Stock

copinance analyze stock AAPL --timeframe mid_term

Options:

  • --timeframe <timeframe>: short_term, mid_term, or long_term (default: mid_term)
  • --profile-id <id>: Profile ID for context (optional)

Macro + Market Regime

Run the combined macro + market regime workflow to get a comprehensive view of market conditions.

copinance analyze macro
copinance analyze macro --market-index QQQ --lookback-days 90

Options:

  • --market-index <symbol>: Anchor market index (SPY, QQQ, DIA, IWM) (default: SPY)
  • --lookback-days <days>: Lookback window (default: 252)
  • --include-* / --no-include-*: Toggle indicator groups (VIX, breadth, sectors, rates, credit, commodities, labor, housing, manufacturing, consumer, global, advanced)

Ask (Agentic)

Ask questions using the agent workflow.

Stock-specific:

copinance ask "What are the key risks for this stock?" --symbol AAPL

Market-wide (no symbol):

copinance ask "What is the current market sentiment and which sectors are leading?"
copinance ask "What is the current VIX level and market fear sentiment?" --market-index SPY

Options:

  • --symbol <symbol> / -s <symbol>: Stock symbol (omit for market-wide)
  • --market-index <symbol> / -m <symbol>: Anchor index for market-wide questions (default: SPY)
  • --timeframe <timeframe>: short_term, mid_term, or long_term (default: mid_term)
  • --profile-id <id>: Profile ID for context (optional)

Note:

  • Requires LLM provider configuration (Gemini API key or Ollama setup) - see Configuration

Examples

Basic Workflow

# 1. Search for a stock
copinance stock search "Apple"
 
# 2. Create a profile
copinance profile create --literacy intermediate --name "Trader"
 
# 3. Run a stock analysis (one-off)
copinance analyze stock AAPL --timeframe mid_term

Cache Commands

Copinance OS includes a built-in caching system to reduce API calls and improve performance.

Clear Cache

Clear cached tool data:

# Clear all cache
copinance cache clear
 
# Clear cache for a specific tool
copinance cache clear --tool <tool-name>

Refresh Cache

Refresh (delete) cache for a specific tool to force fresh data on next call:

# Refresh cache for a tool
copinance cache refresh <tool-name>
 
# Refresh cache for a tool with a specific symbol
copinance cache refresh <tool-name> --symbol AAPL

Cache Information

View cache configuration and status:

copinance cache info

This shows:

  • Cache backend type
  • Cache directory location (under .copinance/cache)

All CLI data (profiles, cache, stock search cache, and workflow results in .copinance/results/) is stored under the .copinance folder in the current directory (or path set by COPINANCEOS_STORAGE_PATH).

Getting Help

copinance --help
copinance analyze --help
copinance ask --help
copinance profile --help
copinance cache --help