Markdawn CLI: Install And Manage Pages
The Markdawn CLI lets you use Markdawn 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 Markdawn account and a named API token from Markdawn 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://markdawn.space/install.sh | shOn Windows PowerShell:
irm https://markdawn.space/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 markdawn by name.
Check the installation:
markdawn --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 Markdawn
Section titled “Sign In To Markdawn”Create a named token in Markdawn Settings → API tokens, then run:
markdawn loginFor a self-hosted server:
markdawn login --url https://your-markdawn.example.comCheck the connection without printing the token:
markdawn whoamimarkdawn doctorRead Pages
Section titled “Read Pages”markdawn page listmarkdawn page view "Page Title"markdawn --json page listmarkdawn --json page view PAGE_IDUse page IDs in scripts. Titles are convenient for interactive use but can be ambiguous.
Create And Edit Pages
Section titled “Create And Edit Pages”markdawn page create --title "Research Notes" --content-file notes.mdFor a small, targeted change:
markdawn 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”markdawn import page notes.mdmarkdawn import folder ./notesmarkdawn export page PAGE_ID --output page.mdmarkdawn export all --output markdawn-export.zipAgent Skill
Section titled “Agent Skill”Install the Markdawn skill for tools that support Agent Skills:
markdawn 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 MARKDAWN_TOKEN and, for a self-hosted server, MARKDAWN_URL in the environment.
Related Guides
Section titled “Related Guides”- Connect AI Assistants To Markdawn explains read and write access.
- Markdown Support In Markdawn lists supported content syntax.
- API Reference documents the direct HTTP interface.