royalsolution-ontosight
v0.2.1
Published
Visualize CodeGraph call subgraphs in OntoSight (npx wrapper for ontosight-codegraph)
Maintainers
Readme
royalsolution-ontosight
Visualize CodeGraph call subgraphs in OntoSight without installing Hyper-Extract.
This npm package is a thin wrapper that auto-creates the CodeGraph index when missing, then runs the Python package ontosight-codegraph (which depends on royalsolution-ontosight) via uvx (or pipx as fallback).
Prerequisites
- Node 20+ (for npx)
- Python 3.11+ with uv (recommended) or pipx
Quick start
# Recommended — no global install
npx royalsolution-ontosight .
# After: npm install -g royalsolution-ontosight
ontosight .
# or
royalsolution-ontosight .
# Seed around a symbol
npx royalsolution-ontosight . --symbol view_graph --path vendor/ontosight/
# Task-scoped subgraph
npx royalsolution-ontosight . --task "auth flow" --hops 2 --max-nodes 200Set ONTOSIGHT_SKIP_AUTO_INIT=1 to require a pre-built index instead of auto-init.
Options
| Flag | Description |
|------|-------------|
| --path <prefix> | Limit symbols to files under this path |
| --symbol <name> | Seed symbol for subgraph expansion |
| --task <text> | Natural-language task seed |
| --hops <n> | BFS hop depth (default: 2) |
| --max-nodes <n> | Maximum nodes (default: 200) |
AI agents
OntoSight complements CodeGraph MCP — use codegraph_* tools to answer structural questions in chat; use this CLI when the user wants an interactive call-graph UI.
| Need | Tool |
|------|------|
| Find symbols, callers, traces, impact (text) | CodeGraph MCP (codegraph_search, codegraph_context, …) |
| Visual exploration in browser | npx royalsolution-ontosight |
Full agent guide: AGENTS.md — workflows, flags, env vars, troubleshooting.
Project wiring (Hyper-Extract monorepo):
| Tool | Location |
|------|----------|
| Cursor | .cursor/rules/ontosight.mdc, .cursor/references/ontosight.md |
| Kiro | .kiro/steering/ontosight.md, .kiro/references/ontosight.md |
| Antigravity | .agent/rules/ontosight.md, .agents/references/ontosight.md |
Example agent workflow
1. codegraph_context({ task: "auth flow", maxNodes: 20 }) → answer in chat
2. npx royalsolution-ontosight . --task "auth flow" --hops 2 → open graph for userHyper-Extract users
If you already have Hyper-Extract installed, the equivalent command is:
he show . --codegraph
he show . --codegraph --symbol view_graph --path vendor/ontosight/Publish (maintainers)
See PUBLISH.md. After each PyPI release of ontosight-codegraph, run npm run sync:version so version and ontosightCodegraphVersion match packages/ontosight-codegraph/pyproject.toml, then publish the npm wrapper.
