Skip to content

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.

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.

On Linux and macOS:

Terminal window
curl -fsSL https://markdawn.space/install.sh | sh

On Windows PowerShell:

Terminal window
irm https://markdawn.space/install.ps1 | iex

The 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:

Terminal window
markdawn --version

You should see the installed CLI version. If the command is not found, open a new terminal or reload the profile that the installer changed.

Create a named token in Markdawn Settings → API tokens, then run:

Terminal window
markdawn login

For a self-hosted server:

Terminal window
markdawn login --url https://your-markdawn.example.com

Check the connection without printing the token:

Terminal window
markdawn whoami
markdawn doctor
Terminal window
markdawn page list
markdawn page view "Page Title"
markdawn --json page list
markdawn --json page view PAGE_ID

Use page IDs in scripts. Titles are convenient for interactive use but can be ambiguous.

Terminal window
markdawn page create --title "Research Notes" --content-file notes.md

For a small, targeted change:

Terminal window
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.

Terminal window
markdawn import page notes.md
markdawn import folder ./notes
markdawn export page PAGE_ID --output page.md
markdawn export all --output markdawn-export.zip

Install the Markdawn skill for tools that support Agent Skills:

Terminal window
markdawn skill install

The skill gives supported tools instructions for safe page discovery and exact edits. It does not create a separate copy of your pages.

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.