Omnigraph
CLI

CLI

Install the Omnigraph binaries, understand the command surface, and configure local or remote targets.

The Omnigraph CLI is the main operator surface for local repositories and remote servers. It manages graph repositories, loads data, runs queries, applies mutations, and controls branching from the terminal.

Omnigraph ships as two binaries:

  • omnigraph
  • omnigraph-server

Install

Quick install:

curl -fsSL https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/install.sh | bash

Homebrew:

brew tap ModernRelay/tap
brew install ModernRelay/tap/omnigraph

For release channels, source builds, and platform-specific details, see Install.

Commands

CommandPurpose
versionPrint the CLI version
embedGenerate, clean, or refresh explicit seed embeddings
initCreate a new repository from a schema file
loadLoad JSONL data into a local repository
ingestLoad JSONL into a named review branch
schema plan / schema applyPlan or apply supported schema migrations
snapshotInspect the current state of a branch
exportExport a branch snapshot as JSONL
branch create / list / delete / mergeManage branches
readRun a read query against a branch or snapshot id
changeRun a mutation against a branch
run list / show / publish / abortInspect or manage transactional runs
commit list / showInspect graph commit history
policy validate / test / explainValidate and explain policy decisions

Basic usage pattern

Commands use one of three patterns:

omnigraph <command> [URI] [options]
omnigraph <command> --uri <URI> [options]
omnigraph <group> <subcommand> [options]

Read and change commands use explicit flags:

omnigraph read --uri ./repo.omni --query queries.gq --name my_query

Local vs remote mode

Read, change, branch, snapshot, export, run, commit, and ingest commands can target a remote Omnigraph server by pointing --uri or a configured target at an HTTP endpoint:

omnigraph read --uri http://localhost:8080 --query queries.gq --name my_query

Repository-creation commands such as init and direct local loads via load operate on storage directly rather than through the HTTP server.

Configuration

An omnigraph.yaml file in your project root can define aliases, defaults, and targets:

targets:
  local:
    uri: ./repo.omni
  dev:
    uri: http://127.0.0.1:8080
    bearer_token_env: OMNIGRAPH_BEARER_TOKEN

cli:
  target: local
  branch: main

query:
  roots:
    - queries
    - .

With this config, you can define aliases and run shorter commands against local or remote targets without repeating the full argument list every time.

Output formats

read supports table, key-value, CSV, JSONL, and JSON output. Use --json for structured JSON or --format for the other renderers:

FlagFormat
(default)Human-readable table
--jsonStructured JSON payload with metadata and rows
--format kvKey-value rendering
--format csvComma-separated values with a header row
--format jsonlMetadata line followed by one JSON object per row
--format tableExplicit table rendering

Example with table output:

omnigraph read --uri ./repo.omni --query queries.gq --name friends_of --params '{"name": "Alice"}'
3 rows from branch main via friends_of

NAME          AGE
Bob           32
Carol         28
Dave          45

Example with JSON output:

omnigraph read --uri ./repo.omni --query queries.gq --name friends_of --params '{"name": "Alice"}' --json
{
  "query_name": "friends_of",
  "target": {
    "branch": "main",
    "snapshot": null
  },
  "row_count": 3,
  "columns": ["name", "age"],
  "rows": [
    { "name": "Bob", "age": 32 },
    { "name": "Carol", "age": 28 },
    { "name": "Dave", "age": 45 }
  ]
}

On this page