Documentation

Pamie command-line reference

Pamie runs as a server process and also includes local operator commands for backups, restores, and embedding backfill. This page collects the current command-line options, environment variables, and command help in one place.

CLI help Server options Operator commands

Install

Use Homebrew for the simplest local install:

brew install kurocho/tap/pamie
pamie --version

Create one local token file and reuse it for the binary, Docker, and MCP client configuration:

if [ ! -f .pamie.env ]; then
  umask 077
  printf "PAMIE_TOKEN=%s\nPAMIE_TOKEN_ID=local\nPAMIE_TOKEN_SCOPES=all\n" \
    "$(openssl rand -hex 32)" > .pamie.env
fi

set -a
. ./.pamie.env
set +a
printf "MCP endpoint: http://127.0.0.1:8080/mcp\nBearer token: %s\n" "$PAMIE_TOKEN"

Keep `.pamie.env` local and out of version control. For production, put these values in your service manager or secret store instead of printing tokens to logs.

Run with Docker when you want an isolated container and persistent `/data` volume. Docker can read the same token file:

docker volume create pamie-data

docker run --rm \
  --name pamie \
  -p 127.0.0.1:8080:8080 \
  -v pamie-data:/data \
  --env-file .pamie.env \
  kurocho/pamie:latest

Server quickstart

if [ ! -f .pamie.env ]; then
  umask 077
  printf "PAMIE_TOKEN=%s\nPAMIE_TOKEN_ID=local\nPAMIE_TOKEN_SCOPES=all\n" \
    "$(openssl rand -hex 32)" > .pamie.env
fi

set -a
. ./.pamie.env
set +a
printf "MCP endpoint: http://127.0.0.1:8080/mcp\nBearer token: %s\n" "$PAMIE_TOKEN"

pamie \
  --addr 127.0.0.1:8080 \
  --data-dir ./data

Check the server:

curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/ready

Server options

FlagEnvironmentDescription
--versionn/aPrint version and exit.
--addrPAMIE_ADDRHTTP listen address. Default: 127.0.0.1:8080.
--tokenPAMIE_TOKENBearer token for the protected MCP endpoint.
--token-idPAMIE_TOKEN_IDIdentifier used for the configured Bearer token in audit logs. Default: default.
--token-scopesPAMIE_TOKEN_SCOPESComma-separated scopes or all. Default: all.
--data-dirPAMIE_DATA_DIRDirectory for local Pamie data. Default: data.
--db-pathPAMIE_DB_PATHSQLite database path. Default: data/pamie.db.
--log-levelPAMIE_LOG_LEVELLog level: debug, info, warn, or error. Default: info.
--read-header-timeoutPAMIE_READ_HEADER_TIMEOUTHTTP read header timeout. Default: 5s.
--shutdown-timeoutPAMIE_SHUTDOWN_TIMEOUTGraceful shutdown timeout. Default: 10s.
--mcp-rate-limitPAMIE_MCP_RATE_LIMITPer-client /mcp requests per minute. 0 disables rate limiting. Default: 120.
--mcp-rate-burstPAMIE_MCP_RATE_BURSTPer-client /mcp rate limit burst. Default: 30.
--lifecycle-workerPAMIE_LIFECYCLE_WORKER_ENABLEDEnable scheduled lifecycle evaluation. Default: disabled.
--lifecycle-intervalPAMIE_LIFECYCLE_INTERVALInterval between scheduled lifecycle evaluations. Default: 1h.
--lifecycle-batch-sizePAMIE_LIFECYCLE_BATCH_SIZEMaximum memories evaluated per lifecycle run. Default: 500.
--lifecycle-run-on-startPAMIE_LIFECYCLE_RUN_ON_STARTRun lifecycle evaluation as soon as the worker starts. Default: false.
--lifecycle-startup-delayPAMIE_LIFECYCLE_STARTUP_DELAYDelay before first lifecycle run when run-on-start is false. Default: 0s.
--vector-searchPAMIE_VECTOR_SEARCH_ENABLEDEnable local vector embedding storage and hybrid search. Default: disabled.
--vector-backendPAMIE_VECTOR_BACKENDLocal vector backend: auto, sqlite-json, or sqlite-vec. Default: auto.
--vector-providerPAMIE_VECTOR_PROVIDERLocal embedding provider: local-hash or ollama. Default: local-hash.
--vector-modelPAMIE_VECTOR_MODELEmbedding model name for providers that require one. Default: embeddinggemma.
--vector-dimensionsPAMIE_VECTOR_DIMENSIONSEmbedding dimensions for the local vector provider. Default: 384.
--vector-ollama-urlPAMIE_VECTOR_OLLAMA_URLBase URL for a local Ollama server. Default: http://127.0.0.1:11434.
--vector-ollama-keep-alivePAMIE_VECTOR_OLLAMA_KEEP_ALIVEOllama keep_alive value for loaded embedding models.

