Detection
On startup, Lift walks up the directory tree from the working directory looking for VCS markers in priority order:
.sl — Sapling
.git — Git
.hg — legacy Sapling (Mercurial heritage)
If both .sl and .git exist in the same ancestry, Sapling takes precedence.
Detection runs once per invocation and is cached for the lifetime of the process.
Supported operations
Every tool in the pipeline uses the same VCS abstraction. The underlying commands differ per backend, but the behavior is identical.
| Operation | Git | Sapling |
|---|
| Current commit hash | git rev-parse HEAD | sl log -r . -T {node} |
| Main branch hash | git rev-parse <branch> | sl log -r <branch> -T {node} |
| Working directory status | git status --porcelain | sl status |
| Commit message | git log -1 --format=%B | sl log -r . -T {desc} |
| Commit diff | git show HEAD | sl show |
| Amend commit | git commit --amend | sl amend |
| Submit PR | gh pr create [--draft] --fill | sl pr submit [--draft] |
The main branch name defaults to main and can be overridden via the main_branch config setting. PR draft mode is controlled by the pr.draft config setting.
Pull request workflow
The --pr flag triggers PR creation or update after the pipeline finishes. The workflow differs by backend.
Sapling
Sapling has native PR support. Lift calls sl pr submit --draft directly.
Git
Git PR submission requires the GitHub CLI (gh). When you submit a PR through Lift:
- Pushes the current branch with
git push --force-with-lease -u origin HEAD
- Checks whether a PR already exists for the branch
- Creates a new draft PR, or updates the existing one
If gh is not installed, Lift prints the manual command and continues without creating the PR.
Dependency validation
Lift checks for required dependencies on startup:
| Dependency | Required | Purpose |
|---|
sl | When Sapling is detected | All VCS operations |
git | When Git is detected | All VCS operations |
gh | Optional (Git only) | PR creation and updates |
claude | Always | AI-powered commit messages and documentation |
Missing required dependencies cause Lift to exit with installation instructions. Missing optional dependencies produce a warning.
Commit tracking
Lift tracks which commits each tool has processed in ~/.taho/lift/:
~/.taho/lift/ink # Commits processed by Inky
~/.taho/lift/doc # Commits processed by Doc
Tracking is VCS-agnostic — it stores commit hashes regardless of backend. This means switching between Git and Sapling on the same repository preserves processing history as long as commit hashes remain stable.
Preconditions
Before running the pipeline, Lift verifies:
- Clean working directory — uncommitted changes cause an error
- Not on main — Lift refuses to amend commits on the main branch
- Non-empty diff — tools skip commits with no changes