Metakip CLI: Install And Manage Pages
The Metakip CLI lets you use Metakip from a terminal. The browser and CLI use the same content layer, so a page created or edited by the CLI appears in the browser.
Before You Begin
Section titled “Before You Begin”You need a Metakip account and a named API token from Metakip Settings → API tokens. The token is shown only when it is created. Keep it private.
Install The CLI
Section titled “Install The CLI”On Linux and macOS:
curl -fsSL https://metakip.com/install.sh | shOn Windows PowerShell:
irm https://metakip.com/install.ps1 | iexThe installer adds the CLI directory to your shell profile, but profile changes apply only to future sessions. Open a new terminal, or reload the appropriate profile (source ~/.bashrc, source ~/.zshrc, or . $PROFILE in PowerShell), before invoking metakip by name.
Check the installation:
metakip --versionYou should see the installed CLI version. If the command is not found, open a new terminal or reload the profile that the installer changed.
Sign In To Metakip
Section titled “Sign In To Metakip”Create a named token in Metakip Settings → API tokens, then run:
metakip loginFor a self-hosted server:
metakip login --url https://your-metakip.example.comCheck the connection without printing the token:
metakip whoamimetakip doctorRead Pages
Section titled “Read Pages”metakip page search "project notes"metakip page listmetakip page view "Page Title"metakip --json page search "project notes"metakip --json page listmetakip --json page view PAGE_IDpage search searches page titles only and returns at most 20 matching pages, including their
folder paths. Use a returned page ID with page view or another page command. Use page IDs in
scripts; titles are convenient for interactive use but can be ambiguous.
Create And Edit Pages
Section titled “Create And Edit Pages”metakip page create --title "Research Notes" --content-file notes.mdFor a small, targeted change:
metakip page edit exact PAGE_ID \ --old-text "The old exact passage." \ --new-text "The revised passage."Read the page immediately before editing. The CLI refuses to guess if the passage is missing, repeated, or changed.
Import And Export
Section titled “Import And Export”metakip import page notes.mdmetakip import folder ./notesmetakip export page PAGE_ID --output page.mdmetakip export all --output metakip-export.zipAgent Skill
Section titled “Agent Skill”Install the Metakip skill for tools that support Agent Skills:
metakip skill installThe skill gives supported tools instructions for safe page discovery and exact edits. It does not create a separate copy of your pages.
Keep Tokens Safe
Section titled “Keep Tokens Safe”Do not paste a token into a chat, commit it to a repository, or put it directly in a command that could be saved in shell history. For non-interactive use, set METAKIP_TOKEN and, for a self-hosted server, METAKIP_URL in the environment.
Related Guides
Section titled “Related Guides”- Connect AI Assistants To Metakip explains read and write access.
- Markdown Support In Metakip lists supported content syntax.
- API Reference documents the direct HTTP interface.