CLI Reference¶
Installation¶
Global options¶
| Option | Default | Description |
|---|---|---|
--db PATH |
hypabase.db |
Path to the SQLite database file |
Commands¶
init¶
Initialize a new Hypabase database.
Creates the database file with the Hypabase schema. No-op if the file already exists.
node¶
Create or update a node.
| Option | Default | Description |
|---|---|---|
--type TEXT |
unknown |
Node type |
--props TEXT |
None |
JSON string of properties |
Examples:
hypabase node dr_smith --type doctor
hypabase node dr_smith --type doctor --props '{"specialty": "neurology"}'
edge¶
Create a hyperedge connecting two or more nodes.
| Option | Default | Description |
|---|---|---|
--type TEXT |
(required) | Edge type |
--source TEXT |
None |
Provenance source |
--confidence FLOAT |
None |
Confidence score (0.0-1.0) |
--props TEXT |
None |
JSON string of properties |
Examples:
hypabase edge dr_smith patient_123 aspirin --type treatment
hypabase edge a b c --type link --source extraction --confidence 0.9
hypabase edge a b --type rel --props '{"weight": 0.5}'
query¶
Query edges in the hypergraph.
| Option | Default | Description |
|---|---|---|
--containing TEXT |
(repeatable) | Filter by node ID |
--type TEXT |
None |
Filter by edge type |
--match-all |
False |
Require all --containing nodes to be present |
Examples:
hypabase query --containing patient_123
hypabase query --containing patient_123 --containing aspirin --match-all
hypabase query --type treatment
stats¶
Show database statistics: node and edge counts by type.
validate¶
Check internal consistency of the hypergraph.
export-hif¶
Export the hypergraph to HIF (Hypergraph Interchange Format) JSON.
import-hif¶
Import a hypergraph from HIF JSON.