Skip to main content

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

  1. Set your OpenRouter API key:
export OPENROUTER_API_KEY=sk-or-v1-your-api-key-here
  1. 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
  1. Load — Reads CSV with encoding detection using chardet
  2. Validate — Ensures dataset is non-empty, rows are consistent
  3. Statistics — Computes descriptive statistics per column
  4. JSON Summary — Builds a structured summary (no raw data)
  5. Prompt — Constructs a focused prompt for the LLM
  6. Analyze — Sends to OpenRouter for business insights
  7. 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 objects
  • acumen/orchestration/ — Pipeline orchestrator tying all steps together
  • acumen/*.py — Each processing step is a standalone module

License

MIT

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

acumen_cli-0.1.0.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acumen_cli-0.1.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file acumen_cli-0.1.0.tar.gz.

File metadata

  • Download URL: acumen_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for acumen_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b74458186c6d0421d38ad787894510262462407978363a7ed148d0a6ffae51fa
MD5 6dd64030ebf0ad7b6fb1e72785805bba
BLAKE2b-256 6411e8b7e96d569b94fe6a0ea4fb8b9caf61919e6abe630497dcb548edb1f549

See more details on using hashes here.

File details

Details for the file acumen_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: acumen_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for acumen_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7816a7ad5db87838936d07eed6582e5d05efb914cdd4917592c9e209511e8278
MD5 7b73114812256767fd0afc0e64432790
BLAKE2b-256 f353043ae755462b9cafd9c37af79cc6077c581edb6d51d4ae097c98a184c7f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page