Skip to content

CLI toolkit for Seed Hypermedia - headless document management, publishing, and archiving

Notifications You must be signed in to change notification settings

ion-kitty/ion-hm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ion-hm ⚡

A command-line interface for Seed Hypermedia - manage documents, keys, and the P2P daemon.

Features

  • Daemon Management - Start, stop, restart, and monitor the seed daemon
  • Document Operations - Create, read, update, delete documents
  • Key Management - Generate and manage signing keys
  • Web of Trust - Manage contacts and subscriptions
  • Branching - Git-like document forking and versioning
  • Refs & Redirects - URL management and content linking

Installation

# Clone and install
git clone https://github.com/ionbobcat/ion-hm.git
cd ion-hm
npm install
npm link  # Makes 'ion-hm' available globally

Quick Start

# Check daemon status
ion-hm status

# Start the daemon
ion-hm start

# Generate a signing key
ion-hm keys generate my-key

# Create a document
ion-hm create my-key "Hello World" "My first document!"

# Read a document
ion-hm get hm://z6Mk.../my-doc

# Stop the daemon
ion-hm stop

Daemon Management

ion-hm status              # Check if daemon is running
ion-hm start               # Start the daemon
ion-hm stop                # Stop the daemon
ion-hm restart             # Restart the daemon
ion-hm logs                # View daemon logs
ion-hm logs -f             # Follow logs in real-time

Custom Daemon Configuration

ion-hm start --daemon-path /path/to/seed-daemon --data-dir ~/.my-seed-data

Document Operations

# Read
ion-hm get <hm://url>                    # Fetch document
ion-hm get <hm://url> --md               # Output as markdown
ion-hm info <hm://url>                   # Get metadata only
ion-hm list <account>                    # List documents in account
ion-hm history <hm://url>                # Show version history

# Write
ion-hm create <key> <title> [content]    # Create new document
ion-hm create-from-md <key> <file>       # Create from markdown
ion-hm create-from-json <key> <file>     # Create from JSON structure
ion-hm update <key> <url> --add-block    # Add content to document
ion-hm update-from-json <key> <file>     # Replace content from JSON
ion-hm delete <key> <url>                # Delete document

Key Management

ion-hm keys list                         # List all keys
ion-hm keys generate <name>              # Generate new key
ion-hm keys generate <name> --show-mnemonic  # Show recovery phrase

Web of Trust

ion-hm contacts                          # List contacts
ion-hm contact-add <account>             # Add contact
ion-hm contact-remove <id>               # Remove contact
ion-hm subscriptions                     # List subscriptions
ion-hm subscribe <account>               # Subscribe to account
ion-hm unsubscribe <account>             # Unsubscribe
ion-hm trust <account>                   # Add + subscribe (full trust)

Branching & Refs

Fork documents like git branches:

ion-hm branch <key> <source-url> <dest-path>   # Fork a document
ion-hm redirect <key> <from-path> <to-url>     # Create redirect
ion-hm ref-info <ref-id>                       # Get ref details

Global Options

-d, --daemon <url>    # Daemon gRPC URL (default: localhost:55002)
-s, --server <url>    # Server URL for reads (default: https://hyper.media)
--json                # Output as JSON
--quiet               # Minimal output

Configuration

Create ~/.config/ion-hm/config.json:

{
  "daemonPath": "/path/to/seed-daemon",
  "dataDir": "~/.seed-daemon",
  "grpcPort": 55002,
  "httpPort": 55001,
  "env": {
    "SEED_FILE_KEYSTORE": "1"
  }
}

Requirements

  • Node.js 18+
  • grpcurl (for gRPC communication)
  • Seed daemon binary (for daemon management)

License

MIT

Author

Built by IonBobcat ⚡

About

CLI toolkit for Seed Hypermedia - headless document management, publishing, and archiving

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published