Use the crafter CLI for installation, authentication, metadata validation, Ship submission, and publishing. Do not implement HTTP or token handling yourself, and do not submit Ships through the website.
Install The CLI
- Verify Node.js 18 or newer is installed with
node --version. If Node.js is unavailable or too old, ask the user to install a supported version from nodejs.org and stop. - Install or update the public CLI before authenticating with
npm install --global @crafter/cli@latest. - Confirm
crafteris available withcommand -v crafter. - Verify the installation with
crafter help.
Do not clone the Crafter repository or invoke its internal source as a substitute for installing the published CLI.
Safety Rules
- Draft first. Never publish in the same step as draft creation.
- Publish only after showing the exact draft and receiving explicit user confirmation.
- Inspect only
README.md,package.json,crafter.ship.json, andgit remote.origin.urlby default. - Never inspect
.env*, credentials, home directories, git history, or arbitrary files. - Tell the user which sources were used. The CLI includes them in
provenance. - Do not invent links or claims. Ask for missing required fields.
Workflow
- Install and verify the CLI as described above.
- Check authentication with
crafter whoami. If login is needed, do not runcrafter loginthrough an agent command tool: ask the user to run it in their own local interactive terminal, keep it running through browser confirmation, and tell you when it printsLogged in.Then retrycrafter whoami. If it returnsmember: null, help the user create their Crafter profile: gatherhandleanddisplayName(plus any optional fields they provide, including structuredoriginLocationandbasedLocationwith city and country), check availability withcrafter handle <handle>, show the exact JSON, and only after explicit approval runcrafter onboard --file <json-file> --confirm. Barecrafter onboardopens the browser form instead. Full onboarding instructions live at crafter.run/join/agent.md. If login fails withinvalid_clientor "The requested OAuth 2.0 Client does not exist", update withnpm install --global @crafter/cli@latestand retry. The public CLI always uses Crafter's production OAuth application; do not ask the user to inspect or change environment variables. - Submit a draft by running
crafter shipfrom the project root. Every Ship submission must use this command orcrafter ship --file <json-file>. - If validation reports missing metadata, create or edit
crafter.ship.jsonwith only the fields the user approves, then runcrafter shipagain. - Present the returned Ship draft and
previewUrlto the user. - Stop and ask whether to publish.
- Only after an explicit yes, run
crafter publish <draft-id> --revision <updatedAt-from-preview> --confirm. If the draft changed, show the new revision and ask again. - Return the published Ship URL.
Publish An Update
- Confirm the Ship is already published and identify its slug.
- Create a JSON file containing a
titleanddescription, then show the exact update to the user. - Stop and ask whether to publish it. Updates are public immediately and cannot be edited.
- Only after an explicit yes, run
crafter update <ship-slug> --file <json-file> --confirm. - Return the published Ship URL.
Optional Config
{
"slug": "project-slug",
"name": "Project name",
"tagline": "A concise description of what it does",
"description": "A public description of at least 20 characters.",
"links": [
{ "type": "repository", "url": "https://github.com/org/repo" },
{ "type": "website", "url": "https://example.com" }
]
}
The CLI validates this file against the same versioned contracts used by the website and API.