Threadmark is installed once per user account, then activated in each project you want it to observe.
Follow the steps in order.
- macOS or Linux
- Homebrew, or Go 1.24 or newer for the
go installpath - Claude Code if you want Claude Code hooks
- Codex if you want Codex hooks
- A working
claude -pcommand if you want journal entries written
The reflector uses the Claude CLI. Codex can emit events and receive startup
packets, but journal reflection currently goes through claude -p.
The recommended install path is Homebrew:
brew install --cask thinkwright/tap/threadmarkThis installs both threadmark and threadmarkd.
If you prefer go install:
go install github.com/thinkwright/threadmark/cmd/threadmark@latest github.com/thinkwright/threadmark/cmd/threadmarkd@latestGo chooses the install directory. It uses GOBIN when it is set; otherwise it
uses $(go env GOPATH)/bin, usually $HOME/go/bin. You do not need to create
that directory first.
After this command completes, you should have:
<go-bin-dir>/threadmark
<go-bin-dir>/threadmarkd
For a pinned install, replace @latest with a release tag.
The shell that launches Claude Code or Codex must be able to find threadmark.
Homebrew normally links the binaries into its bin directory automatically.
If your shell cannot find threadmark after a Homebrew install, check that your
Homebrew bin directory is on PATH. On Apple Silicon macOS this is usually
/opt/homebrew/bin; on Intel macOS it is usually /usr/local/bin.
For the go install path, if you have not customized GOBIN, add Go's default
bin directory:
export PATH="$(go env GOPATH)/bin:$PATH"Then check:
command -v threadmark
command -v threadmarkdRun:
threadmark version
threadmarkd --version
threadmark helpthreadmarkd is the per-user daemon shared by all projects. It may be stopped
until threadmark activate or the first hook event starts it. Project
separation happens under ~/.threadmark/projects/<project-id>/.
Go to the project you want Threadmark to observe:
cd ~/code/my-projectActivate Threadmark:
threadmark activateThis writes project-local harness configuration and makes the per-user daemon ready:
.claude/settings.json
.codex/hooks.json
For launchers and automation:
threadmark activate --quietFor user-level hook config instead of project-local config:
threadmark activate --scope userCodex requires explicit manual hook trust for project hooks. After activating a project, open Codex in that project and run:
/hooks
Review and trust the Threadmark hooks. Threadmark should not bypass this trust step.
Claude Code does not require the same /hooks trust review in the current
workflow.
From the activated project:
threadmark doctordoctor checks storage permissions, daemon reachability, project state, journal
presence, hook config, reflector mode, reflector command, and reflector prompt.
A fresh project may warn that state or journal files are missing until hook
events arrive and a checkpoint fires. That fresh-project state is expected; the
important setup signal is 0 fail.
Known limitation: doctor can verify that Codex hook config exists, but it
cannot prove that Codex project hooks have been trusted in the interactive
/hooks UI.
Use this path when you are developing Threadmark from a local checkout.
From a Threadmark checkout:
go build -o bin/threadmark ./cmd/threadmark
go build -o bin/threadmarkd ./cmd/threadmarkd
bin/threadmark installFor a different install directory, choose a directory your user can write to:
bin/threadmark install --bin-dir /usr/local/binThen return to step 2 and make sure the chosen directory is on PATH.
Repeat the install command or source checkout install. If you installed with Homebrew, run:
brew upgrade --cask thinkwright/tap/threadmarkIf a daemon is already running during an upgrade, restart it once so future events use the upgraded daemon binary:
threadmark daemon restartThe daemon is shared across projects, so one restart updates all future hook handling.
Stop the daemon:
threadmark daemon stopRemove installed binaries:
go_bin="$(go env GOBIN)"
if [ -z "$go_bin" ]; then go_bin="$(go env GOPATH)/bin"; fi
rm -f "$go_bin/threadmark" "$go_bin/threadmarkd"If you installed with Homebrew instead:
brew uninstall --cask thinkwright/tap/threadmarkRemove project hooks manually from any project where you activated Threadmark:
.claude/settings.json
.codex/hooks.json
Remove local Threadmark state only if you want to delete journals and daemon data:
rm -rf "$HOME/.threadmark"