CLI tool for automated stock analysis
Project description
Caracal
░█▀▀░█▀█░█▀▄░█▀█░█▀▀░█▀█░█░░
░█░░░█▀█░█▀▄░█▀█░█░░░█▀█░█░░
░▀▀▀░▀░▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀
An opinionated terminal UI for stock analysis.
Caracal is a keyboard-driven terminal app for tracking stocks, running technical analysis, and making entry point decisions — without leaving your terminal. No browser, no cloud account, no subscription. Install it, point it at a ticker, and go.
This is not financial advice. Caracal is for informational and educational purposes only. Do your own research. See full disclaimer.
Opinions
Caracal makes choices so you don't have to:
- Dark theme, no light mode. A One Dark-inspired palette designed for long sessions. Cyan for prices, green/red for changes, purple accents. Not configurable — because we spent the time getting it right.
- Vim keys, no mouse.
j/kto move,Enterto drill in,Escto go back,qto quit. If you use a terminal, you already know how this works. - Local-first, always. Your market data lives in a DuckDB file on your machine. No accounts, no telemetry, no API we control. You own your data.
- Indicators with interpretation. Not just numbers — color-coded signals that tell you RSI is overbought or MACD is crossing. Grouped by category: Trend, Momentum, Volatility.
- Six providers, one interface. Yahoo Finance, Alpha Vantage, EODHD, Finnhub, Massive, Interactive Brokers. Swap freely — the experience stays the same.
Install
pip install caracal-trading[all]
caracal init
caracal tui
That's it. Watchlists, indicators, entry signals — all in your terminal.
Or pick only the provider you need:
pip install caracal-trading[yahoo,tui] # Yahoo Finance — free, no key needed
pip install caracal-trading[alphavantage,tui] # Alpha Vantage — free tier available
pip install caracal-trading[eodhd,tui] # EODHD — broad exchange coverage
pip install caracal-trading[finnhub,tui] # Finnhub — real-time US data
pip install caracal-trading[massive,tui] # Massive.com — professional data
pip install caracal-trading[ibkr,tui] # Interactive Brokers — existing account
Requires Python 3.12+.
The TUI
Launch with caracal tui. Everything is keyboard-driven:
| Key | Action |
|---|---|
j / k |
Navigate up/down |
Enter |
Open stock detail view |
Esc |
Go back |
r |
Refresh market data |
w |
Switch watchlist |
c |
Create watchlist |
d |
Delete watchlist |
s |
Sort watchlist — cycles through Ticker, Chg%, Signal, Confidence (asc/desc) |
a |
Add tickers (batch: AAPL MSFT GOOGL) |
x |
Remove ticker |
i |
App info |
q |
Quit |
Watchlist View
Your main workspace. Each watchlist is a tab showing:
| Column | What it tells you |
|---|---|
| Symbol | Ticker |
| Name | Company name |
| Price | Latest close in cyan |
| Chg% | Daily change — green if up, red if down |
| Signal | BUY / HOLD / SELL — color-coded |
| Conf | Confidence score for the signal |
| RSI | Relative Strength Index with overbought/oversold markers |
| MACD | Trend momentum at a glance |
| BB | Bollinger Band position |
Detail View
Press Enter on any ticker. Indicators grouped by what they measure:
- Trend — SMA 20/50, EMA 12 with crossover interpretation
- Momentum — RSI 14, MACD with signal line and histogram
- Volatility — Bollinger Bands with position and bandwidth
Each indicator shows a color-coded interpretation: ▲ Bullish, ▼ Bearish, or — Neutral. The header breaks down the entry signal into vote counts — you see exactly why it says "BUY" (e.g., 3 buy / 1 hold / 1 sell).
Last 5 days of OHLCV data at the bottom for recent price context.
The CLI
The TUI is the primary interface, but Caracal has a full CLI for scripting and automation:
caracal fetch AAPL # fetch OHLCV data (delta-fetch — only new data)
caracal fetch MSFT --period 2y # custom period
caracal analyze AAPL # technical indicators
caracal entry AAPL # entry signal with confidence
caracal --format json entry AAPL # structured JSON for piping
$ caracal entry AAPL
AAPL: BUY (confidence: 72.00%)
sma_20: 178.34 sma_50: 175.12 ema_12: 179.05
rsi_14: 38.21 macd: 1.23 macd_signal: 0.98
bollinger_upper: 185.42 bollinger_lower: 170.86
Watchlist CLI
caracal watchlist create tech
caracal watchlist add tech AAPL MSFT GOOGL NVDA AMZN
caracal watchlist show tech
caracal watchlist list
Configuration
caracal init # create default config
caracal configure # interactive wizard
Config lives in ~/.caracal/config.toml. Provider keys can also be set via environment variables (CARACAL_ALPHAVANTAGE_API_KEY, etc.). Priority: defaults → config → env vars → CLI flags.
Data Providers
| Provider | Extra | API Key | Best for |
|---|---|---|---|
| Yahoo Finance | yahoo |
No | Getting started, free data |
| Alpha Vantage | alphavantage |
Yes (free tier) | Adjusted close, broad coverage |
| EODHD | eodhd |
Yes | Global exchanges, exchange suffixes |
| Finnhub | finnhub |
Yes (free tier) | US real-time data |
| Massive.com | massive |
Yes | Professional-grade data |
| Interactive Brokers | ibkr |
No (TWS/Gateway) | Real-time, existing IBKR users |
All providers are normalized to the same format. Switch with one config change — your watchlists, indicators, and signals work the same regardless of source.
Architecture
Modular, with optional dependencies loaded lazily:
| Package | Purpose |
|---|---|
cli |
Click commands |
tui |
Textual terminal UI |
config |
TOML config + interactive wizard |
providers |
6 data sources behind a common Protocol |
storage |
DuckDB persistence with delta-fetch |
indicators |
SMA, EMA, RSI, MACD, Bollinger |
analysis |
Rule-based entry signal engine |
output |
Rich tables + JSON envelope |
Development
git clone https://github.com/fuchsblau/caracal.git
cd caracal
pip install -e ".[dev]"
pytest # 466 tests, 86% coverage
ruff check . # lint
ruff format . # format
Contributing
Contributions welcome. Open an issue first to discuss changes before submitting a PR.
Disclaimer
Caracal is not financial advice. This tool is for informational and educational purposes only. It does not constitute investment advice, financial advice, trading advice, or any other sort of advice. Do not make financial decisions based solely on this tool's output. Trading involves risk, including losing your entire investment. Do your own research and consult a qualified financial advisor. The authors assume no responsibility for losses resulting from the use of this software.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file caracal_trading-1.4.0.tar.gz.
File metadata
- Download URL: caracal_trading-1.4.0.tar.gz
- Upload date:
- Size: 49.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4767b2eb671a02c75e40428a3e79272f6ddb0379da3c2108f72f8ce535737e61
|
|
| MD5 |
0feb43ee28b0ef5259421819e3aeda62
|
|
| BLAKE2b-256 |
3979e8064426dc38574f2fb432f49f1d0729996822d9bceecaea04ee978c07f0
|
Provenance
The following attestation bundles were made for caracal_trading-1.4.0.tar.gz:
Publisher:
release.yml on fuchsblau/caracal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
caracal_trading-1.4.0.tar.gz -
Subject digest:
4767b2eb671a02c75e40428a3e79272f6ddb0379da3c2108f72f8ce535737e61 - Sigstore transparency entry: 1056239739
- Sigstore integration time:
-
Permalink:
fuchsblau/caracal@8075c54240cd63ef1bcd2775dcc567310df6e208 -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/fuchsblau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8075c54240cd63ef1bcd2775dcc567310df6e208 -
Trigger Event:
push
-
Statement type:
File details
Details for the file caracal_trading-1.4.0-py3-none-any.whl.
File metadata
- Download URL: caracal_trading-1.4.0-py3-none-any.whl
- Upload date:
- Size: 65.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af274d7c6b009bed0dad1f11de4cf186f08b7a48d61336ec7916f9ca21c75fce
|
|
| MD5 |
44f2501c629f0eb285d24e2c8e617001
|
|
| BLAKE2b-256 |
19ec9f9b72ec863f1ddca0dbdefbc94adc7f3c9dc5830907de5e5d9df7f1b28d
|
Provenance
The following attestation bundles were made for caracal_trading-1.4.0-py3-none-any.whl:
Publisher:
release.yml on fuchsblau/caracal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
caracal_trading-1.4.0-py3-none-any.whl -
Subject digest:
af274d7c6b009bed0dad1f11de4cf186f08b7a48d61336ec7916f9ca21c75fce - Sigstore transparency entry: 1056239801
- Sigstore integration time:
-
Permalink:
fuchsblau/caracal@8075c54240cd63ef1bcd2775dcc567310df6e208 -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/fuchsblau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8075c54240cd63ef1bcd2775dcc567310df6e208 -
Trigger Event:
push
-
Statement type: