Commands Reference

Complete reference for all Livedocs CLI commands

This page documents all available commands in the Livedocs CLI.


Authentication

livedocs setup

Pair the CLI with your Livedocs workspace.

livedocs setup

Options:

FlagDescription
--api-token TOKENUse a pre-generated API token instead of browser auth
--no-browserPrint the auth URL instead of opening it automatically

Examples:

# Interactive browser-based authentication
livedocs setup

# Use an API token (for headless servers)
livedocs setup --api-token ldsk_abc123...

# Get the auth URL without opening a browser
livedocs setup --no-browser

livedocs whoami

Display current authentication and workspace information.

livedocs whoami

Shows your workspace ID, workspace name, and account email.


livedocs logout

Remove stored workspace tokens from your system keychain.

livedocs logout

Sessions

livedocs launch

Start a local runtime session for a notebook.

livedocs launch

Options:

FlagDescription
--notebook IDLaunch a specific notebook by ID
--newCreate a new notebook before launching
--import PATHImport a Jupyter .ipynb file (requires --new)
--attachKeep the terminal attached to stream logs

Examples:

# Interactive notebook picker
livedocs launch

# Launch a specific notebook
livedocs launch --notebook abc123

# Create and launch a new notebook
livedocs launch --new

# Import an existing Jupyter notebook
livedocs launch --new --import analysis.ipynb

# Stay attached to see logs
livedocs launch --attach

By default, sessions run detached (in the background). Use --attach to see logs inline and stop with Ctrl+C.


livedocs stop

Stop a running runtime session.

livedocs stop

Options:

FlagDescription
--id IDStop a specific session by ID
--allStop all running sessions

Examples:

# Stop the most recent session
livedocs stop

# Stop a specific session
livedocs stop --id 01234567-89ab-cdef-...

# Stop all sessions
livedocs stop --all

livedocs status

Show installed bundle version and session history.

livedocs status

Options:

FlagDescription
--verboseShow additional troubleshooting details

Displays:

  • Current bundle version
  • Python runtime version
  • Session history table (status, started time, notebook ID, session ID, endpoint, PIDs)

livedocs logs

Tail logs from runtime processes.

livedocs logs

Options:

FlagDescription
--session IDShow logs for a specific session
--target TARGETFilter by process: middleman, jedi, or all

Examples:

# Tail all logs from the current session
livedocs logs

# Logs for a specific session
livedocs logs --session 01234567-89ab-cdef-...

# Only Middleman (runtime) logs
livedocs logs --target middleman

# Only Jedi (AI) logs
livedocs logs --target jedi

Maintenance

livedocs update

Update the CLI to the latest available bundle.

livedocs update

Options:

FlagDescription
--check-onlyCheck for updates without installing
--forceReinstall the current version
--channel NAMESwitch release channel (stable, staging)
--bundle-version VERSIONInstall a specific version

Examples:

# Update to the latest version
livedocs update

# Check if an update is available
livedocs update --check-only

# Reinstall the current version (useful for fixing corrupted installs)
livedocs update --force

# Switch to the staging channel
livedocs update --channel staging

livedocs gc

Garbage collect old sessions and runtime artifacts.

livedocs gc

Options:

FlagDescription
--allRemove all stopped sessions (not just old ones)
--dry-runShow what would be removed without deleting

Examples:

# Clean up sessions older than 7 days
livedocs gc

# Remove all stopped sessions
livedocs gc --all

# Preview what would be removed
livedocs gc --dry-run

Configuration

Environment Variables

VariableDescription
LIVEDOCS_HOMEOverride the root directory (default: ~/.livedocs)
LIVEDOCS_API_BASE_URLOverride the API endpoint
LIVEDOCS_WEB_BASE_URLOverride the web app URL

Config File

Configuration is stored in ~/.livedocs/config.toml:

channel = "stable"
api_base_url = "https://api.livedocs.com"
web_base_url = "https://livedocs.com"

Directory Structure

The CLI stores all data under ~/.livedocs/:

~/.livedocs/
  bin/              # CLI binary symlink
  bundles/          # Downloaded CLI bundles by version
  current/          # Symlink to active bundle
  runtime/          # Python environments and session workspaces
  sessions/         # Session metadata (JSON files)
  logs/             # Log files organized by session
  user_files/       # Persistent working directory for notebooks
  config.toml       # CLI configuration