co-authored by
Claude Opus 4.5
parent
18b891a62a
commit
b1c6d672db
@@ -331,78 +331,6 @@ const syncResult = await cg.sync();
|
||||
cg.close();
|
||||
```
|
||||
|
||||
## 🛠️ Development
|
||||
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
npm test # Run all tests
|
||||
npm run test:watch # Run tests in watch mode
|
||||
```
|
||||
|
||||
### Building
|
||||
|
||||
```bash
|
||||
npm run build # Compile TypeScript and copy assets
|
||||
npm run clean # Remove build artifacts
|
||||
```
|
||||
|
||||
### Project Structure
|
||||
|
||||
```
|
||||
codegraph/
|
||||
├── src/
|
||||
│ ├── index.ts # Main CodeGraph class
|
||||
│ ├── types.ts # TypeScript interfaces
|
||||
│ ├── config.ts # Configuration handling
|
||||
│ ├── directory.ts # .codegraph/ management
|
||||
│ ├── errors.ts # Custom error classes
|
||||
│ ├── utils.ts # Utilities (Mutex, batching, etc.)
|
||||
│ │
|
||||
│ ├── bin/
|
||||
│ │ └── codegraph.ts # CLI entry point
|
||||
│ │
|
||||
│ ├── db/
|
||||
│ │ ├── index.ts # Database connection
|
||||
│ │ ├── schema.sql # SQLite schema
|
||||
│ │ ├── migrations.ts # Schema versioning
|
||||
│ │ └── queries.ts # Prepared statements
|
||||
│ │
|
||||
│ ├── extraction/
|
||||
│ │ ├── index.ts # Extraction orchestrator
|
||||
│ │ ├── tree-sitter.ts # Parser wrapper
|
||||
│ │ ├── grammars.ts # Grammar loading
|
||||
│ │ └── queries/ # Tree-sitter queries (.scm)
|
||||
│ │
|
||||
│ ├── resolution/
|
||||
│ │ ├── index.ts # Reference resolver
|
||||
│ │ └── frameworks/ # Framework-specific patterns
|
||||
│ │
|
||||
│ ├── graph/
|
||||
│ │ ├── index.ts # Graph query interface
|
||||
│ │ ├── traversal.ts # BFS/DFS, impact radius
|
||||
│ │ └── queries.ts # Graph queries
|
||||
│ │
|
||||
│ ├── vectors/
|
||||
│ │ ├── index.ts # Vector operations
|
||||
│ │ └── search.ts # Similarity search
|
||||
│ │
|
||||
│ ├── sync/
|
||||
│ │ ├── index.ts # Sync orchestrator
|
||||
│ │ └── git-hooks.ts # Hook installation
|
||||
│ │
|
||||
│ ├── context/
|
||||
│ │ ├── index.ts # Context builder
|
||||
│ │ └── formatter.ts # Output formatting
|
||||
│ │
|
||||
│ └── mcp/
|
||||
│ ├── index.ts # MCP server
|
||||
│ ├── transport.ts # Stdio transport
|
||||
│ └── tools.ts # Tool definitions
|
||||
│
|
||||
└── __tests__/ # Test files
|
||||
```
|
||||
|
||||
## ⚙️ How It Works
|
||||
|
||||
### 1. Extraction
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@colbymchenry/codegraph",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "A local-first code intelligence system that builds a semantic knowledge graph from any codebase",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user