AIline docs

CLI reference

Every command exposed by the ailine entry point. Each entry is one example followed by what changes on disk or in the lineage database. Demo-only commands (init-demo, run, reset-demo) live on the Internals page.

Commands

ailine init-workspace

Bootstrap a project: write a default .ailine.yml, seed .ailineignore, create the .ailine/ state directory, and print the resolved MLflow / storage environment with source labels.

ailine init-workspace
# pass --force to overwrite an existing .ailine.yml or .ailineignore

ailine doctor

Validate .ailine.yml and the local environment. The single source of truth for “is my setup OK”.

ailine doctor
ailine doctor --strict --json

ailine track -- <argv>

Run a command under AIline tracking. Everything after -- is executed verbatim from the repo root (no shell). The lineage row is published as in_progress before the child starts, and the MLflow link appears live in ailine status and the web UI.

ailine track -- python train.py --epochs 5
ailine track --name baseline-A -- python train.py --epochs 5
ailine track --run-name custom-mlflow-name -- python train.py

The lineage row's name defaults to a random adjective-animal label. Use --name for the AIline row, --run-name for the MLflow run name when in wrap mode.

ailine status

List recorded runs. Default output prints the full record id and parent on dedicated lines (copy/paste for restore); --verbose dumps every field including the environment fingerprint.

ailine status
ailine status --verbose

ailine restore <snapshot_id>

Restore the worktree to the exact state captured by <snapshot_id>. Strict sync: extra files in scope are removed; .git and .ailine are always preserved; paths matching .ailineignore are left alone. Aborts on a dirty tree unless --force is passed.

ailine restore 8f3c... --dry-run
ailine restore 8f3c...
ailine restore 8f3c... --force

ailine remove <id>

Delete one lineage record and its on-disk fan-out: the row in .ailine/tree.db, the manifest / metadata / diff files in the storage dir, and any content-addressed objects only this row referenced (shared objects survive). The linked MLflow run is not deleted by default.

ailine remove 8f3c... --dry-run
ailine remove 8f3c...
ailine remove 8f3c... --with-mlflow true

Override the default through cleanup.remove.with_mlflow in .ailine.yml. CLI value wins over YAML, YAML wins over the built-in default of false.

ailine purge

Project-wide reset: removes .ailine/, .ailine.yml, .ailineignore, and any non-default snapshot storage_dir configured outside .ailine/. Leaves mlruns/ and any user code alone. Always asks Confirm? [y/N] before deleting; --dry-run skips the prompt and prints the plan only.

ailine purge --dry-run
ailine purge

ailine serve

Start the AIline Flask app and the MLflow UI subprocess together. Prints both URLs at startup.

ailine serve
# AIline UI: http://127.0.0.1:5000
# MLflow UI: http://127.0.0.1:5001

Recipe: track a run end to end

From a fresh checkout, into a working lineage row plus MLflow run.

cd /path/to/your/repo
ailine init-workspace
ailine doctor
ailine track --name first-run -- python train.py --epochs 5
ailine status

AIline writes a snapshot if the tree is dirty, runs your command, and finalizes the row to done (exit 0) or failed (non-zero). The MLflow column populates mid-flight via link_strategy: tag.

Recipe: restore a previous run

Use ailine status to find the id, preview the plan with --dry-run, then apply.

ailine status
# copy the ID line of the run you want to restore

ailine restore <snapshot_id> --dry-run
# review the write/delete plan

ailine restore <snapshot_id>

The current worktree must be clean (or pass --force to override). .git, .ailine, and anything matching .ailineignore are never touched.