@pagesmith-ai/cli
v0.2.0
Published
CLI for managing Pagesmith sites — pull, push, deploy from your terminal
Maintainers
Readme
Pagesmith CLI
Manage Pagesmith websites from your terminal — pull, edit, push, deploy. Works standalone or inside AI coding tools like Claude Code and Cursor.
Install
npm install -g @pagesmith-ai/cliRequires Node.js 20 or newer.
Authenticate
Get an API key at https://app.pagesmith.ai/settings/api-keys, then:
pagesmith auth <your-api-key>Or set PAGESMITH_API_KEY in your environment. The saved config lives at ~/.pagesmith/config.json with 0600 permissions.
Typical workflow
pagesmith projects # list your projects
pagesmith pull my-site # downloads to ./my-site/
cd my-site
# ...edit files with any tool...
pagesmith status # see changed files
pagesmith push --message "Refine hero copy" # commit, build, deploy preview
pagesmith publish # publish to productionMost commands auto-detect the project from .pagesmith.json in the current directory. You can also pass a project name or UUID explicitly.
Commands
Workspace
| Command | Description |
|---|---|
| pull <name-or-id> [--dir <path>] | Download project files to a local directory |
| status | Show modified / added / deleted files |
| push --message "..." | Push changes, build preview, auto-fix build errors |
| deploy | Rebuild preview without file changes |
| publish [--domain example.com] | Publish to production |
| history [--limit N] | Show commit history (default 20, max 100) |
| prompt "your prompt" | Send natural-language edits to Pagesmith AI |
Content collections
| Command | Description |
|---|---|
| content | List content collections and their schemas |
| content <collection> | List posts in a collection |
| content <collection> get <slug> | Print a post |
| content <collection> create --slug s --title t [--body file.md] [--field k=v] | Create a post |
| content <collection> update <slug> [--title ...] [--body ...] [--field k=v] | Update a post |
| content <collection> delete <slug> | Delete a post |
Domains
| Command | Description |
|---|---|
| domains | List custom domains |
| domains connect <domain> [--method nameserver\|cname] | Connect a custom domain |
| domains verify <id> | Verify DNS ownership |
| domains set-primary <id> | Set primary domain |
| domains refresh-ssl <id> | Refresh SSL certificate |
| domains remove <id> | Disconnect a domain |
Secrets / integrations
| Command | Description |
|---|---|
| secrets | List integrations and secret names |
| secrets set <type> <preview\|production> KEY=VALUE [...] | Set integration secrets |
Other
| Command | Description |
|---|---|
| auth <api-key> | Save API key (prompts interactively if omitted) |
| projects | List your projects |
| version / help | Print version / help |
Environment variables
| Variable | Description |
|---|---|
| PAGESMITH_API_KEY | API key (overrides saved config) |
| PAGESMITH_API_URL | API base URL (default https://app.pagesmith.ai/api/external) |
Examples
Pull and edit:
pagesmith pull acme-landing
cd acme-landing
# edit src/pages/index.astro...
pagesmith push --message "Update hero headline"Create a blog post from a Markdown file:
pagesmith content blog create \
--slug launch-week \
--title "Launch week recap" \
--body ./launch.md \
--field pubDate=2026-04-17 \
--field tags='["launch","product"]'Connect a domain and verify it:
pagesmith domains connect acme.com --method nameserver
# update nameservers with your registrar, then:
pagesmith domains verify <domain-id>
pagesmith domains set-primary <domain-id>License
MIT — see LICENSE.
