apm init
Synopsis
Section titled “Synopsis”apm init [PROJECT_NAME] [OPTIONS]Description
Section titled “Description”Creates a minimal apm.yml in the current directory or in a new
PROJECT_NAME subdirectory. Auto-detects name, author, and description
so you can start running apm install immediately. Use --plugin to
also scaffold plugin.json for a publishable plugin, or --marketplace
to seed an authoring block for a marketplace.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
PROJECT_NAME | Optional. Name of a new directory to create and cd into. Pass . to initialize in the current directory (same as omitting). Must not contain /, \, or be ... |
Options
Section titled “Options”| Flag | Default | Description |
|---|---|---|
-y, --yes | off | Skip interactive prompts; use auto-detected defaults. Overwrites an existing apm.yml without confirmation. |
--plugin | off | Scaffold a plugin authoring project: also writes plugin.json and adds a devDependencies block to apm.yml. Plugin name must be kebab-case, max 64 chars. |
--marketplace | off | Append a marketplace: authoring block to apm.yml. See Publish to a marketplace. |
--target | (prompt) | Comma-separated target list. Skips the interactive target prompt and writes targets directly. Valid values: copilot, claude, cursor, opencode, codex, gemini, windsurf. |
-v, --verbose | off | Show detailed output. |
Target precedence: --target flag > interactive prompt > auto-detect at
compile time (used with --yes or in non-TTY shells).
Examples
Section titled “Examples”Initialize in the current directory with prompts:
$ apm initSetting up your APM project...Project name: my-appVersion (1.0.0):Description: My APM projectAuthor: aliceAbout to create: name: my-app targets: copilot, claudeIs this OK? [Y/n]: y[+] APM project initialized successfully!Created Files * apm.yml Project configurationNon-interactive scaffold of a new directory:
$ apm init my-app --yes[*] Created project directory: my-app[+] APM project initialized successfully!Created Files * apm.yml Project configurationPlugin authoring project (creates plugin.json plus apm.yml with
devDependencies, version defaults to 0.1.0):
$ apm init my-skill --plugin --yes[+] APM project initialized successfully!Created Files * apm.yml Project configuration * plugin.json Plugin metadataPin targets up front, skip the prompt:
$ apm init --yes --target copilot,claude,cursorBehavior
Section titled “Behavior”- Files created:
apm.ymlalways.plugin.jsonwhen--pluginis set. Themarketplace:block is appended toapm.ymlwhen--marketplaceis set. - Auto-detected fields:
name— fromPROJECT_NAMEor current directory name.author— fromgit config user.name, fallbackDeveloper.description— generated from project name.version—1.0.0(or0.1.0with--plugin --yes).
- Brownfield (existing
apm.yml): prints[!] apm.yml already existsand prompts to overwrite. With--yes, overwrites without asking. - Target seeding on re-init: when
apm.ymlexists, the prompt pre-checks targets read from its existingtarget:field. - Codex hint: if
.codex/is present, suggests--target agent-skillsto also deploy skills to.agents/skills/. - Exit codes:
0on success or user-aborted prompt;1on invalid project or plugin name, or unhandled error.
Related
Section titled “Related”apm install— next step: install dependencies and deploy to targets.- Quickstart — guided first project.
- Concepts: package anatomy —
what goes in
apm.yml.