Top-level command help

Usage:
  pamie [server options]
  pamie backup --db-path PATH --out PATH [--format sqlite|ndjson]
  pamie restore --db-path PATH --in PATH [--format sqlite|ndjson] (--dry-run|--confirm)
  pamie embeddings backfill [--db-path PATH] [--limit N] [--reindex]

Commands:
  backup      Create a SQLite backup, or NDJSON with --format ndjson.
  restore     Validate or restore a SQLite backup, or NDJSON with --format ndjson.
  embeddings  Manage local embedding indexes.

Use "pamie <command> -h" for command-specific options.

Backup

Create a SQLite backup, or a portable NDJSON export with --format ndjson.

pamie backup --db-path data/pamie.db --out backup.db
pamie backup --format ndjson --db-path data/pamie.db --out backup.ndjson
Usage of backup:
  -db-path string
        SQLite database path (default "data/pamie.db")
  -format string
        backup format: sqlite or ndjson (default "sqlite")
  -log-level string
        log level: debug, info, warn, or error (default "info")
  -out string
        backup destination path, or - for NDJSON stdout; must not already exist

Restore

Validate with --dry-run before committing a restore with --confirm.

pamie restore --db-path restored.db --in backup.db --dry-run
pamie restore --format ndjson --db-path restored.db --in backup.ndjson --confirm
Usage of restore:
  -confirm
        commit the restore
  -db-path string
        SQLite target database path (default "data/pamie.db")
  -dry-run
        validate the restore without committing rows
  -format string
        restore format: sqlite or ndjson (default "sqlite")
  -in string
        restore source path, or - for NDJSON stdin
  -log-level string
        log level: debug, info, warn, or error (default "info")

Embedding backfill

Index missing embeddings, or recompute existing embeddings with --reindex.

pamie embeddings backfill --db-path data/pamie.db --provider ollama --model embeddinggemma --dimensions 384 --backend auto --limit 500
Usage:
  pamie embeddings backfill [options]

Subcommands:
  backfill  Index missing embeddings, or all embeddings with --reindex.

Usage of embeddings backfill:
  -backend string
        vector backend: auto, sqlite-json, or sqlite-vec (default "auto")
  -db-path string
        SQLite database path (default "data/pamie.db")
  -dimensions int
        embedding vector dimensions (default 384)
  -limit int
        maximum chunks to index in this run (default 500)
  -log-level string
        log level: debug, info, warn, or error (default "info")
  -model string
        embedding model for providers that require one (default "embeddinggemma")
  -ollama-keep-alive string
        Ollama keep_alive value
  -ollama-url string
        base URL for a local Ollama server (default "http://127.0.0.1:11434")
  -provider string
        embedding provider: local-hash or ollama (default "local-hash")
  -reindex
        recompute embeddings even when rows already exist

Source install script

Use this path when developing from a clone of the repository.

Usage: scripts/install-local.sh [options]

Build Pamie and install it as a local `pamie` command.

Options:
  --install-dir DIR   Install directory (default: $PAMIE_INSTALL_DIR or $HOME/.local/bin)
  --profile FILE      Shell profile to update (default: $PAMIE_SHELL_PROFILE or auto-detect)
  --version VERSION   Version embedded into the binary (default: $VERSION or dev)
  --no-path           Do not update a shell profile
  -h, --help          Show this help

Examples:
  scripts/install-local.sh
  scripts/install-local.sh --version v0.1.0
  scripts/install-local.sh --install-dir "$HOME/bin"