terma install from the root of a repository to bind it to your Terma project. The command writes commit hooks, agent adapter files, and a .terma.toml config, then packages everything into a pull request for your team to review. Once the PR merges, every engineer who pushes commits gets session attribution automatically — no extra steps required per person.
What it does
terma install inspects your repository, determines what needs to be added, and then:
- Binds the repo — Writes
.terma.tomlwith your project ID and repo-level config. - Installs commit hooks — Adds a
prepare-commit-msghook that appendsAgent-Session-IdandAgent-Tooltrailers to each commit, and apost-commithook that spools events for delivery to Terma. - Writes agent adapter files — Drops adapter config for each harness connected on your machine.
- Opens a pull request — All changes land in a PR, not directly on your default branch. Your team reviews and merges at their own pace.
terma install shows you the full plan so you can confirm the changes.
Usage
Flags
string
Specify the Terma project to bind this repository to, skipping the interactive prompt.
flag
Preview the full PR diff without opening a pull request or writing any files. Use this to audit what will change before committing.
What gets written
If your repository uses husky, lefthook, or another hook manager,
terma install detects it and integrates through that manager’s config files rather than writing directly to .git/hooks.terma hook <event>. All attribution logic lives inside the terma binary — the committed files never need to change when you update the CLI, so a terma update on each developer’s machine is all that is needed to pick up new behaviour.
No secrets in the repo
terma install never writes credentials, tokens, or API keys into the repository. The PR contains only hook scripts, adapter configs, and .terma.toml. It is safe to review publicly, merge to open-source repos, and check in to version control.
One PR, whole team
After the PR merges, every engineer who commits to the repo gets attribution traced back to their sessions — no per-person repository setup required. Individual developers still runterma setup on their own machines to bind their identities and connect their local agents.
After merging
Once the PR merges, confirm the repository is wired correctly:Removing
To undo everythingterma install wrote:
terma uninstall removes .terma.toml, the commit hooks, and all agent adapter files that terma install created. It does not touch any files your team added after the merge.