Skip to main content
Glama
README.md
<p align="center">
  <img src="docs/assets/logo.svg" alt="ProjectMind Logo" width="120" />
</p>

<h1 align="center">ProjectMind</h1>

<p align="center">
  <strong>Universal Local-First AI Project Intelligence & Persistent Context Engine</strong><br/>
  Gives your coding agent a persistent memory, offline code intelligence, and a local dashboard โ€” with zero cloud accounts required.
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@rootx202/projectmind"><img src="https://img.shields.io/npm/v/@rootx202/projectmind?color=blue&label=npm" alt="npm version"/></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License"/></a>
  <a href="https://github.com/Rootx202/ProjectMind/issues"><img src="https://img.shields.io/github/issues/Rootx202/ProjectMind" alt="Issues"/></a>
  <img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen" alt="Node.js >= 18"/>
  <img src="https://img.shields.io/badge/offline-100%25-success" alt="100% Offline"/>
</p>

---

## What is ProjectMind?

ProjectMind is **not** a coding agent or chatbot. It is a local intelligence and persistent memory layer that plugs directly into your existing coding agents:

- ๐Ÿค– **Google Antigravity**
- ๐Ÿค– **Anthropic Claude Code**
- ๐Ÿค– **Google Gemini CLI**
- ๐Ÿค– **OpenAI Codex**
- ๐Ÿค– **Cursor**
- ๐Ÿค– **GitHub Copilot (VS Code)**
- ๐Ÿค– **Hermes Agent**
- ๐Ÿค– **DeepSeek Harness**
- ๐Ÿค– **OpenCode**

Once installed, your agent automatically remembers your project, retrieves the right context before every task, and syncs changes โ€” all offline, all local.

---

## System Architecture

<p align="center">
  <img src="docs/assets/diagrams/system-architecture.svg" alt="ProjectMind System Architecture" width="800"/>
</p>

---

## 3-Layer Memory Model

<p align="center">
  <img src="docs/assets/diagrams/3-layer-memory.svg" alt="3-Layer Memory Architecture" width="700"/>
</p>

| Layer | Name | What it stores |
|-------|------|---------------|
| **1** | Core Memory | Project identity, tech stack, key constraints โ€” permanent |
| **2** | Project Knowledge | SQLite + FTS5 searchable knowledge, code graph, symbols, routes, models, ADRs |
| **3** | Task Context | Temporary, token-budgeted retrieval state per task |

---

## Smart Auto Workflow

<p align="center">
  <img src="docs/assets/diagrams/smart-auto-workflow.svg" alt="Smart Auto Workflow" width="750"/>
</p>

Once installed into your agent, ProjectMind runs fully automatically:
1. **On first use** โ†’ initializes project memory (7-stage bootstrap)
2. **Before each task** โ†’ retrieves scoped context
3. **After each edit** โ†’ syncs changed files incrementally

---

## Installation

> **Requires Node.js โ‰ฅ 18**

---

### ๐Ÿค– Let Your Agent Do It (Recommended)

Just paste this prompt into your AI coding agent โ€” it will detect itself, install ProjectMind globally, and verify everything automatically:

```
Set up ProjectMind so it works automatically in ALL my projects.

Steps:
1. Run: npm install -g @rootx202/projectmind
2. Detect which coding agent you are (antigravity / claude-code / gemini-cli / cursor / codex / github-copilot / hermes-agent / deepseek-harness / opencode)
3. Run: projectmind plugin install <your-agent-name> --scope global --yes
4. Run: projectmind doctor
5. Tell me which config files were updated and confirm everything is working.
```

> **Global scope** configures ProjectMind at the user level โ€” it activates automatically in every project you open, with zero per-project setup.

---

### Manual Install (Global โ€” works in all projects)

**Step 1:** Install globally

```bash
npm install -g @rootx202/projectmind
```

**Step 2:** Install your agent integration globally

```bash
# Pick your agent:
projectmind plugin install claude-code      --scope global --yes
projectmind plugin install antigravity      --scope global --yes
projectmind plugin install gemini-cli       --scope global --yes
projectmind plugin install cursor           --scope global --yes
projectmind plugin install codex            --scope global --yes
projectmind plugin install github-copilot  --scope global --yes
projectmind plugin install hermes-agent    --scope global --yes
projectmind plugin install deepseek-harness --scope global --yes
projectmind plugin install opencode         --scope global --yes
```

**Step 3:** Verify

```bash
projectmind doctor
```

---

### Manual Install (Per-Project)

If you prefer to install only for a specific project:

```bash
npx -y @rootx202/projectmind plugin install claude-code --yes
```

Or via MCP directly:

```bash
npx -y @rootx202/projectmind mcp
```

---

## Agent Compatibility Matrix

<p align="center">
  <img src="docs/assets/diagrams/agent-integration-matrix.svg" alt="Agent Integration Matrix" width="800"/>
</p>

