arcadedb-code-indexer
v0.4.1
Published
Walks a code repo and writes its structure (modules, files, imports) into an ArcadeDB graph. Part of the arcadedb-claude suite.
Readme
arcadedb-code-indexer
CLI that walks a TypeScript/JavaScript or Laravel codebase and writes its structure into an ArcadeDB graph. Phase 2 of the arcadedb-claude suite.
The arcadedb-claude suite
A 4-package set that turns ArcadeDB into a first-class graph layer for Claude Code. Auto-injects graph context per project, records decisions across sessions, and indexes both code and notes into one queryable graph.
| Package | Role |
|---|---|
| arcadedb-agent-memory | Foundation: schemas + HTTP client + memory helpers + CLI |
| arcadedb-code-indexer | CLI: walks Laravel/Next.js repos, writes :Module/:File/:IMPORTS |
| arcadedb-claude-skills | Claude Code plugin: SessionStart hook + skill + 4 slash commands |
| obsidian-to-arcadedb | CLI: syncs an Obsidian vault, writes :Note/:Tag/:LINKS_TO |
ArcadeDB (Docker, port 2480, MCP)
claude_memory | per-project DBs
▲
┌───────────────────┼───────────────────────────┐
│ │ │
agent-memory code-indexer obsidian-to-arcadedb
(schemas+lib+CLI) (CLI) (CLI)
▲ ▲
└────────── all depend on agent-memory ──────────┘
▲
claude-skills
(Claude Code plugin)
▲
Claude Code sessionAll 4 packages are MIT, TypeScript, Node 20+.
Status
v0.1.0, pre-release, GitHub-only. Not yet published to npm. npm publish planned for v0.2.
Install (from source)
Requires arcadedb-agent-memory checked out as a sibling and a running ArcadeDB on localhost:2480.
# Foundation first
git clone [email protected]:altugsogutoglu/arcadedb-agent-memory.git
cd arcadedb-agent-memory && npm install && npm run build && npm link
cd ..
# Then this package
git clone [email protected]:altugsogutoglu/arcadedb-code-indexer.git
cd arcadedb-code-indexer && npm install && npm run build && npm link
# `arcadedb-index` is now on PATHSetup
- Run an ArcadeDB container locally (port 2480).
- Put credentials in
~/.config/arcadedb/.env(seearcadedb-agent-memoryfor format). - Create a database to index into.
Usage
# Index a repo, write to the named DB. Assumes the DB already has the schema applied.
arcadedb-index ./some-project --db project-a
# Index a fresh DB by applying schema first.
arcadedb-index ./some-project --db project-a --auto-migrate
# Tag the repo with a stack hint (informational; written to :Repo.stack).
arcadedb-index ./some-project --db project-a --stack nextjsWhat it writes
:Repo(one per indexed root, keyed by basename):Module(top-level dir, or Laravelapp/<PascalCase>subdir):File(every source file in the repo):CONTAINS(Repo to Module to File hierarchy):IMPORTS(File to File, resolved via relative paths or PSR-4)
Unresolved import specifiers (npm packages, namespace prefixes outside the PSR-4 map) are stored as a comma-separated unresolvedImports property on the source :File.
Limitations (v0.1.0)
- Regex-based parsing, not AST. Edge cases like multi-line import statements with unusual formatting may be missed.
- Only relative imports are resolved for TS/JS. Path aliases (
@/) and TSpathsconfig are not honored. - PHP resolution assumes the default Laravel
App\toapp/PSR-4 mapping unless overridden in code. - No class, function, or call graph extraction. Those land in v0.2 (AST-based) and v0.3 (call graph).
License
MIT
