Omnigraph
CLI

init

Create a new Omnigraph graph from a schema file.

The init command creates a new Omnigraph graph. It compiles the schema, creates storage tables for each declared node and edge type, and sets up the main branch. It also scaffolds an omnigraph.yaml next to the graph URI if one does not already exist.

Usage

omnigraph init --schema <file> <path>

Arguments

ArgumentRequiredDescription
pathyesGraph URI for the new graph (local path or s3://)

Options

OptionRequiredDescription
--schemayesPath to a .pg schema file

Example

Given a schema file schema.pg:

node Person {
    name: String @key
    age: I32?
    embedding: Vector(1536) @embed(name)
}

node Company {
    name: String @key
}

edge WorksAt: Person -> Company
edge Knows: Person -> Person {
    since: Date?
}

Initialize a graph:

omnigraph init --schema schema.pg ./graph.omni

What gets created

The init command produces a Lance-backed directory containing:

  • A __manifest/ Lance dataset that tracks branch pointers and manifest versions, plus per-actor commit metadata.
  • A Lance dataset under nodes/<NodeType>/ for each declared node type.
  • A Lance dataset under edges/<EdgeType>/ for each declared edge type.

Schema source and the immutable hash that pins it live inside the manifest dataset. There is no separate .pg file written to disk.

The graph starts with a single empty branch, main.

On this page