How to Set Up Egonex-AI Understand Anything Locally: Complete Installation Guide

You can set up Egonex-AI Understand Anything locally by running the install.sh script to clone the monorepo into ~/.understand-anything/repo, installing dependencies with pnpm, building the core package, and using the /understand command to analyze your codebase.

Egonex-AI Understand Anything is a monorepo that combines a Tree-sitter static analysis engine with LLM-driven enrichment to generate interactive knowledge graphs of any codebase. Whether you are analyzing complex legacy systems or onboarding new team members, this tool provides a comprehensive understanding layer through its three architectural components: the core engine, the React dashboard, and the multi-agent pipeline.

Prerequisites

Before installing, ensure your environment meets these minimum requirements:

  • Node.js ≥ 22 (the repository targets v24)
  • pnpm ≥ 10 (specified in package.json under "packageManager")
  • Git (any recent version)
  • Optional: A local LLM provider such as Ollama if you want to avoid external API token usage

Installation Steps

1. Run the Installer Script

The fastest way to set up Egonex-AI Understand Anything locally is using the provided installer. This script handles repository cloning, platform detection, and symlink creation for supported AI coding platforms.


# Default installation

curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash

# Or specify a platform explicitly (codex, opencode, vscode, etc.)

curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s codex

The [install.sh](https://github.com/Egonex-AI/Understand-Anything/blob/main/install.sh) script performs three critical operations:

  1. Clones the repository into ~/.understand-anything/repo (or a custom $UA_DIR if set)
  2. Resolves the requested platform based on the platform table (lines 25-44 in the script)
  3. Creates symlinks in platform-specific skill directories (e.g., $HOME/.agents/skills, $HOME/.copilot/skills)

2. Install Workspace Dependencies

Navigate to the cloned plugin directory and install all dependencies using pnpm:

cd ~/.understand-anything/repo/understand-anything-plugin
pnpm install

3. Build the Core Package

You must build the core package before running any analysis, as the dashboard and agents depend on these compiled modules:

pnpm --filter @understand-anything/core build

This command runs the TypeScript compiler on packages/core/src/index.ts and produces the compiled output that exports the public API, including GraphBuilder and SearchEngine.

Building the Dashboard

The dashboard is a React + TypeScript UI that visualizes the generated knowledge graph. While optional for programmatic usage, you need it to interact with graphs visually.

For production builds:

pnpm --filter @understand-anything/dashboard build

For development with hot reload:

pnpm dev:dashboard

The dashboard source code resides in understand-anything-plugin/packages/dashboard, with state management handled by src/store.ts using Zustand.

Running Your First Analysis

Once installed and built, you can analyze any codebase using the global commands created by the installer:

  1. Navigate to your target project (the codebase you want to analyze)
  2. Run the analysis:
/understand

This command invokes the multi-agent pipeline defined in understand-anything-plugin/agents/, including the project scanner (project-scanner.md), file analyzer (file-analyzer.md), and architecture analyzer (architecture-analyzer.md). It creates .understand-anything/knowledge-graph.json in your project root.

  1. Launch the visualization:
/understand-dashboard

This opens a browser window where you can pan, zoom, search nodes, and view code summaries or guided tours generated by the tour-builder.md agent.

Understanding the Project Structure

The repository organizes functionality into three logical layers:

Layer Location Purpose
Core Engine understand-anything-plugin/packages/core Exports the public API via src/index.ts, handles Tree-sitter parsing and graph construction in src/analyzer/graph-builder.ts
Dashboard understand-anything-plugin/packages/dashboard React UI with visualization logic and store management in src/store.ts
Skills & Agents understand-anything-plugin/agents/*.md Multi-agent pipeline including domain analysis (domain-analyzer.md) and tour generation (tour-builder.md)

Key Commands and Workflow

After installation, these commands become available system-wide:

  • /understand – Runs full analysis or incremental re-analysis (only changed files)
  • /understand --language zh – Forces output in specific languages (supports en, zh, zh-TW, ja, ko, ru)
  • /understand-chat <question> – Ask natural language questions about the codebase
  • /understand-diff – Shows impact analysis for current git diff
  • /understand-onboard – Generates onboarding guides for new team members
  • /understand-domain – Extracts business domain knowledge (domains, flows, steps)
  • /understand --auto-update – Installs a post-commit hook for automatic graph updates

All commands are thin wrappers around the core GraphBuilder, SearchEngine, and LLM agents implemented in the source code.

Programmatic Usage

You can also use the core library directly in your Node.js applications without the CLI commands.

Using GraphBuilder

import { GraphBuilder } from "@understand-anything/core";

// Initialize with absolute path to target repository
const builder = new GraphBuilder(projectRoot);
await builder.build();  // Parses with Tree-sitter, runs agents
const graph = await builder.loadGraph();
console.log("Nodes:", graph.nodes.length);

Source: packages/core/src/analyzer/graph-builder.ts

Using SearchEngine

import { SearchEngine } from "@understand-anything/core";

const engine = new SearchEngine("./.understand-anything/knowledge-graph.json");
const results = await engine.search("authentication flow", { fuzzy: true });
console.log(results.map(r => r.nodeId));

Source: packages/core/src/search.ts

Adding Custom Platforms

To support a new AI coding environment (e.g., "mycli"), add a row to the platform table in install.sh (lines 31-44). After running install.sh mycli, the skill files will be linked automatically to the appropriate directory.

Summary

  • Install with the one-liner curl command to clone into ~/.understand-anything/repo and create platform-specific symlinks
  • Build the core package using pnpm --filter @understand-anything/core build before running analyses
  • Analyze codebases with /understand, which creates .understand-anything/knowledge-graph.json
  • Visualize results using /understand-dashboard for an interactive React-based UI
  • Extend functionality by modifying agents in understand-anything-plugin/agents/ or using the programmatic API from packages/core/src/index.ts

Frequently Asked Questions

What are the minimum system requirements to run Egonex-AI Understand Anything?

You need Node.js version 22 or higher (v24 recommended), pnpm version 10 or higher, and Git. The monorepo uses pnpm workspaces defined in package.json, and the core engine requires Tree-sitter bindings which compile during the build process. A local LLM provider like Ollama is optional but recommended to avoid API token costs.

Where does the installer script clone the repository?

By default, install.sh clones the repository into ~/.understand-anything/repo. You can override this by setting the $UA_DIR environment variable before running the script. The script also creates symlinks for supported AI coding platforms (Claude Code, VS Code Copilot, Codex) in their respective skill directories as defined in the platform table (lines 25-44 of install.sh).

How do I run the analysis on only changed files?

The /understand command automatically detects changes and runs incrementally on subsequent invocations. For the first run, it performs a full analysis of the entire codebase. The incremental logic is handled by the GraphBuilder class in packages/core/src/analyzer/graph-builder.ts, which compares file timestamps against the existing knowledge graph.

Can I use Egonex-AI Understand Anything without the dashboard?

Yes. The core package (@understand-anything/core) exports all functionality including GraphBuilder and SearchEngine from packages/core/src/index.ts. You can programmatically build graphs and query them using the TypeScript API without ever building or running the React dashboard located in packages/dashboard.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →