Transform raw CSV datasets into executive-ready business insights using statistical analysis and LLMs via OpenRouter.
Project description
Acumen CLI
Transform raw CSV datasets into executive-ready business insights using statistical analysis and Large Language Models via OpenRouter.
pip install acumen-cli
acumen sales_data.csv
Features
- Load CSV files — Read any CSV with automatic encoding detection
- Validate datasets — Check for empty data, malformed rows, missing values
- Generate statistics — Descriptive stats per column: mean, median, std, quartiles, unique counts, missing values
- LLM-powered insights — Send only the statistical summary (never raw data) to OpenRouter for business-level analysis
- Beautiful terminal output — Rich-formatted tables, panels, and color-coded insights
- Privacy-first — Raw dataset rows never leave your machine
Installation
pip install acumen-cli
Or install from source:
git clone https://github.com/acumen-cli/acumen.git
cd acumen
pip install -e .
Quick Start
- Set your OpenRouter API key:
export OPENROUTER_API_KEY=sk-or-v1-your-api-key-here
- Run Acumen on any CSV file:
acumen dataset.csv
Options
| Flag | Description |
|---|---|
--model |
LLM model to use (default: openai/gpt-4o-mini) |
--verbose |
Enable detailed logging |
--version |
Show version and exit |
--help |
Show help message |
How It Works
CSV File → Validate → Statistics → JSON Summary → Prompt Builder → OpenRouter → Parse → Rich Output
- Load — Reads CSV with encoding detection using
chardet - Validate — Ensures dataset is non-empty, rows are consistent
- Statistics — Computes descriptive statistics per column
- JSON Summary — Builds a structured summary (no raw data)
- Prompt — Constructs a focused prompt for the LLM
- Analyze — Sends to OpenRouter for business insights
- Display — Renders insights in a beautiful Rich terminal UI
Configuration
Acumen uses environment variables loaded from a .env file (optional).
| Variable | Required | Default | Description |
|---|---|---|---|
OPENROUTER_API_KEY |
✅ Yes | — | Your OpenRouter API key |
ACUMEN_MODEL |
No | openai/gpt-4o-mini |
LLM model identifier |
ACUMEN_TIMEOUT |
No | 30 |
API timeout in seconds |
ACUMEN_LOG_LEVEL |
No | WARNING |
Logging verbosity |
ACUMEN_MAX_RETRIES |
No | 3 |
API retry attempts |
Development
# Clone and install in editable mode
git clone https://github.com/acumen-cli/acumen.git
cd acumen
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check src/
# Type check (requires pyright or mypy)
mypy src/
Architecture
Acumen CLI follows a clean, modular architecture:
acumen/models/— Data types and value objectsacumen/orchestration/— Pipeline orchestrator tying all steps togetheracumen/*.py— Each processing step is a standalone module
License
MIT
Project details
Release history Release notifications | RSS feed
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 acumen_cli-0.2.0.tar.gz.
File metadata
- Download URL: acumen_cli-0.2.0.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6cb262fbd308c6c3a4f5530fc0db804fe0eb0a0edbc55128c3b44479d52df78
|
|
| MD5 |
c10a2a66d99a64b2040aad3a1fee6c2a
|
|
| BLAKE2b-256 |
2bf4eaf170bc8880135be53fc770e34e437fd3a15e82a33cd12a81df0adf799c
|
File details
Details for the file acumen_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: acumen_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e1b92db16d203d36aebab4fd37ff564187d801cb34a5064e6e00a8be10f113e
|
|
| MD5 |
28b4a9228953694b2e2356a97b4d2b1e
|
|
| BLAKE2b-256 |
4fbc7c4cc96ceaf2477932a21003c5dd13d81f7f3f45ad301b61bca6fe32c297
|