What Are the Core Packages in Lum1104/Understand-Anything? Engine and Dashboard Explained
The two core packages in the Lum1104/Understand-Anything monorepo are @understand-anything/core, which runs the static-analysis pipeline and tree-sitter parsers, and @understand-anything/dashboard, which provides the React knowledge-graph visualization layer.
The Lum1104/Understand-Anything project is a pnpm monorepo that helps LLMs comprehend entire codebases through an interactive knowledge graph. When you examine the core packages in Lum1104/Understand-Anything, you find that all higher-level features—graph generation, schema validation, and UI rendering—depend on a single engine package and its corresponding React front end. These scoped packages are wired together via workspace:* dependencies and orchestrated from the repository root.
@understand-anything/core: The Static-Analysis Engine
The @understand-anything/core package is the heart of the system. According to the Lum1104/Understand-Anything source code, it declares the static-analysis pipeline, tree-sitter language parsers, and browser-safe sub-path exports in understand-anything-plugin/packages/core/package.json. Every downstream operation, from knowledge-graph construction to code search, originates here.
Sub-Path Exports for Modular Imports
Rather than exposing a single bulky entry point, the core package provides granular sub-path exports including search, types, schema, and languages. This design lets consumers import only what they need while remaining browser-safe, and each sub-path is registered as a conditional export in the core package manifest.
The following snippet demonstrates how to query a knowledge graph using the search module:
import { search } from '@understand-anything/core/search'
// Assume `graph` is a knowledge‑graph JSON object produced by the `/understand` skill
const results = await search(graph, {
query: 'fetch user data',
limit: 5,
})
console.log('Top matches:', results)
You can also bootstrap a language-aware parser through the languages export. For example, loading the Rust parser looks like this:
import { languages } from '@understand-anything/core/languages'
const rustParser = await languages.rust.load()
const tree = rustParser.parse(`fn main() { println!("hello"); }`)
console.log('Parsed nodes:', tree.rootNode.namedChildren)
@understand-anything/dashboard: The React Knowledge-Graph UI
The @understand-anything/dashboard package is the React and TypeScript front end that visualizes the output of the core engine. As defined in understand-anything-plugin/packages/dashboard/package.json, it depends directly on @understand-anything/core via a workspace:* dependency and bundles UI libraries such as React Flow, Zustand, Tailwind CSS, and Prism.
This package translates raw graph data into an ergonomic, interactive dashboard for exploring codebases. The component model is built around providers and view components that expect a serialized knowledge-graph source.
Below is a minimal example of rendering the dashboard:
import { KnowledgeGraphProvider } from '@understand-anything/dashboard'
import GraphView from '@understand-anything/dashboard/GraphView'
function App() {
return (
<KnowledgeGraphProvider src="/knowledge-graph.json">
<GraphView />
</KnowledgeGraphProvider>
)
}
Monorepo Wiring and Shared Entry Points
Both packages are glued together by the root package.json, which defines the pnpm workspace and global scripts. The unified entry point for the Claude Code plugin lives at understand-anything-plugin/src/index.ts, where core and dashboard functionality is re-exported for consumption by LLM-driven coding platforms. Because the dashboard pulls in the core engine through an internal workspace reference, version mismatches are eliminated and local changes propagate immediately across the monorepo.
Summary
@understand-anything/corepowers the static-analysis pipeline, tree-sitter parsing, and browser-safe sub-path exports (search,types,schema,languages).@understand-anything/dashboardprovides the React knowledge-graph UI and depends on the core package viaworkspace:*.- Configuration in the root
package.jsonmanages the pnpm workspace, whileunderstand-anything-plugin/src/index.tsserves as the Claude Code plugin entry point. - The monorepo architecture ensures that graph construction and visualization remain tightly integrated but modularly distributed.
Frequently Asked Questions
What are the two main core packages in Lum1104/Understand-Anything?
The two main packages are @understand-anything/core and @understand-anything/dashboard. The core package handles static analysis, parsing, and schema validation, while the dashboard renders the interactive knowledge-graph interface. Both are published under the @understand-anything namespace and live under understand-anything-plugin/packages/.
What sub-path exports does @understand-anything/core provide?
The core package exposes the browser-safe sub-path exports search, types, schema, and languages. These allow consumers to import only the utilities they need, such as search for graph queries or languages for loading tree-sitter parsers. Each sub-path is defined as a conditional export in understand-anything-plugin/packages/core/package.json.
How does the dashboard package depend on the core package?
The dashboard declares its dependency through a workspace:* specifier inside understand-anything-plugin/packages/dashboard/package.json. This internal workspace reference ensures that the React UI always uses the local version of the analysis engine during development and production builds within the monorepo.
What file serves as the entry point for the Claude Code plugin?
understand-anything-plugin/src/index.ts is the primary entry point that re-exports functionality from both the core and dashboard packages. As implemented in Lum1104/Understand-Anything, this file bridges the engine and the UI so that LLM coding assistants can invoke analysis routines and render the resulting knowledge graph.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →