Hosted onhyper.mediavia theHypermedia Protocol

Seed CLIConnect to a Seed Server from the Command line

    You can now access many Seed Hypermedia features from the command line.

    Overview

      The Seed CLI is a command-line interface for interacting with the Seed Hypermedia network. It allows you to fetch documents, search content, manage accounts, and perform various operations on the hypermedia network.

      Seed servers are open source and self-hostable servers running on the peer-to-peer Hypermedia network. You can use the CLI to interact with any Seed server using its API.

      Browse the open source Seed Hypermedia repository here: https://github.com/seed-hypermedia/seed

      Learn more at https://seed.hyper.media

      Download the Seed desktop app: https://download.seed.hyper.media

    Installation

      You can run the Seed CLI directly using npx without installation:

      npx @seed-hypermedia/cli@latest

      If you want to install globally, you can install via npm:

      npm i -g @seed-hypermedia/cli

      Now you have access to the seed CLI:

      seed -—help

    Global Options

      -V, --version: Output the version number

      -s, --server <url>: Server URL (default: "https://hyper.media")

      --json: JSON output (default)

      --yaml: YAML output

      --pretty: Pretty formatted output

      -q, --quiet: Minimal output

      -h, --help: Display help for command

    Commands

      Activity

        activity - List activity events

          View recent activity across the network.

          Options:

            -l, --limit <n>: Page size

            -t, --token <token>: Page token for pagination

            --authors <uids>: Filter by author UIDs (comma-separated)

            --resource <id>: Filter by resource

            -q, --quiet: Output summary only

      Document Operations

        document get <id> - Fetch a document, comment, or entity

          Fetch content by Hypermedia ID.

          Options:

            -m, --metadata: Fetch metadata only

            --md: Output as markdown

            --frontmatter: Include YAML frontmatter (with --md)

            -r, --resolve: Resolve embeds, mentions, and queries (with --md)

            -q, --quiet: Output minimal info

          Example:

          seed document get --md "hm://HYPERMEDIA_URL_HERE"

        document create <account> - Create a new document from markdown

          Publishes a new document under the specified account from markdown content.

          seed document create <account> --path /my-document --body-file content.md --key <keyname>

          The command creates three signed blobs: a genesis change (the document's identity anchor), a document change (containing the actual content operations), and a ref (linking the document to a path and account). These are pushed to the server automatically.

          Options:

            -p, --path <path>: Document path (e.g. "my-document"). Auto-generated from title if omitted.

            --title <title>: Document title (overrides H1 from markdown).

            --body <text>: Markdown content inline.

            --body-file <file>: Read markdown content from a file.

            -k, --key <name>: Signing key name or account ID.

          Example:

          seed document create z6MkAccountUID --path /blog/my-first-post --body-file post.md --key mykey

        document update <id> - Update document metadata or append content

          Modifies an existing document's title, summary, or appends new content blocks.

          seed document update <hm-id> --title "New Title" --key <keyname>
          seed document update <hm-id> --body-file new-section.md --key <keyname>
          seed document update <hm-id> --title "Title" --summary "Summary" --key <keyname>

          The command fetches the current document state, computes the change DAG depth, creates a new signed Change + Ref pair referencing the current heads as dependencies, and submits them to the server.

          Options:

            --title <title>: Set document title.

            --summary <summary>: Set document summary.

            --body <text>: Markdown content to append inline.

            --body-file <file>: Read markdown content to append from file.

            --parent <blockId>: Parent block ID for new content (default: document root).

            --delete-blocks <ids>: Comma-separated block IDs to delete.

            -k, --key <name>: Signing key name or account ID.

        document changes <targetId> - List document change history

          View the change history for a specific document.

          Options:

            -q, --quiet: Output CIDs and authors only

        document stats <id> - Get interaction statistics for a document

          Get metrics and statistics for a specific document.

        document cid <cid> - Fetch raw IPFS block by CID

          Retrieve raw IPFS content by Content Identifier.

      Search and Query

        search <query> - Search for documents

          Search across the hypermedia network.

          Options:

            -a, --account <uid>: Limit search to specific account

            -q, --quiet: Output IDs and titles only

        query <space> - List documents in a space

          Query documents within a specific space.

          Options:

            -p, --path <path>: Path prefix

            -m, --mode <mode>: Query mode: Children or AllDescendants (default: "Children")

            -l, --limit <n>: Limit results

            --sort <term>: Sort by: Path, Title, CreateTime, UpdateTime, DisplayTime

            --reverse: Reverse sort order

            -q, --quiet: Output IDs and names only

        children <space> - List child documents

          Shorthand for query --mode Children.

          Options:

            -p, --path <path>: Path prefix

            -l, --limit <n>: Limit results

            -q, --quiet: Output IDs and names only

        citations <id> - List documents citing this resource

          Find documents that reference or cite a specific resource.

          Options:

            -q, --quiet: Output source IDs only

      Account Management

        account get <uid> - Get account information

          Retrieve information about a specific account.

          Options:

            -q, --quiet: Output ID only

        account list - List all known accounts

          List all accounts known to the system.

          Options:

            -q, --quiet: Output IDs and names only

        account contacts <uid> - List contacts for an account

          Get the contact list for a specific account.

          Options:

            -q, --quiet: Output names only

        account capabilities <id> - List access control capabilities

          View access control permissions for a resource.

      Comments and Discussions

        comment get <id> - Get a single comment by ID

          Retrieve a specific comment.

        comment list <targetId> - List comments on a document

          Get all comments for a specific document.

          Options:

            -q, --quiet: Output IDs and authors only

        comment create <targetId> - Create a comment on a document

          Posts a comment on any document, with optional reply threading.

          seed comment create <target-hm-id> --body "My comment" --key <keyname>
          seed comment create <target-hm-id> --file comment.md --key <keyname>
          seed comment create <target-hm-id> --body "Reply" --reply <comment-id> --key <keyname>

          Options:

            --body <text>: Comment text inline.

            --file <path>: Read comment text from a file.

            --reply <id>: Reply to an existing comment by its ID.

            -k, --key <name>: Signing key name or account ID.

        comment discussions <targetId> - List threaded discussions on a document

          Get threaded discussion view for a document.

          Options:

            -c, --comment <id>: Filter to specific thread

            -q, --quiet: Minimal output

      Key Management

        key - Manage signing keys

          Manage cryptographic keys for signing and authentication.

          Subcommands:

          key generate - Generate a new signing key

            Generate a new signing key from a BIP-39 mnemonic.

            Options:

              -n, --name <name>: Name for the key (default: "default")

              -w, --words <count>: Mnemonic word count: 12 or 24 (default: "12")

              --passphrase <pass>: Optional passphrase for key derivation

              --show-mnemonic: Display the mnemonic (DANGER: write it down securely)

          key import <mnemonic> - Import a key from existing mnemonic

            Import a signing key from an existing BIP-39 mnemonic phrase.

            Options:

              -n, --name <name>: Name for the key (default: "imported")

              --passphrase <pass>: Optional passphrase for key derivation

          key list - List stored signing keys

            Display all stored signing keys.

          key show [nameOrId] - Show key information

            Display information about a specific key or the default key.

            Options:

              --show-mnemonic: Display the mnemonic (DANGER)

          key remove <nameOrId> - Remove a stored key

            Permanently delete a stored signing key.

            Options:

              -f, --force: Skip confirmation prompt

          key default [nameOrId] - Set or show default signing key

            Set the default key for signing operations, or show the current default.

          key derive <mnemonic> - Derive account ID from mnemonic

            Derive and display the account ID from a mnemonic without storing it.

            Options:

              --passphrase <pass>: Optional passphrase for key derivation

      Configuration

        config - Manage CLI configuration

          Configure CLI settings.

          Options:

            --server <url>: Set default server URL

            --show: Show current configuration

    Common Use Cases

      Reading a Document as Markdown

        seed document get --md "hm://document-id-here"

      Reading with Full Context Resolution

        seed document get --md --resolve --frontmatter "hm://document-id-here"

      Searching for Content

        seed search "your search terms"

      Listing Documents in a Space

        seed query "space-id" --sort UpdateTime --reverse

      Getting Account Information

        seed account get "account-uid"

      Viewing Comments

        seed comment list "document-id"

      Managing Keys

        # Generate a new key and show the mnemonic
        seed key generate --name mykey --show-mnemonic
        
        # Import an existing mnemonic
        seed key import -n imported "word1 word2 ... word12"
        
        # List all keys
        seed key list
        
        # Derive account ID without storing
        seed key derive "word1 word2 ... word12"

    Output Formats

      The CLI supports multiple output formats:

        JSON (default): Machine-readable structured data

        YAML: Human-readable structured data (--yaml)

        Pretty: Formatted output (--pretty)

        Markdown: For documents (--md with get command)

        Quiet: Minimal output (--quiet)

    Server Configuration

      By default, the CLI connects to https://hyper.media. You can:

        Use a different server for a single command: -s, --server <url>

        Set a default server: npx -y @seed-hypermedia/cli config --server <url>

        View current configuration: npx -y @seed-hypermedia/cli config --show