ormi-cli
v0.3.3
Published
Ormi CLI
Readme
ormi-cli
The ORMI CLI is a command-line interface for developing, deploying, and managing subgraphs on the ORMI network. You can use it directly from the terminal, or install its AI integration so supported coding agents can drive the same workflows through Ormi MCP and bundled subgraph skills.
Table of Contents
Installation
Standard Installation
npm install -g ormi-cliInstall from Source
If you want to install from source:
# Clone the repository
git clone https://github.com/ormi-labs/ormi-cli.git
cd ormi-cli
# Install dependencies
corepack enable
yarn install
# Build the project
yarn build
# Link globally for local development
npm install -g .After linking, ormi-cli will be available globally on your system.
AI Agent Setup
For AI-assisted development, ormi-cli can:
- configure the
ormiserver in supported agents - install bundled subgraph skills into the agent's skills directory
Typical setup:
# Install and configure AI integration
ormi-cli ai install
# Verify MCP + skills setup
ormi-cli ai doctorThis is optional. The core subgraph workflows below work the same with or without an AI agent.
Quick Start
AI-Assisted Quick Start
# Install AI integration for your coding agent
ormi-cli ai install
# Verify the MCP server and bundled skills are installed
ormi-cli ai doctorThen work inside your project with prompts like:
- "Initialize a new ORMI subgraph project for this contract:
0x..." - "Explain the generated schema, mappings, and manifest before building"
- "Run codegen and build, then fix any issues"
- "Prepare this subgraph for deploy and tell me anything still missing"
Next Steps: See AI Integration and Workflow 1.
Environments
The CLI supports multiple ORMI environments. Most commands that talk to an ORMI node accept an --env flag to target a specific environment:
# Deploy to the Mantle environment
ormi-cli deploy my-subgraph --env mantle
# Authenticate against a specific environment
ormi-cli auth --env apechainAvailable environments:
| Name | Slug |
| ---------- | -------------------- |
| 0xGraph | ormi-k8s (default) |
| Apechain | apechain |
| Dolomite | k8s-dolomite |
| Mantle | mantle |
| Metis | k8s-metis |
| Ostium | k8s-ostium |
| Somnia | k8s-somnia |
| Telos | k8s-telos |
| Chainstack | chainstack |
If --env is not provided in a TTY session, the CLI prompts interactively. You can also override with --node <url> or the ORMI_NODE_URL environment variable.
AI Integration
ormi-cli ai install is not a separate product surface. It wires AI agents into the same subgraph workflows already exposed by the CLI.
What it installs:
- MCP configuration for
ormiin agents that support MCP - bundled Ormi skills for subgraph planning, development, build/test, deploy, query, monitor, and management
What that means in practice:
- you still build with
ormi-cli build, deploy withormi-cli deploy, add sources withormi-cli add, and so on - the agent gets Ormi-specific context and tools so it can guide or execute those workflows more reliably
How agents discover this integration:
- agents with skills support discover the bundled
subgraph-*skills from their skills directory afterormi-cli ai install - agents with MCP support see the
ormiserver afterormi-cli ai install - agents that rely on project instruction files get installer-managed files like
AGENTS.mdorCLAUDE.mdwritten into the current project when relevant
No separate plugin is required for the supported clients below. The integration point is skills, MCP, or both.
Agent Support
| Agent | Skills | MCP | Config format | Notes |
| ----------- | ------ | --- | ----------------------------------------------------- | ------------------------------------------------- |
| Claude Code | Yes | Yes | { "type": "http", "url": "..." } | Best-supported path for full skill + MCP workflow |
| Cursor | Yes | Yes | { "url": "..." } | No type field in MCP entry |
| Gemini CLI | Yes | Yes | { "httpUrl": "..." } | Uses httpUrl (not url) |
| Codex | Yes | Yes | TOML: [mcp_servers.ormi] | TOML config at ~/.codex/config.toml |
| OpenCode | Yes | Yes | { "type": "remote", "url": "...", "enabled": true } | JSONC config, multiple candidate paths |
Project Instruction Files
For agents that rely on project instruction files, ormi-cli ai install writes managed files into the current project, for example:
CLAUDE.mdfor Claude CodeAGENTS.mdfor Codex and OpenCodeGEMINI.mdfor Gemini CLI
These files reinforce the same rule as the bundled skills: use ormi-cli commands first, then refine generated files only where needed.
Useful commands:
# Interactive install for detected agents
ormi-cli ai install
# Install for specific agents
ormi-cli ai install --agent claude-code,cursor
# Check MCP URL, config files, and bundled skills
ormi-cli ai doctor
# Remove Ormi MCP + skills from an agent
ormi-cli ai uninstallNotes:
- by default, install uses project-local config where the agent supports it
- use
--globalto install into the agent's global config and skills directory - use
--mcp-onlyor--skills-onlyif you only want one part of the integration - after install, restart the coding agent so it reloads MCP config and skills
Workflows
The bundled skills provide detailed guidance for each workflow. Use these prompts to get started:
1. Create a Subgraph
Use the subgraph-create skill (and its companion skills subgraph-create-events, subgraph-create-handlers, subgraph-create-factory, subgraph-create-analytics) to scaffold a new subgraph from a contract address.
Create a subgraph for contract 0x... on mainnet- Scaffolds project with
ormi-cli init - Fetches and inspects ABI with
ormi-cli abi - Analyzes ABI and detects contract patterns (ERC-20, AMM, etc.)
- Refines schema and mappings
- Builds and verifies the project
2. Deploy a Subgraph
Use the subgraph-deploy skill to register, build, and deploy to ORMI.
Deploy this subgraph- Authenticates via
ormi-cli author deploy key - Registers the subgraph name with
ormi-cli create - Runs codegen and build
- Deploys with
ormi-cli deployand a version label - Verifies indexing has started
3. Query Subgraph Data
Use the subgraph-query skill to explore indexed data.
Query the transfers entity, show the last 10- Discovers available subgraphs via MCP
- Gets schema to understand entity structure
- Executes GraphQL queries with filters and pagination
4. Monitor & Manage
Use subgraph-monitor and subgraph-manage skills for health checks and project management.
Check my subgraph's sync status and recent errors- Checks sync progress and block heights
- Reviews API stats and latency
- Inspects logs for errors
- Manages projects and API tokens
Use the subgraph-review skill to validate schema quality, mapping correctness, and best practices before deploying.
Quick Reference:
| Task | Skill | CLI Commands |
| ---------------- | ------------------ | ----------------------------------------------------- |
| Fetch ABI | | ormi-cli abi |
| Scaffold project | subgraph-create | ormi-cli init, ormi-cli add |
| Build locally | subgraph-create | ormi-cli codegen, ormi-cli build, ormi-cli test |
| Authenticate | | ormi-cli auth |
| Register name | | ormi-cli create |
| Deploy | subgraph-deploy | ormi-cli deploy |
| Query data | subgraph-query | (MCP tools) |
| Monitor health | subgraph-monitor | (MCP tools) |
| Review subgraph | subgraph-review | |
| Manage projects | subgraph-manage | ormi-cli create, ormi-cli remove |
Additional Resources
- Full Command Reference: See USAGE.md for complete command documentation
- ORMI Documentation: Visit docs.ormilabs.com for detailed guides
- Community: Join our Discord for support and discussions
- AI Integration: Run
ormi-cli ai doctorto verify MCP configuration and bundled skills
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
License
MIT License - see LICENSE file for details
