Skip to content
Leashr

Installation

npx leashr init is the one-command install, from the npm package. The same installer also runs from a clone of the repository, and the skills come as five Claude Code plugins.

Command

shell
npx leashr init
WhatStatusProof
npx leashr initPublishednpm package leashr@0.1.0: --version and init --dry-run run from the registry. uninstall exists from 0.1.1
Installer from a cloneTestedskills/lsh-init/test/init.test.js (24)

Claude Code plugins

The repository is a Claude Code marketplace named leashr with five plugins. Add it once, then install the plugins you need.

shell
claude plugin marketplace add Leashr/leashr-skills
claude plugin install leashr-guard@leashr
The five plugins of the leashr marketplace: skills, install command and dependency
PluginSkillsCommandDepends on
leashr-guardlsh-init, lsh-rules, lsh-cap, lsh-mission, lsh-audit, lsh-status, lsh-learnclaude plugin install leashr-guard@leashrleashr-cost, installed with it
leashr-costlsh-cost, lsh-quota, lsh-syncclaude plugin install leashr-cost@leashrNothing
leashr-shiplsh-prd, lsh-ship, lsh-prove, lsh-review, lsh-prclaude plugin install leashr-ship@leashrNothing
leashr-learnlsh-context, lsh-advisor, lsh-agents, and the commands /lsh-handoff and /lsh-resumeclaude plugin install leashr-learn@leashrleashr-guard, installed with it, and so leashr-cost
leashrAll eighteen skills and the two commandsclaude plugin install leashr@leashrNothing

Each skill is in exactly one of the four bundles; leashr holds all eighteen. Install leashr or the bundles, not both: the same skills would load twice. Skills are named /<plugin>:<skill>. No plugin installs a hook: the rules, cap and journal hooks are written into each project by lsh-init, so a project without .leashr/ is not governed and not blocked.

What works today

From the root of a clone of the Leashr repository, preview the changes first, then apply them to your project. --dry-run writes nothing and prints the diff.

shell
node skills/lsh-init/scripts/init.js --target ../my-project --dry-run
node skills/lsh-init/scripts/init.js --target ../my-project

Expected output (real run on an empty folder):

output
Leashr init (project scope) -> ../my-project
  write     .leashr/rules.json  (default rules)
  write     .leashr/bin/evaluate.js  (runtime copy of lsh-rules/scripts/evaluate.js)
  write     .leashr/bin/cap.js  (runtime copy of lsh-cap/scripts/cap.js)
  ...
  write     .claude/settings.json  (added: PreToolUse (rules), PreToolUse (cap), UserPromptSubmit (cap), PostToolUseFailure (learn), SessionStart, statusLine)
  write     .leashr/.gitignore  (runtime state (statusline cost, collector heartbeat) stays out of git)
  mkdir     .mission/

Spending cap: none set (Leashr does not pick an amount). Set one with:
  node .leashr/bin/cap.js set --mission <usd> --day <usd>

Then check the rules and restart the agent:

shell
node skills/lsh-rules/scripts/rules.js test --rules ../my-project/.leashr/rules.json
output
320/320 cases passed.
Audit: 320 event(s) for 320 decision(s), one per decision, decisions match.
  • Restart Claude Code in the project and accept the folder trust prompt: the statusline, which the cap needs, only runs in a trusted folder.
  • Commit .leashr/ except state/ along with .claude/settings.json. Without the scripts, every clone refuses every tool call (a missing hook script blocks with onFailure: "block").

What init writes

EventCommandOptions
PreToolUseevaluate.jstimeout: 5, onFailure: "block"
PreToolUsecap.js guardtimeout: 10, onFailure: "block"
UserPromptSubmitcap.js prompttimeout: 10, onFailure: "block"
PostToolUseFailurelearn.js recordtimeout: 5
SessionStartmission.js session-starttimeout: 5
statusLinecap.js statuslinerefreshInterval: 2

Each hook runs node on a copy in .leashr/bin/ through $CLAUDE_PROJECT_DIR, so the file holds no machine path. Init is idempotent (a second run changes nothing), merges without removing anything, and stops before writing if a path leaves the target. Exit codes: 0 done, 1 error (nothing written), 3 done with conflicts.

An existing statusline

An existing statusline is never replaced: it is reported as a conflict. To keep it, run init again with --chain-statusline; it is saved in .leashr/statusline-chain.json and run first.

shell
node skills/lsh-init/scripts/init.js --target ../my-project --chain-statusline

Update an installed project

shell
node skills/lsh-init/scripts/init.js --target ../my-project --update-runtime --dry-run

Only the files of .leashr/bin/ are replaced, and only when they are a version Leashr shipped. A file you changed is a conflict; --force replaces it and keeps a .user-backup copy. Your rules.json is never rewritten: the command lists the default rules that are missing or outdated and how to merge them.

Uninstall

npx leashr uninstall removes Leashr from the current project (--target <project> for another one, --dry-run to preview, --purge-audit for the journal). It exists from leashr 0.1.1; 0.1.0 has no uninstall command. The clone command is the same script.

shell
npx leashr uninstall --dry-run
npx leashr uninstall

# from a clone of the repository
node skills/lsh-init/scripts/uninstall.js --target ../my-project --dry-run

Removes what init added to the project and nothing else: the five hooks (a hook of yours, even in the same group, stays), the cap statusline (the one you chained is restored), the unmodified .leashr/bin/ files, default rules.json. Your own rules, cap.json and the audit journal in .mission/events/ are kept; --purge-audit deletes the journal. A modified runtime file is a conflict and stays. A second run changes nothing. User-scope settings are not touched.

The plugins are removed with Claude Code, one by one. This removes the skills, not what init wrote in a project: run npx leashr uninstall for that. To go from leashr to the bundles, or the other way, uninstall first.

shell
claude plugin uninstall leashr-guard@leashr
claude plugin uninstall leashr@leashr

Telemetry for cost (user scope)

Claude Code ignores OpenTelemetry switches in project settings (observed on 2.1.310), so they go in your user settings. Always preview, it is your own configuration:

shell
node skills/lsh-init/scripts/init.js --scope user --target ~/.claude --dry-run

Requirements

  • Node.js to run the scripts. Tested on 24.14.
  • Claude Code. Tested on version 2.1.310 only.
  • Codex, Cursor and Antigravity: init writes no hook configuration for them. See Limits by agent.

Join the waitlist to hear when the hosted dashboard opens.

Join the waitlist