palm init
palm init starts a project. It writes palm.yaml with targets:, and adds palm’s two ignore lines to .gitignore.
palm init [--target <ids>] [--here]palm init -g --target <ids>| Command | What it does |
|---|---|
palm init |
Detect the harnesses from folders such as .claude/ and .cursor/, print the evidence for each, and write them as targets:. |
palm init --target claude,codex |
Write exactly these targets. |
palm init --target claude,codex,copilot,cursor,gemini,opencode |
All six. |
palm init --here |
Start a separate project in a folder that sits inside another project. |
palm init -g --target claude,codex |
Write the global targets into ~/.palm/palm.yaml. |
$ palm initi found claude (.claude/), cursor (.cursor/)+ wrote palm.yaml: targets claude, cursor+ wrote .gitignore: .palm/local/, palm.local.yamlnext: see what a source offers, for example: palm install mattpocock/skills$ cat palm.yaml .gitignoretargets: [claude, cursor]node_modules/.palm/local/palm.local.yamlOptions
Section titled “Options”| Option | Meaning |
|---|---|
--target <ids> |
comma-separated: claude, codex, copilot, cursor, gemini, opencode |
--here |
start a separate project in this directory |
The global options also apply.
--target is singular here because it sets the project’s whole list.
On palm install, --targets narrows one entry. Each command accepts the other spelling too.
Behavior
Section titled “Behavior”palm writes targets: to palm.yaml in the current folder and prints the path it wrote.
It adds .palm/local/ and palm.local.yaml to .gitignore, creating the file when there is none.
Those are the only palm paths you do not commit.
Without --target, palm prints each detected target with the file or folder that gave it away, such as cursor (.cursor/).
An AGENTS.md alone marks no target, because several harnesses read it.
On a terminal, palm shows the detected set and lets you change it before it writes.
When the folder holds a skills-lock.json or an apm.yml, palm adds one line: an import command for them arrives in 0.3.
Running palm init again with another --target rewrites targets:.
The next bare palm install writes files for an added target and removes the files of a dropped one.
palm init never writes outside the current folder.
Without --target and with no harness folder to detect, it stops with E_TARGET and names palm init --target.
It refuses your home directory, ~/.palm and every harness home, such as ~/.claude, and names palm init -g --target instead.
With -g, palm init writes targets: into ~/.palm/palm.yaml and touches no .gitignore.
Inside another project
Section titled “Inside another project”A folder inside a project that already has a palm.yaml above it, in the same repository, belongs to that project.
palm init there refuses and names both ways forward.
$ cd packages/jobs && palm initx packages/jobs is inside project ~/project (palm.yaml). Add entries with --at packages/jobs (placed at the root until 0.3), or start a separate project here: palm init --here$ cd packages/jobs && palm init --here --target claude+ wrote packages/jobs/palm.yaml: targets claude+ wrote packages/jobs/.gitignore: .palm/local/, palm.local.yamlnext: see what a source offers, for example: palm install mattpocock/skills--here makes the folder a project of its own, with its own palm.yaml, lock and generated files.
For one root setup with per-package placement, see Monorepos.
Reads and writes
Section titled “Reads and writes”| File | Writes |
|---|---|
palm.yaml |
targets: |
.gitignore |
.palm/local/ and palm.local.yaml, once |
Exit codes
Section titled “Exit codes”| Code | When |
|---|---|
0 |
palm.yaml was written or updated. |
1 |
No target given and none detected. |
2 |
An unknown target, a folder inside another project without --here, or your home directory, ~/.palm or a harness home without -g. |