---
title: "Install coding.sh: one line, npm or from source"
description: "Install coding.sh with one line, or with npm or from source; check it with doctor and remove it cleanly."
canonical: https://coding.sh/docs/install
human_url: https://coding.sh/docs/install
markdown_url: https://coding.sh/docs/install.md
agents_url: https://coding.sh/agents.md
llms_url: https://coding.sh/llms.txt
updated: 2026-11-11
---

# Install

Install coding.sh with one line, or with npm or from source; check it with doctor and remove it cleanly.

## One line

shell

```
curl -fsSL https://coding.sh/install | sh
```

The script checks for Node 22.15+, installs the latest release with `npm i -g` (from npm once the package is published there, otherwise the GitHub release tarball), runs `coding.sh init` (it detects your agents, shows the plan and asks before writing anything), then opens the viewer. Read it first at [coding.sh/install](https://coding.sh/install).

options

```
CODING_SH_YES=1 sh -c "$(curl -fsSL https://coding.sh/install)"   # no prompt (init --yes)
CODING_SH_VERSION=v0.1.0 ...   # pin a release
CODING_SH_NO_INIT=1 ...        # install only, run init later
CODING_SH_NO_UI=1 ...          # don't open the viewer
CODING_SH_SOURCE=github ...    # skip npm, install the GitHub release tarball
```

## Requirements

- Node.js 22.15 or newer. The index uses the built-in `node:sqlite`, and blobs use the built-in zstd in `node:zlib`, so there are no native dependencies to compile.
- git, for repository snapshots.
- CI runs on Linux, macOS and Windows. On Windows, run the installer from Git Bash (it comes with [Git for Windows](https://gitforwindows.org)). Eval task commands need its `sh` too.

On Windows, CI checks capture from real OpenCode, Pi, Goose, Factory Droid and GitHub Copilot CLI sessions. The other agents have not been checked there yet.

## With npm

The same release tarball the script installs:

shell

```
npm i -g https://github.com/jackulau/coding.sh/releases/download/v0.1.5/coding.sh-0.1.5.tgz
coding.sh init
```

## From source

build from source

```
git clone https://github.com/jackulau/coding.sh
cd coding.sh && npm i && npm run build
```

The CLI builds to `packages/coding.sh/dist/cli.mjs`: one file, zero runtime dependencies. Put it on your shell:

shell

```
# from the repository root: put the CLI on your shell
alias coding.sh="node $PWD/packages/coding.sh/dist/cli.mjs"
coding.sh --version
```

shell

```
npm run build -w coding.sh   # rebuild only the CLI after a git pull
```

## Check the install

`coding.sh doctor` checks every agent it detects, whether hooks are in place, whether the spool and store are writable, and whether the OTLP port is free. Add `--json` for one machine-readable document.

shell

```
coding.sh doctor
```

## Where data lives

Everything is under `~/.coding.sh`. Set `CODING_SH_HOME` to move it (tests and eval runs do).

| Path | Holds |
| --- | --- |
| `bin/hook.sh`, `bin/hook.mjs` | The hook every agent calls: `hook.sh` outside Windows, `hook.mjs` on Windows and for what `hook.sh` hands on. `init` copies them here. |
| `spool/` | Raw hook events, one JSON line each, until ingest. Errors go to `spool/errors.log`. |
| `index.db` | SQLite index: sessions, events, tasks, runs, labels. |
| `blobs/` | Content-addressed, zstd-compressed payloads. |
| `repos/` | Shadow git repositories for snapshots. Your own refs are never touched. |
| `backups/` | A copy of every agent config file before coding.sh edits it. |
| `config.toml` | Your config. `coding.sh config get` prints the effective values. |

Set `CODING_SH_DISABLE=1` in an agent's environment to turn capture off for that process: the hook drains its input and writes nothing.

## Uninstall

shell

```
coding.sh uninstall --dry-run   # show exactly what would be removed
coding.sh uninstall --yes       # remove coding.sh hooks from every agent
npm uninstall -g coding.sh      # remove the CLI
rm -rf ~/.coding.sh             # optional: delete captured data too
```

`uninstall` removes only entries coding.sh added and leaves captured data in place.

To set coding.sh up for a user, follow the agent workflow at [/agents.md](https://coding.sh/agents.md).
