Skip to content

CLI

Publish, pull, and manage elephant.md documents from your terminal.

Get Started

  1. 1
    Run

    No install needed — just run:

    npx elephant-md

    Or install globally for the shorter tusk command:

    npm i -g elephant-md
  2. 2
    Log in
    npx elephant-md login github

    Or use npx elephant-md login google for Google OAuth.

  3. 3
    Push a document
    npx elephant-md push README.md

push

Publish or update a markdown file on elephant.md.

npx elephant-md push <file> [options]

Options

  • --title — Document title (defaults to first H1 or filename)
  • --slug — URL slug
  • --category — Category (guide, reference, tutorial, blog, note, snippet, doc)
  • --description — Short description
  • --tags — Comma-separated tags
  • --visibility — public, unlisted, or private

pull

Download a document to a local file. Accepts a full URL or @user/slug shorthand.

npx elephant-md pull @user/slug -o output.md

install

Install a document into your agent's context. Use --mcp to configure the MCP server instead.

# Install a document
npx elephant-md install @user/slug

# Configure MCP server
npx elephant-md install --mcp

update

Check for and apply upstream updates to installed documents.

npx elephant-md update

list

List your published documents.

npx elephant-md list

share

Create an ephemeral (self-destructing) link from a markdown file.

# View-once — destroyed after first read
npx elephant-md share secret.md --mode viewonce

# Timed — auto-expires after the given duration
npx elephant-md share notes.md --mode timed --ttl 1h
npx elephant-md share notes.md --mode timed --ttl 24h
npx elephant-md share notes.md --mode timed --ttl 7d
npx elephant-md share notes.md --mode timed --ttl 30d

Options

  • --mode <timed|viewonce> — Sharing mode (required)
  • --ttl <1h|24h|7d|30d> — Time-to-live (required for timed mode)

save / unsave

Bookmark or unbookmark a document.

# Bookmark a document
npx elephant-md save @user/slug

# Bookmark and add to a collection
npx elephant-md save @user/slug --to my-collection

# Remove bookmark
npx elephant-md unsave @user/slug

collections

Manage your collections.

# List collections
npx elephant-md collections list

# Create a collection
npx elephant-md collections create "My Collection" --public

# Show collection details
npx elephant-md collections show my-collection

# Add/remove documents
npx elephant-md collections add my-collection @user/slug
npx elephant-md collections remove my-collection @user/slug

# Delete a collection
npx elephant-md collections delete my-collection

whoami

Show the currently authenticated user.

npx elephant-md whoami

Configuration

Auth token and config are stored in ~/.tusk/config.json. The token is saved after login and used automatically for all authenticated commands.

Categories

Available categories: guide, reference, tutorial, blog, note, snippet, doc.