Local execution VCS for autonomous coding workflows on one machine.
Project description
lit
lit is a local execution VCS for autonomous coding workflows on one machine.
It is local-only, offline-first, and intentionally narrower than Git. Repository data lives inside a deterministic .lit/ folder, and once lit is installed it does not depend on remotes, cloud sync, accounts, or a background service.
What lit does today
- Core local workflow:
init,add,commit,log,status,diff,restore,checkout,branch,merge, andrebase. - Safety and workflow control:
checkpoint,rollback,verify,lineage,artifact,gc,doctor, andexport. - Optional desktop GUI:
lit-guiwhen installed with theguiextra. - Machine-readable output: many automation-oriented commands support
--json.
Design boundaries
- No
push,pull,fetch, orclone. - No hosted collaboration model.
- No login, token, or permissions system.
- One repository lives inside one working tree on one computer.
exportis a compatibility bridge, not Git parity.
Install
lit requires Python 3.11+.
The recommended workflow is an editable install into a virtual environment. This installs the lit command (a console script) into that environment, so you can run lit ... once the environment is active.
1) Create and activate a virtual environment
macOS/Linux:
python -m venv .venv
source .venv/bin/activate
Windows PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
If activation is blocked by your PowerShell execution policy, run:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
2) Install (CLI-only)
python -m pip install -e .
You can now run either:
lit --help
python -m lit --help
python -m lit is the no-PATH fallback and always runs lit using the current Python interpreter.
If you want a regular non-editable install from a checkout instead, use:
python -m pip install .
3) Optional: install the desktop GUI
From a repository checkout (editable install):
python -m pip install -e ".[gui]"
From PyPI:
python -m pip install "jakal-lit[gui]"
Launch the app with:
lit-gui
If lit-gui is not on your PATH, you can launch the same app with:
python -m lit_gui.app
4) Build a wheel or source distribution
If you want to produce installable artifacts for another environment:
python -m pip install build
python -m build
This creates files under dist/, for example:
dist/jakal_lit-1.0.0-py3-none-any.whl
dist/jakal_lit-1.0.0.tar.gz
Install from the wheel with:
python -m pip install dist/jakal_lit-1.0.0-py3-none-any.whl
PATH notes (especially on Windows)
If lit is not found after installing, it usually means you are running a different Python environment than the one you installed into (for example: a different venv, or no venv). Use python -m lit ... to avoid PATH issues, and prefer python -m pip ... so you install into the same interpreter you are running.
Published package name
The PyPI distribution name is jakal-lit.
Install commands for published releases are:
python -m pip install jakal-lit
python -m pip install "jakal-lit[gui]"
The installed commands are still lit and lit-gui.
Quick start
mkdir demo-project
cd demo-project
lit init
Expected output:
Initialized empty lit repository in /path/to/demo-project/.lit
You can also choose the initial branch name:
lit init --branch trunk
Re-running lit init in the same folder keeps the repository and prints a reinitialization message.
Command groups
Core workflow
lit init [path]initializes a repository in the target folder.lit addstages files or directories.lit commit -m <message>creates a revision from the index.lit logshows commit history.lit statussummarizes the working tree.lit diffshows changes against the last commit.lit restorerestores tracked files from a revision without movingHEAD.lit checkoutswitches the working tree to a branch or detached revision.lit branchlists branches or creates a new local branch.lit mergemerges another local revision into the current branch.lit rebaserebases the current branch onto another local revision.
Safety and workflow control
lit checkpoint create|list|show|latestrecords safe boundaries for rollback, review, and lineage work.lit rollbackrestores the working tree to the latest safe checkpoint or a selected checkpoint.lit verify run|statusrecords or inspects verification results for a revision, checkpoint, or lineage head.lit lineage list|show|create|switch|promote|discardmanages isolated lineages for parallel local work.lit lineage workspace materialize|create|attach|list|gcmanages materialized workspace records.lit artifact list|show|link|usageinspects artifact manifests and ownership links.lit gcinspects or collects reclaimable global artifact objects.lit doctorinspects repository health, locks, and unfinished transactions.lit exportbuilds a Git-facing export plan for compatibility workflows.
Many of these commands also support --json and are intended to expose the same canonical repository snapshot and blockage diagnostics that the GUI uses.
Beginner workflow
This is the everyday local flow the tool is built around:
lit initto create the repository.lit addto stage changes.lit commit -m "message"to save a checkpoint.lit branch feature-nameto create a side branch.lit checkout feature-nameto switch to it.lit merge feature-nameorlit rebase mainto bring work back together locally.lit restore <path>to discard a local file change.
Repository layout
After lit init, the repository contains:
.lit/
HEAD
config.json
index.json
objects/
blobs/
commits/
trees/
refs/
heads/
tags/
checkpoints/
safe/
state/
merge.json
rebase.json
v1/
revisions/
checkpoints/
lineages/
verifications/
artifacts/
workspaces/
operations/
journals/
locks/
Notable details:
config.jsonstoresdefault_branchandschema_version..lit/config.jsonis also the explicit policy surface for verification, checkpoint, artifact, lineage, and resumable operation defaults.HEADpoints torefs/heads/<branch>until you detach it to a revision.- Object identifiers are SHA-256 hashes of raw bytes.
- The richer
v1/records cover revisions, checkpoints, lineages, verifications, artifacts, workspaces, operations, journals, and locks.
Policy config
lit loads machine-facing policy from .lit/config.json. The current policy groups are:
verification: default definition name and command, cache behavior, and whether verification is required before commit.checkpoints: safe-by-default behavior, approval requirements, and auto-pinning for safe checkpoints.artifacts: artifact storage location and rollback preservation behavior.lineage: default base checkpoint strategy, owned-path enforcement, overlap allowlists, and affected-lineage scope defaults.operations: whether merge/rebase resume is allowed, how safe rollback targets are chosen, and whether blockage reasons are exposed.
These settings are consumed through src/lit/config.py and surfaced through the shared backend service instead of being inferred separately by CLI and GUI callers.
Architecture notes
The current v1 structure is intentionally split across a few boundaries:
src/lit/domain.pydefines the canonical records for revisions, checkpoints, lineages, verifications, resumable operations, and repository snapshots.src/lit/backend_api.pyis the shared service boundary for CLI, GUI, and automation-oriented JSON surfaces.src/lit/workflows.pyowns merge, rebase, checkpoint, rollback, verification, and resume/abort orchestration.src/lit/repository.pyremains the storage and mutation engine under that service layer.src/lit_gui/session.pywraps the same backend service rather than shaping repository state independently.
If you are adding features, prefer extending these shared contracts and service paths instead of inventing CLI-only or GUI-only state models.
Recovery and operator guidance
- Run
lit doctor --jsonwhen automation needs a machine-readable reason for why work is blocked. - Active merge and rebase state include resumable operation metadata, conflict paths, and the current safe rollback target.
lit rollbackuses the configured safe checkpoint preference, so the default recovery target can be lineage-scoped or repository-wide by policy.- Use
lit checkpoint create --jsonbefore high-risk changes when you want an explicit rollback boundary that external orchestration can record.
Local docs site
The repository also includes a simple static site in website/.
- Open
website/index.htmldirectly in a browser. - Or serve it locally with
python -m http.serverand open the URL it prints. - No build step, package manager, or framework is required.
Limitations and non-goals
Current limits:
litis still a local-first tool, not a hosted collaboration platform.- There is no remote repository workflow.
- Some compatibility surfaces, like
export, are bridges rather than full Git parity. - GUI support is optional and requires the
guiextra.
Non-goals:
- Hosted sync or remote collaboration
- Accounts, authentication, or permissions infrastructure
- Background daemons or heavy server-side services
Verification
Run the test suite with:
python -m pytest
Run the supported multi-version matrix with:
python -m pip install -e ".[dev]"
python -m tox
tox targets Python 3.11, 3.12, 3.13, plus a packaging check environment. Missing local interpreters are skipped so one machine can still exercise the subset it has installed.
Release and publish steps are documented in docs/releasing.md.
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 jakal_lit-1.0.0.tar.gz.
File metadata
- Download URL: jakal_lit-1.0.0.tar.gz
- Upload date:
- Size: 156.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15b4409ce89254e8f9113781181f72e6c1cfbe2bc9c4cd80f4251976430ec5e2
|
|
| MD5 |
94f6ab2af10f49cfb7ae0b1949d60c15
|
|
| BLAKE2b-256 |
a9ae24f10906c6090935cf458a703b1862fc7820d99310755eb3a593c41589b6
|
File details
Details for the file jakal_lit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: jakal_lit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 141.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b74acacc239a1f42371fc5cde31ae76b1f5ded2ec7a4933876a963f1f13e83dd
|
|
| MD5 |
a9531824fb4a011335a6b26ffa811397
|
|
| BLAKE2b-256 |
87a6aa39a7789fcb535eb109fed8c8bb7c0ed713559d3aef8b022e8872e3af2a
|