| Agent | Native Plugin | MCP | Skills | Hooks | Auto Mode |
|-------|:---:|:---:|:---:|:---:|:---:|
| Google Antigravity | โœ… | โœ… | โœ… | โœ… | โœ… |
| Claude Code | โœ… | โœ… | โœ… | โœ… | โœ… |
| Gemini CLI | โ€” | โœ… | โœ… | โœ… | โœ… |
| Cursor | โ€” | โœ… | โœ… | โœ… | โœ… |
| OpenAI Codex | โ€” | โœ… | โœ… | Limited | โœ… |
| GitHub Copilot | โ€” | โœ… | โœ… | โ€” | โœ… |
| Hermes Agent | โœ… | โœ… | โœ… | โœ… | โœ… |
| DeepSeek Harness | โ€” | โœ… | โœ… | โœ… | โœ… |
| OpenCode | โ€” | โœ… | โœ… | โœ… | โœ… |

---

## CLI Commands

After installation, run diagnostics or manage your project memory:

```bash
# Run diagnostics
projectmind doctor

# View current context
projectmind context

# List installed plugins
projectmind plugin list

# Update plugins
projectmind update
```

### CLI Screenshots

| Command | Preview |
|---------|---------|
| `projectmind doctor` | ![doctor](docs/assets/screenshots/cli-doctor.svg) |
| `projectmind context` | ![context](docs/assets/screenshots/cli-context.svg) |
| `projectmind plugin list` | ![plugin list](docs/assets/screenshots/cli-plugin-list.svg) |
| `projectmind update` | ![update](docs/assets/screenshots/cli-update-outdated.svg) |

---

## Key Features

- ๐Ÿง  **Persistent Memory** โ€” Project knowledge survives agent restarts and new sessions
- ๐ŸŒณ **AST Code Analysis** โ€” Tree-sitter/WASM for Python, Go, Rust, Java, C, C++, C# + Babel for JS/TS
- ๐Ÿ“Š **Local Dashboard** โ€” HTML dashboard at `127.0.0.1` with memory layers, code graph, symbols, search, ADRs, and estimated token savings โ€” zero CDN or external services
- ๐Ÿ”’ **100% Offline & Private** โ€” Zero mandatory cloud accounts, zero paid APIs
- ๐Ÿšซ **Secret Protection** โ€” Auto-excludes `.env`, `.pem`, `.key`, `.ssh`, tokens
- ๐Ÿ›ก๏ธ **Path Traversal Protection** โ€” Symlink escape & prompt-injection sanitization
- โ™ป๏ธ **Incremental Sync** โ€” Only re-indexes changed files using SHA-256 fingerprints
- ๐Ÿ—๏ธ **Greenfield + Existing Projects** โ€” Works on new and existing codebases

---

## Local Dashboard

The built-in dashboard runs on `127.0.0.1` only (never exposed to the network):

```bash
projectmind dashboard
```

Shows: memory layers ยท code graph ยท symbols ยท HTTP routes ยท database models ยท ADRs ยท search ยท events ยท token savings

---

## Privacy & Security

ProjectMind is designed to be **strictly local-first**:

- โœ… All indexing, retrieval, and writes work **100% offline**
- โœ… SQLite database stored in `<project>/.projectmind/projectmind.db` only
- โœ… Network access **only** for explicit, verified update checks (HTTPS + allowlist)
- โœ… Secrets automatically excluded from indexing
- โœ… `.projectmind/` added to `.gitignore` automatically

---

## Repository Structure

```
ProjectMind/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ cli/              # Main CLI entry point
โ”‚   โ”œโ”€โ”€ setup/            # Agent detection & idempotent installer
โ”‚   โ””โ”€โ”€ diagnostics/      # Runtime, SQLite, MCP & adapter health checks
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ core/             # Project root detection, stable Project ID
โ”‚   โ”œโ”€โ”€ storage/          # SQLite3 + FTS5, 3-layer memory schema
โ”‚   โ”œโ”€โ”€ shared/           # Types, security validators, token estimator
โ”‚   โ”œโ”€โ”€ retrieval/        # BM25 + feature-hash reranker
โ”‚   โ”œโ”€โ”€ knowledge/        # Knowledge record management
โ”‚   โ”œโ”€โ”€ context-engine/   # Task context retrieval
โ”‚   โ”œโ”€โ”€ mcp-server/       # MCP stdio transport + local dashboard
โ”‚   โ”œโ”€โ”€ plugin-sdk/       # Plugin lifecycle, update, verification
โ”‚   โ””โ”€โ”€ agent-sdk/        # Smart Auto Mode engine + hook dispatcher
โ”œโ”€โ”€ adapters/             # Per-agent native integrations
โ”œโ”€โ”€ plugins/              # Plugin manifests for each agent
โ”œโ”€โ”€ skills/               # Canonical SKILL.md bundle
โ”œโ”€โ”€ templates/            # Default config template
โ”œโ”€โ”€ docs/                 # Architecture, diagrams, screenshots
โ””โ”€โ”€ tests/                # Full test suite
```

---

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for the full version history.

**Latest: v2.0.0** โ€” Unified `@rootx202/projectmind` npm package, native plugin support for all agents, single MCP entry point via `npx`, removal of shell installers in favor of npm-backed integration.

---

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) and [PLUGIN_DEVELOPMENT.md](PLUGIN_DEVELOPMENT.md) for development guides.

---

## License

MIT ยฉ [Rootx202](https://github.com/Rootx202)