Deterministic local data analysis CLI for coding agents.
Project description
Datalore
Datalore is a deterministic local data-analysis CLI designed to amplify coding agents.
The core idea is simple: when Codex, Claude Code, or a human operator needs a reliable answer about a local dataset, they should call a stable binary with explicit arguments and parse structured output instead of improvising pandas, sklearn, and matplotlib every time.
What It Does
- Inspect local CSV, Excel, and JSON datasets
- Profile columns, dtypes, missing values, and duplicates
- Generate structured descriptive statistics
- Generate structured correlation reports
- Run deterministic linear regression
- Apply deterministic cleaning and export operations
- Compare two datasets structurally and at the row level
- Generate reproducible plot artifacts
- Diagnose runtime/install issues with a doctor command
- Emit either human-readable text or machine-readable JSON
- Optionally persist the full JSON envelope to a report file
- Keep outputs under
artifacts/by default
Install
Current install flow, from any machine where you want to analyze local data:
python3 -m venv .venv
source .venv/bin/activate
pip install 'git+https://github.com/micic-mihajlo/datalore-cli.git'
After that, the public interface is just:
datalore --help
The repo-local ./datalore wrapper is only a development convenience for contributors working inside this repository.
If you are developing Datalore itself, install it in editable mode from the repo root:
pip install -e .
Use In Your Own Project
Move into the folder that contains your data:
cd /path/to/my/data
datalore init
That creates:
AGENTS.mdCLAUDE.md./dataloreartifacts/- a
.gitignoreentry forartifacts/
After that, both you and your coding agent can work from that folder directly:
./datalore files . --format json
./datalore profile sales.csv --format json
./datalore clean sales.csv --rename sales=>revenue --output artifacts/datasets/sales_clean.csv --format json
Why the wrapper matters:
- humans can keep using
datalore - agents are usually safer using
./datalorebecause it binds the project to the exact Python interpreter that installed Datalore
CLI Usage
Inspect a dataset:
datalore inspect data.csv
Profile a dataset in JSON mode for agent consumption:
datalore profile data.csv --format json
Run a simple regression:
datalore regression data.csv --target last --format json
Constrain the predictors:
datalore regression data.csv --target revenue --predictors spend,visits,leads --format json
Create a plot with a stable output path:
datalore plot data.csv --kind histogram --x revenue --output artifacts/plots/revenue_hist.png --format json
Generate a correlation heatmap:
datalore plot data.csv --kind correlation-heatmap --format json
Compare two datasets:
datalore compare before.csv after.csv --format json
datalore compare before.csv after.csv --key-columns id --format json
Generate structured summary statistics:
./datalore summary data.csv --format json
Generate a structured correlation report:
./datalore correlate data.csv --target revenue --min-abs-correlation 0.3 --format json
Clean and export a dataset deterministically:
datalore clean data.csv --fill-numeric median --drop-duplicates --output artifacts/datasets/data_clean.csv --format json
Apply deterministic transforms without falling back to ad hoc pandas:
datalore clean data.csv \
--rename sales=>revenue \
--derive sales_per_customer=>revenue\|/\|customers \
--filter 'customers>=24' \
--limit 100 \
--output artifacts/datasets/data_prepared.csv \
--format json
Write the full structured result to disk for downstream tooling:
datalore profile data.csv --format json --report-file artifacts/reports/profile.json
Find local datasets, including gitignored files in the repo:
datalore files . --format json
Inspect the runtime/install state:
datalore doctor --format json
Initialize a non-repo project for Codex and Claude Code:
datalore init
datalore init --agent codex
Command Surface
datalore inspect
- Quick shape, dtype, missing-value, duplicate, and preview summary.
datalore profile
- Adds per-column detail on top of
inspect.
datalore regression
- Runs a deterministic linear regression using numeric columns only.
datalore summary
- Emits machine-readable descriptive statistics for numeric and categorical columns.
datalore correlate
- Emits a machine-readable correlation matrix, strongest pairs, and optional target-column ranking.
datalore clean
- Applies deterministic cleaning and export operations such as filter, derive, rename, select, fill, drop NA, dedupe, sort, limit, and standardize.
- The transform pipeline runs in a fixed order:
rename -> derive -> filter -> select -> fill -> drop NA -> dedupe -> standardize -> sort -> limit.
datalore compare
- Compares two datasets for shape, schema, dtype, missing-value, duplicate, and row-level changes. With
--key-columns, it can report changed rows keyed by business identifiers.
datalore files
- Discovers local dataset files by walking the workspace, including gitignored inputs that
rg --fileswould skip.
datalore plot
- Generates histogram, scatter, line, bar, or correlation heatmap artifacts.
datalore doctor
- Reports interpreter, artifact-root, and dependency status for install/runtime debugging.
datalore init
- Scaffolds
AGENTS.md,CLAUDE.md, a local./datalorewrapper,artifacts/, and anartifacts/ignore rule in the current project.
Reliability
- JSON output uses a stable envelope with
schema_version,command,result, anderror - every command supports
--report-filefor downstream automation dataloreworks from any folder after installation./dataloreprefers the repo venv automatically when developing inside this repodatalore doctorgives a stable diagnostics entrypoint when the runtime is suspect- startup no longer crashes on
--helpif scientific dependencies are missing - CI runs editable install, distribution builds, and the CLI test suite on multiple Python versions via
.github/workflows/ci.yml
Agent-Friendly Conventions
In a normal user project, prefer:
./datalore <command> ... --format json
Why:
- JSON output is stable and easy to parse
- exit codes are predictable
- artifact paths are explicit
- the analysis method is fixed rather than improvised
--report-filegives you a stable on-disk result for chained workflowsdatalore filesavoids the common failure mode where the dataset is gitignored and invisible torg --filesdatalore initgives Codex and Claude Code repo-local instructions plus a reliable local wrapper in the user's own data project
Inside the Datalore repository itself, contributors can still prefer:
./datalore <command> ... --format json
Repo-native instructions are included for both ecosystems:
AGENTS.mdfor CodexCLAUDE.mdfor Claude Code.agents/skills/for Codex skills.claude/skills/for Claude Code skills
These instructions tell agents when to use Datalore instead of writing ad hoc analysis code.
Artifacts
Generated outputs go under artifacts/ by default:
artifacts/plots/artifacts/datasets/artifacts/reports/artifacts/scripts/
Override the root with:
export DATALORE_ARTIFACT_DIR=/path/to/artifacts
Publishing
The repository is set up for PyPI Trusted Publishing through GitHub Actions.
Release flow:
git tag v0.4.1
git push origin v0.4.1
gh release create v0.4.1 --generate-notes
Before the first release, create or register the datalore-cli project on PyPI and add a Trusted Publisher that matches:
- owner:
micic-mihajlo - repository:
datalore-cli - workflow:
.github/workflows/publish.yml - environment:
pypi
If the project does not exist yet on PyPI, use PyPI's pending publisher flow for the first release. After that, publishing happens from GitHub Actions without local API tokens.
Testing
Run the CLI test suite:
.venv/bin/python -m unittest discover -s tests -v
Smoke test the fixture dataset manually:
./datalore files tests --format json
./datalore inspect tests/fixtures/mini_dataset.csv --format json
./datalore summary tests/fixtures/mini_dataset.csv --format json
./datalore correlate tests/fixtures/mini_dataset.csv --target sales --format json
./datalore regression tests/fixtures/mini_dataset.csv --target sales --predictors marketing,customers --format json
./datalore clean tests/fixtures/mini_dataset.csv --rename sales=>revenue --derive sales_per_customer=>revenue\|/\|customers --filter 'customers>=24' --limit 3 --format json
./datalore clean tests/fixtures/mini_dataset_changed.csv --fill-numeric median --output artifacts/datasets/mini_clean.csv --format json
./datalore compare tests/fixtures/mini_dataset.csv tests/fixtures/mini_dataset_changed.csv --key-columns month --format json
./datalore doctor --format json
Smoke test the installed package from outside the repo:
mkdir -p /tmp/datalore-demo
cp tests/fixtures/mini_dataset.csv /tmp/datalore-demo/
cd /tmp/datalore-demo
datalore init
./datalore files . --format json
./datalore profile mini_dataset.csv --format json
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 datalore_cli-0.4.1.tar.gz.
File metadata
- Download URL: datalore_cli-0.4.1.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cb49b415578fbf1a8aa77afb035ff58b4ab195b7b5185302327baf977e7a9b5
|
|
| MD5 |
a3cf5cc3b55a55702396686cfb115dcf
|
|
| BLAKE2b-256 |
00f2b399ecf817b8c52c696211ab5d52bb8f3273ee206a82be2962d9a17bc54b
|
Provenance
The following attestation bundles were made for datalore_cli-0.4.1.tar.gz:
Publisher:
publish.yml on micic-mihajlo/datalore-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datalore_cli-0.4.1.tar.gz -
Subject digest:
3cb49b415578fbf1a8aa77afb035ff58b4ab195b7b5185302327baf977e7a9b5 - Sigstore transparency entry: 1237976523
- Sigstore integration time:
-
Permalink:
micic-mihajlo/datalore-cli@1c1f135056b863efaf2b9b95b5cc7748f8dfdaee -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/micic-mihajlo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1c1f135056b863efaf2b9b95b5cc7748f8dfdaee -
Trigger Event:
release
-
Statement type:
File details
Details for the file datalore_cli-0.4.1-py3-none-any.whl.
File metadata
- Download URL: datalore_cli-0.4.1-py3-none-any.whl
- Upload date:
- Size: 23.4 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 |
2291110bfc21bba0a8c06f3c358c0f5f7ee34f81a57f9f858f8e7b301475e828
|
|
| MD5 |
59e17915fa62610b401656cdcbce21dd
|
|
| BLAKE2b-256 |
81067782352a87bedacb2607614a065f1c155a58b6f0bd12c3e1ec3a23985754
|
Provenance
The following attestation bundles were made for datalore_cli-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on micic-mihajlo/datalore-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datalore_cli-0.4.1-py3-none-any.whl -
Subject digest:
2291110bfc21bba0a8c06f3c358c0f5f7ee34f81a57f9f858f8e7b301475e828 - Sigstore transparency entry: 1237976539
- Sigstore integration time:
-
Permalink:
micic-mihajlo/datalore-cli@1c1f135056b863efaf2b9b95b5cc7748f8dfdaee -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/micic-mihajlo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1c1f135056b863efaf2b9b95b5cc7748f8dfdaee -
Trigger Event:
release
-
Statement type: