Skip to content

CLI Reference ​

The Purple8 Hyper Graph (v0.72.0) CLI (purple8-hyper-graph) lets you manage databases, run the REST server, start the MCP bridge (125 MCP tools across 16 namespaces), and diagnose your environment without writing code.

Installation ​

bash
pip install purple8-hyper-graph

After installation the purple8-hyper-graph binary is on your PATH.

Global flags ​

FlagDescription
--db PATH / -d PATHPath to the graph database directory (default: ./purple8_data)
--verbose / -vShow full tracebacks on error
--version / -VPrint the package version and exit
--help / -hShow help text

init ​

Initialize a new graph database at the given path.

bash
purple8-hyper-graph init ./my_graph
purple8-hyper-graph init ./my_graph --embedding-dim 768
ArgumentDescription
pathDirectory to create the database in (falls back to --db)
--embedding-dim INTEmbedding vector dimension (default: 1536)

serve ​

Start the REST API server.

bash
purple8-hyper-graph serve --port 8100
purple8-hyper-graph serve --host 0.0.0.0 --port 8100 --reload
FlagDefaultDescription
--host TEXT0.0.0.0Interface to bind to
--port INT / -p INT8100TCP port
--reloadoffEnable auto-reload (development only)

You can also run the ASGI app directly (equivalent, useful when you need to pass uvicorn-specific flags like --workers): python -m purple8_graph.secure_server.


doctor ​

Check that all required and optional dependencies are installed and healthy.

bash
purple8-hyper-graph doctor
purple8-hyper-graph doctor --url http://localhost:8100
purple8-hyper-graph doctor --json
FlagDescription
--url URLProbe an API server's /health/live endpoint
--jsonEmit results as JSON (useful in CI)

Exit codes: 0 = all checks pass, 1 = one or more failures.

Example output:

  ✓  Python version            3.12.x
  ✓  purple8_core              (Rust extension — BrickCoreStorage)
  ✓  hnswlib                   0.8.0
  ✓  numpy                     1.26.4
  ✓  pydantic                  2.12.5
  ✓  fastapi                   0.135.1
  ✓  uvicorn                   0.30.6
  ✓  pyjwt                     2.9.0
  ✓  cryptography              43.0.1
  ✓  [optional] openai         1.35.0
  ⚠  [optional] anthropic      not installed (optional)
  ✓  Server http://localhost:8100  HTTP 200

All checks passed (12 checks, 1 warning)

stats ​

Show statistics for the current graph database.

bash
purple8-hyper-graph --db ./my_graph stats

node ​

node add ​

bash
purple8-hyper-graph node add person_001 \
  --label Person \
  --property name=Alice \
  --property age=30
ArgumentDescription
node_idUnique node identifier
--label / -lLabel to apply (repeatable)
--property / -pProperty as key=value (repeatable)

node get ​

bash
purple8-hyper-graph node get person_001

node update ​

bash
purple8-hyper-graph node update person_001 --property age=31

node delete ​

bash
purple8-hyper-graph node delete person_001

node list ​

bash
purple8-hyper-graph node list --label Person --limit 25
FlagDescription
--label / -lFilter by label
--limit INTMaximum results (default: 50)

edge ​

edge add ​

bash
purple8-hyper-graph edge add knows_001 KNOWS person_001 person_002 --property since=2024

edge get ​

bash
purple8-hyper-graph edge get knows_001

edge delete ​

bash
purple8-hyper-graph edge delete knows_001

edge list ​

bash
purple8-hyper-graph edge list --type KNOWS --from person_001 --limit 20

traverse ​

Traverse the graph from a starting node.

bash
purple8-hyper-graph traverse person_001 --depth 3 --type KNOWS --direction outgoing
FlagDefaultDescription
--depth / -d2Maximum traversal depth
--type / -tallFilter by edge type
--directionoutgoingoutgoing / incoming / both
--limit50Maximum results

export ​

Export graph data to a file.

bash
purple8-hyper-graph export ./backup.json --format json
purple8-hyper-graph export ./backup.csv  --format csv
purple8-hyper-graph export ./graph.graphml --format graphml

import ​

Import graph data from a file.

bash
purple8-hyper-graph import ./backup.json --format json
purple8-hyper-graph import ./backup.json --format json --clear
FlagDescription
--format / -fjson (default), csv, graphml
--clearWipe existing data before import

clear ​

Delete all nodes and edges from the database.

bash
purple8-hyper-graph --db ./my_graph clear
purple8-hyper-graph --db ./my_graph clear --yes   # skip confirmation prompt

mcp-server ​

Start a local MCP stdio bridge to a running Purple8 REST API server — exposes all 125 MCP tools across 16 dot-namespaced namespaces (graph.*, rag.*, journey.*, schema.*, data.*, memory.*, registry.*, models.*, quantum.*, egress.*, feedback.*, scheduler.*, admin.*, evolution.*, sentinel.*, guardrails.*) to Claude Desktop, Claude Code, Cursor, and other MCP clients.

bash
purple8-hyper-graph mcp-server --url http://localhost:8100 --api-key p8g_...
purple8-hyper-graph mcp-server --url http://localhost:8100 --username admin --password ...
FlagDescription
--url URLBase URL of the running Purple8 REST API (required)
--api-key KEYLong-lived API key (X-API-Key header) — mutually exclusive with --username
--username USERAdmin username for JWT login (use with --password) — mutually exclusive with --api-key
--password PASSAdmin password for JWT login (required when --username is set)
--timeout SECONDSHTTP request timeout (default: 30)

See the MCP guide for the full tool catalog and Claude Desktop/Cursor connection instructions.


reset-password ​

Offline admin password reset / recovery — no SMTP required. Must be invoked via this console-script entry point (purple8-hyper-graph reset-password ...), not python -m: Nuitka-compiled commercial images do not support python -m for in-package modules.

bash
purple8-hyper-graph reset-password --email admin@example.com --password newpass123
purple8-hyper-graph reset-password --email admin@example.com --create --username admin
FlagDescription
--email EMAILEmail of the account to reset (or create with --create) (required)
--password PASSWORDNew password (omit to be prompted interactively)
--username USERNAMEUsername to use when creating a new account with --create
--createCreate the account (bootstraps a super_admin) if it does not exist

KMS management ​

There is no kms CLI subcommand. Key inspection and rotation are exposed via the REST API instead (requires KMS_MANAGE permission):

bash
curl -H "Authorization: Bearer $TOKEN" http://localhost:8100/admin/kms/keys
curl -H "Authorization: Bearer $TOKEN" http://localhost:8100/admin/kms/keys/{key_id}

See Encryption & KMS for the full KMS provider setup and rotation guide.

Purple8 Hyper Graph v0.72.0 · AI-Native Execution Infrastructure · NVIDIA Inception Member · Red Hat Technology Partner.