Commands
chamoji setup
Set up a repo in one command: releases for each app or package, memory sharing, Claude Code and the commit composer. On a terminal it shows what it found and saves with Enter. Run it again to see where each step stands, or to change something.
SETUP SINCE 0.14.0 MONOREPO-AWARE --json FOR CI AND AGENTSSetup never commits. It writes only the release section of
chamoji.config.json, so review it and commit it yourself.
What it does, in order
- Looks at the repo. Its apps and packages, version files, tags and remotes, from git and the
files, with no AI. With the
ghCLI and a GitHuborigin, it also reads the repo’s squash-merge setting, and gives up on that after 5 seconds. - Says where each step stands. With no step named, a line for releases, memory sharing, Claude Code and the hook: ✓ when it’s done, ○ when it isn’t, and – when it can’t run here. The setup screen shows these itself.
- Asks. On a terminal, the setup screen shows what it found and the questions the
repo can’t answer. Enter saves, c changes something, and Esc cancels.
Without a terminal and without
--yes, it says what it would do and writes nothing. - Writes the release section. Only the
releasesection ofchamoji.config.json. The file’s other keys are kept, and a section with nothing new is left untouched. - Runs the per-clone steps. Memory sharing, Claude Code and the commit composer hook, the ones you picked. The hook is offered, never assumed.
Set up a repo walks through the screen, what setup looks for, and what each step writes.
Arguments
- Name
step- Type
- releases | memory | agents | hook · optional
- Description
Run just this step, such as
chamoji setup releases. Leave it out to run them all. Any other word exits 1. On a terminal, a namedmemory,agentsorhookstep runs without asking.
The four steps:
- Name
releases- Description
Writes the
releasesection. Named, it asks the release questions again, even when the section exists.
- Name
memory- Description
Makes this clone share memory through
origin, aschamoji initdoes. It’s offered only when there is anorigin.
- Name
agents- Description
Connects Claude Code: the MCP server in
.mcp.jsonand a commit hook in.claude/settings.json. It’s offered when the repo has a.claudefolder orclaudeis on your PATH.
- Name
hook- Description
Installs the commit composer hook in this clone, as
chamoji hook installdoes.
Flags
- Name
--yes- Type
- boolean
- Description
Take every recommended answer without asking. It runs the memory and Claude Code steps when they’re offered and not done, and never installs the hook unless you name it:
chamoji setup hook --yes. With a step, it runs just that step. Works with--jsonand--explain.
- Name
--json- Type
- boolean
- Description
Print what setup found and did as JSON on stdout, and nothing else. It never opens the screen. Without
--yesit writes nothing and reports what it would do. With--yesit does it, then reports. The keys arefound,answers,why,steps,wroteandsquashMerge.
- Name
--explain- Type
- boolean
- Description
Print each value of the release section and where it came from: detected in the repo, recommended for its shape, chosen on the screen, or kept from
chamoji.config.json. Works with or without--yes. Under--jsonit prints nothing more; the JSON’swhyholds the same sources.
- Name
--no-update-check- Type
- boolean
- Description
Don’t check npm for a newer chamoji. See the update notice.
Common combinations
chamoji setup
On a terminal: see what it found, change what you need, save with Enter.
chamoji setup --yes
Take every recommended answer, as in a fresh clone or a script.
chamoji setup --json
Let CI or an agent read what setup would do. Nothing is written.
chamoji setup releases --yes --explain
Write the release section, and say where each value came from.
chamoji setup hook --yes
Install the commit composer hook in this clone.
chamoji setup memory
Share memory through origin in this clone, and nothing else.
Output
These are from real runs in two small repos: widgets, a single package, and shop, with two apps and a shared package. The first run in shop, without --yes and with --explain, is on Set up a repo.
In a single package there is nothing to set up for releases. Without a terminal, setup says what else it would do and exits 2:
chamoji setup
✓ releases need no setup in a single package
○ memory sharing is off in this clone
○ Claude Code isn't connected here yet
✓ the commit composer hook is installed in this clone
One package, so chamoji release already knows what to do; there's nothing to set up for releases.
Setup would also share memory through origin, as chamoji init does.
Setup would also connect Claude Code here, as chamoji init --agents does.
chamoji: setup needs a terminal to ask; run chamoji setup --yes to take every recommended answer
With --json, the report is JSON. This is shop before its first setup, trimmed in why. It exits 2, because something would change:
chamoji setup --json
{
"found": {
"kind": "apps",
"units": [
"mobile",
"web"
],
"excluded": [],
"inheritedTags": [],
"upstream": {
"remote": null,
"name": null,
"since": null,
"authors": []
}
},
"answers": {
"schema": 1,
"shape": "apps",
"units": {
"mobile": {
"path": "apps/mobile",
"tag": "mobile/v{version}"
},
"web": {
"path": "apps/web",
"tag": "web/v{version}"
}
},
"exclude": [],
"sharedChanges": "ride-along",
"rootFiles": "none"
},
"why": {
"shape": "detected",
"units": "detected",
…
},
"steps": [
{
"step": "releases",
"result": "written"
},
{
"step": "memory",
"result": "written"
},
{
"step": "agents",
"result": "written"
},
{
"step": "hook",
"result": "offered"
}
],
"wrote": [],
"squashMerge": null
}
Naming the hook step is how --yes installs it:
chamoji setup hook --yes
Installed the hook: /private/tmp/shop/.git/hooks/prepare-commit-msg
A plain `git commit` now opens the composer; -m, merges, amends and rebases are left alone.
Once everything is set up, a re-run only says so, and exits 0:
chamoji setup
✓ releases are set up in chamoji.config.json
✓ memory sharing is on in this clone
✓ Claude Code is connected here
✓ the commit composer hook is installed in this clone
chamoji.config.json is already up to date.
With a section already there, --explain says each value was kept:
chamoji setup releases --yes --explain
release.schema = 1 (the section's format)
release.shape = "apps" (kept from chamoji.config.json)
release.units.mobile.path = "apps/mobile" (kept from chamoji.config.json)
release.units.mobile.tag = "mobile/v{version}" (kept from chamoji.config.json)
release.units.web.path = "apps/web" (kept from chamoji.config.json)
release.units.web.tag = "web/v{version}" (kept from chamoji.config.json)
release.exclude = [] (kept from chamoji.config.json)
release.sharedChanges = "ride-along" (kept from chamoji.config.json)
release.rootFiles = "none" (kept from chamoji.config.json)
chamoji.config.json is already up to date.
Exit codes
- Name
0- Description
- Setup saved, or nothing would change.
- Name
2- Description
Something would change, but there is no terminal and no
--yes, or there is--jsonand no--yes. Also when the hook step finds another tool’s hook and leaves it alone, and for areleasesection from a newer chamoji.
- Name
1- Description
You cancelled, the step name is unknown, or a step failed, such as memory sharing that can’t reach
origin. Also outside a git repo.
Exit codes has every command’s codes.