Local filesystem snapshots, savepoints, rollback, branches, advisory command scanning and a tamper-evident audit trail.
pip install chrono-agent Copy PIP instructions
A dependency-free Python tool for snapshots, granular savepoints, rollback, branches, conservative three-way merges, advisory command scanning and an append-only audit log of every action. The website is a separate simulator. This package does not connect to Llama, Claude, GPT or a database.
Download the ZIP without extracting it. In its download folder:
python -m pip install --user --upgrade chrono-agent-0.2.0.zip python -m chrono_agent --version Expected: chrono-agent 0.2.0. If chrono is not on PATH, all examples also work by replacing chrono with python -m chrono_agent. Restart CMD after a permanent PATH change. Python 3.8 or newer is required. This distribution is not published to PyPI.
cd /d "%USERPROFILE%\chrono-dev-test-01" chrono run python success_agent.py python app.py chrono status chrono log Expected: COMMIT sp_..., VERSION_3, (no changes), and a new COMMIT: python success_agent.py snapshot at HEAD. Existing 0.1.0 snapshots are readable; do not delete .chrono.
chrono init chrono snapshot -m "before agent" chrono run python agent.py chrono status chrono diff chrono log chrono rollback chrono branch feature chrono checkout main chrono merge feature chrono scan "rm -rf /" chrono audit chrono audit --verify chrono audit --csv --out audit-report.csv chrono audit --push https://audit.example.com/ingest --verify-remote chrono policy chrono team add sara --role developer chrono team list chrono git install-hook chrono git status chrono db add appdb --engine sqlite --path app.db chrono db snapshot appdb chrono db restore appdb chrono dashboard --out report.html chrono mcp chrono --help Use these only inside a disposable test project initially. init is idempotent. Default rollback restores the current branch HEAD, not automatically its parent; choose an ID from log to restore an older version. It asks [y/n]; enter y before typing any further command. rollback -y skips confirmation and discards unsaved tracked changes.
branch NAME creates and switches to that branch. Branch creation and checkout save dirty source work before leaving it. Merge requires clean work, preserves independent changes, records both parents, and stops without changes if both branches alter the same file differently. It is file-level merge, not automatic line-level conflict resolution.
Programs run with exact argument boundaries, without a shell by default. Use -- if needed:
chrono run -- python "my agent.py" A successful run saves a post-command snapshot before printing COMMIT. On failure:
Intentional shell execution must pass one quoted string. In Windows CMD:
chrono run --shell "echo hello" In Unix, the shell is /bin/sh; in Windows it is CMD/COMSPEC, not the invoking PowerShell. Batch files require explicit shell mode. --force bypasses the advisory detector, NOT OS permissions; never use it just to suppress a warning on an untrusted command.
Every action that changes state, plus every risk scan, is appended to .chrono/audit.jsonl: who ran it, when, from which host and folder, which snapshot it produced, the risk score of any command, and the outcome (ok, blocked, aborted, uncommitted, rolled back).
chrono audit " newest 25 records chrono audit -n 0 " all records chrono audit --action run.commit chrono audit --verify " check the chain for tampering chrono audit --csv --out audit-report.csv chrono audit --json --out audit-report.json Each record stores the digest of the record before it, so editing, deleting or reordering an entry breaks the chain and --verify reports the first bad record. Every snapshot also stores the log head that existed when it was taken, so a log that was rewritten and re-chained still fails the cross-check (snapshot anchors do not match the log).
To make records unforgeable for anyone who only has the files, set a signing key before the first action and keep it somewhere else (a secret manager, not this folder):
set CHRONO_AUDIT_KEY=copy-the-long-secret-from-your-vault Digests then become HMACs; without the key, --verify fails loudly instead of reporting a clean chain. Attribution for AI use is taken from the environment:
set CHRONO_MODEL=claude-3.5-sonnet set CHRONO_AGENT=cursor Those two fields are written into every later record, so a report shows which model and which client did what. They are self-reported labels, not proof.
chrono demo "fix login page and update database" The older quoted-task shorthand still works. Demo runs in an isolated temporary folder and is fully scripted: there is no real AI, login test or database migration. Demo menu letters differ from real run: u undo failed step, d diff, r scripted retry, f full rollback. Demo files remain in the printed temporary path for inspection.
from chrono_agent import Transaction with Transaction(".", "trusted agent") as tx: # make first set of local file edits tx.savepoint("models") # make another set of edits # tx.rollback_to("models") preserves the first set # exception: restore BEGIN; successful exit: save COMMIT Later named savepoints are invalidated after rollback to an earlier one. Duplicate names are rejected. A failed commit triggers recovery; if recovery also fails, the error preserves the original exception as its cause. Locks prevent another cooperating Chrono process from changing the same project's state during a transaction.
After extracting the ZIP, in the extracted package folder:
python -m unittest discover -s tests -v Tests use temporary projects and safe child scripts, not your real project. Test results and verification environment are in VERIFICATION.md.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




