Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Sapling

$ sl Official Med Risk
Meta · Code & DevOps · GPL-2.0 · macos / linux / windows

Meta's scalable distributed source control CLI (sl) built to handle massive monorepos and stacked commit workflows, with Git repository compatibility. Supports machine-readable -T json templates and --noninteractive execution alongside visual smartlog navigation.

FCRS-1.0 Score
79 /100
Good
Medium Confidence
Zero-Friction Install
brew install sapling
CLI vs MCP Decision CLI Only

Core VCS CLI; direct sl commands with -T json are far leaner than exposing VCS operations over MCP.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Inherits Mercurial's -T json template engine, revset queries, and --noninteractive flag, though default smartlog/status outputs use Unicode tree art.

  • -T json provides structured JSON across status and log
  • --noninteractive prevents blocking prompts
Trust & Safety 18 / 25

Full VCS mutation capabilities (rebase, hide, push) with undo/smartlog safety, but lacks a universal --dry-run flag across write subcommands.

  • Supports sl undo for local history mistakes, but mutates remote/local stacks
Setup & Portability 12 / 15

Distributed for macOS, Linux, and Windows, though binary footprint is larger and fewer CI images preinstall sl compared to git.

  • Available via Homebrew and releases, less ubiquitous than git
Utility & Efficiency 13 / 15

Excellent revsets and stacked-commit ergonomics for large monorepos.

  • Revset filtering (draft(), ancestors()) reduces log inspection scope
Maintenance & Lineage 9 / 10

Official Meta open-source project (meta/sapling) actively developed for monorepo scale.

  • First-party Meta engineering tool
Docs & Verifiability 8 / 10

Well-organized documentation at sapling-scm.com and built-in sl help topics.

  • Official docs and sl help -v <cmd> reference

Security, Auth & Guardrails

Auth Modes
Config File OS Keychain
Credential Storage

Reads Git/SSH credentials and .sl/config or ~/.config/sapling/sapling.conf settings.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

GPL-2.0 open-source CLI by Meta; free to use.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Sapling (sl) Agent Rules
- Always pass `--noninteractive` and `-T json` on read commands (`sl status`, `sl log`).
- Avoid interactive commands like `sl commit -i` or `sl histedit` without explicit user oversight.
- Pass `-m` on `sl commit` / `sl amend` so an editor is never launched.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect working tree status as JSON
sl status -T json --noninteractive

Returns modified, added, removed, and untracked files in structured JSON without prompting.

Query commit stack log as JSON
sl log -r 'draft()' -T json --noninteractive

Lists draft commits in the local stack using revsets and JSON templating.

Controlled Writes & Previews

Commit staged or working changes with an explicit message
sl commit -m "feat: update module" --noninteractive

Creates a commit non-interactively without opening an editor.

Strengths for Agents

  • + -T json plus revset expressions (draft(), stack()) let agents query exact commit stacks without regex parsing.
  • + --noninteractive and sl undo make headless commit workflows safer.

Caveats & Pitfalls

  • ! Most coding agents default to git conventions; running sl requires repo-specific agent rules.
  • ! Interactive modes (sl commit -i, sl isl) and editors will block unless --noninteractive and -m are provided.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI