Command-line client
Use the vibecms CLI for site management, posts, assets, and structured output.
Install vibecms-cli from npm to get the vibecms command:
npm i -g vibecms-cli
Or run it without a global install: npx vibecms-cli --help.
From a checkout, build with pnpm --filter vibecms-cli build and run node packages/cli/dist/index.js --help.
Connect
vibecms login --token vc_... [--api-url https://app.vibecms.dev]
vibecms whoami
vibecms site
vibecms activity --limit 20 --offset 0
login saves ~/.vibecms/config.json with restricted permissions. Configuration precedence is flag, environment variable (VIBECMS_API_URL, VIBECMS_TOKEN), config file, then default.
Manage the site
vibecms sites update --expected-updated-at 123 --data '{"name":"Field Notes"}'
vibecms sites theme get
vibecms sites theme update --expected-updated-at 123 --data '{"mode":"dark"}'
vibecms sites theme revert --expected-updated-at 124
vibecms sites voice update --expected-updated-at 0 --data-file voice.json
vibecms sites signup-form update --expected-updated-at 125 --data '{"enabled":true}'
vibecms tags list
vibecms analytics get --range 30
Use --data <json> or --data-file <path> for JSON object requests. Site, theme, and signup form updates require --expected-updated-at from the current settings; voice update requires it too, but the value is voiceProfile.revision from vibecms site — 0 only for a never-configured profile. analytics get accepts 7, 30, 90, 365, or all.
Posts
vibecms posts list --status draft --search notes --limit 20 --offset 0
vibecms posts search notes --limit 20
vibecms posts get post_...
vibecms posts get-by-slug example-post
vibecms posts format-guide --preset minimal
vibecms posts preview post_...
vibecms posts preview --content-file post.md --preset minimal --layout essay --toc true
vibecms posts create --title 'Example' --slug example --content-file post.md
vibecms posts update post_... --expected-version 2 --content-file post.md
vibecms posts versions post_...
vibecms posts version post_... 2
vibecms posts restore post_... 1 --expected-version 2
vibecms posts publish post_... --expected-version 3
vibecms posts schedule post_... --version-number 4 --at 2027-01-15T09:00:00Z
vibecms posts unschedule post_...
vibecms posts rotate-preview post_...
vibecms posts archive post_...
vibecms posts unarchive post_...
For create, use --content <markdown> or --content-file <path>. update accepts those flags when changing the body. Optional post fields are --excerpt, --tags a,b, --cover <assetId|none>, --layout standard|essay|feature|wide, --toc true|false, --seo-title, --seo-description, and --canonical-url <url|none>. create requires --title and --slug; update can also change them. --expected-version binds update, restore, publish, or archive to a saved version — for restore, the positional version selects the historical snapshot while --expected-version guards the current tip. Only posts schedule also accepts --version-number as an alias for that flag. Schedule --at must be an ISO-8601 UTC time ending in Z and in the future.
Assets and schemas
vibecms assets list
vibecms assets get asset_...
vibecms assets upload image.png --alt 'A description'
vibecms assets update asset_... --alt 'A better description'
vibecms assets delete asset_...
vibecms schema
vibecms schema publishPost
Uploads accept PNG, JPEG, WebP, and GIF. schema prints operation metadata as JSON.
Global flags and exit codes
| Flag | Effect |
|---|---|
--api-url <url>, --token <tok> |
Override saved connection settings. |
--json |
Print compact JSON. |
--ndjson |
Print newline-delimited JSON for list output. |
--dry-run |
Print the request without sending it for supported reads and mutations. |
-h, --help, --version |
Show help or version. |
Exit codes are 0 success, 1 other error, 2 usage, 3 authentication or permission, 4 not found, 5 conflict, and 6 rate limit.