We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hypabase/hypabase'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
cli.md•1.67 KiB
# CLI Quickstart
Build a knowledge graph from the command line — no Python needed.
## Install
```bash
uv add "hypabase[cli]"
```
## Build a graph in five commands
Start with an empty database and populate it step by step:
```bash
# 1. Initialize the database
hypabase init
# Initialized Hypabase database at hypabase.db
# 2. Create nodes
hypabase node dr_smith --type doctor
hypabase node patient_123 --type patient
hypabase node aspirin --type medication
# 3. Create a hyperedge connecting all three
hypabase edge dr_smith patient_123 aspirin --type treatment --source clinical --confidence 0.95
# 4. Query edges containing a node
hypabase query --containing patient_123
# 5. Check database stats
hypabase stats
# Nodes: 3 Edges: 1
```
## Work with a specific database file
All commands default to `hypabase.db`. Use `--db` to target a different file:
```bash
hypabase --db research.db init
hypabase --db research.db node paper_1 --type paper
hypabase --db research.db edge paper_1 transformer bert --type builds_on
hypabase --db research.db stats
```
## Query with filters
Combine flags to narrow results:
```bash
# Edges containing both nodes
hypabase query --containing patient_123 --containing aspirin --match-all
# Edges of a specific type
hypabase query --type treatment
```
## Export and import
Move hypergraphs between databases using HIF (Hypergraph Interchange Format):
```bash
hypabase export-hif backup.json
hypabase --db copy.db import-hif backup.json
```
## Validate consistency
Check that the database has no orphaned references:
```bash
hypabase validate
# Hypergraph is valid.
```
See the [CLI Reference](../reference/cli.md) for all commands, flags, and options.