Skip to content

palm init

palm init starts a project. It writes palm.yaml with targets:, and adds palm’s two ignore lines to .gitignore.

Terminal window
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.
~/project
$ palm init
i found claude (.claude/), cursor (.cursor/)
+ wrote palm.yaml: targets claude, cursor
+ wrote .gitignore: .palm/local/, palm.local.yaml
next: see what a source offers, for example: palm install mattpocock/skills
$ cat palm.yaml .gitignore
targets: [claude, cursor]
node_modules/
.palm/local/
palm.local.yaml
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.

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.

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.

~/project
$ cd packages/jobs && palm init
x 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.yaml
next: 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.

File Writes
palm.yaml targets:
.gitignore .palm/local/ and palm.local.yaml, once
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.