Help us improve
Share bugs, ideas, or general feedback.
Apple Pages CLI — Control Apple Pages from Claude Code
npx claudepluginhub marcelrgberger/pages-cliApple Pages CLI — Create, edit, format, and export Pages documents directly from Claude Code.
Share bugs, ideas, or general feedback.
Claude Code plugin for full programmatic control over Apple Pages. Create, edit, format, and export Pages documents using slash commands, CLI, or natural language.
Covers 100% of the Pages AppleScript API — every command, class, property, and enum from the Pages scripting definition (sdef).
--json flag on all commands for agent integrationclaude plugins marketplace add marcelrgberger/pages-cli
claude plugins install pages-cli
The CLI backend installs automatically on first /pages use.
git clone https://github.com/marcelrgberger/pages-cli.git
cd pages-cli/agent-harness
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
/pages new Professional Report Create from template
/pages open ~/doc.pages Open existing document
/pages export pdf ~/Desktop/out.pdf Export as PDF
/pages templates Browse 100+ templates
After opening a document, use natural language:
User: Write a title "Q1 Report" in 24pt bold, then add 3 paragraphs about revenue
User: Add a 5x3 table with headers Name, Amount, Date
User: Set the header row background to blue
User: Export as PDF and Word to the Desktop
| Command | Description |
|---|---|
document new [--template T] [--name N] | Create document |
document open <path> | Open .pages file |
document close [--no-save] | Close document |
document save [--path P] | Save document |
document info | Name, pages, words, characters |
document list | List open documents |
document set-password <pw> [--hint H] | Password protect |
document remove-password <pw> | Remove password |
document placeholders | List template placeholders |
document set-placeholder <idx> <tag> | Set placeholder tag |
document get-placeholder <idx> | Get placeholder tag |
document sections | Section count |
document section-text <idx> | Get section body text |
document page-text <idx> | Get page body text |
document delete <type> <idx> | Delete object on page |
| Command | Description |
|---|---|
text add <text> | Append text |
text add-paragraph <text> [styling opts] | Add styled paragraph |
text set <text> | Replace all body text |
text get | Get body text |
text set-font [--name F] [--size S] [--paragraph/--word/--char N] | Set font |
text get-font [--paragraph/--word/--char N] | Get font name |
text get-font-size [--paragraph/--word/--char N] | Get font size |
text set-color --r R --g G --b B [--paragraph/--word/--char N] | Set color (0-65535) |
text get-color [--paragraph/--word/--char N] | Get color |
text bold [--paragraph/--word N] | Set bold |
text italic [--paragraph/--word N] | Set italic |
text bold-italic [--paragraph/--word N] | Set bold+italic |
text style-paragraph <idx> [all styling opts] | Style paragraph |
text style-word <idx> [all styling opts] | Style word |
text style-character <idx> [all styling opts] | Style character |
text word-count | Words, characters, paragraphs |