@apart-tech/apart-intelligence
v1.3.0
Published
Apart Intelligence — the knowledge graph CLI
Keywords
Readme
Apart Intelligence
A knowledge graph for institutional knowledge. AI writes. AI reads. Humans curate. The graph grows as agents work.
Apart Intelligence captures decisions, processes, policies, and architecture as interconnected nodes — so your team's knowledge compounds instead of getting lost in Slack threads and stale wikis.
Install
npm install -g @apart-tech/apart-intelligenceOr run directly:
npx @apart-tech/apart-intelligence --helpQuick Start
Option A: Connect to a hosted server
ai login https://your-server.run.app
ai initOption B: Use a local PostgreSQL database
Prerequisites: PostgreSQL 16+ with the pgvector extension.
ai init
# Follow the prompts to configure your database and OpenAI API keyCommands
Core
| Command | Description |
|---------|-------------|
| ai add <content> | Add a knowledge node (decision, process, policy, etc.) |
| ai search <query> | Hybrid semantic + keyword search |
| ai context <query> | Assemble a context package for a topic |
| ai get <id> | Get a node by ID with its edges |
| ai update <id> | Update a node's content or metadata |
| ai delete <id> | Delete a node or edge |
Organization
| Command | Description |
|---------|-------------|
| ai link <source> <target> | Link two nodes with a relationship |
| ai status <id> <status> | Set node status (draft/reviewed/approved/archived) |
| ai drafts | List nodes pending curation |
| ai types | List all node and relationship types in use |
| ai domains | Manage knowledge domains |
Graph Quality
| Command | Description |
|---------|-------------|
| ai health | Comprehensive graph health report |
| ai orphans | Find nodes with no connections |
| ai duplicates | Find near-duplicate nodes by embedding similarity |
| ai suggest-links | Suggest missing links based on similarity |
| ai islands | Detect disconnected clusters |
| ai validate | Validate edge integrity and detect issues |
| ai normalize | Analyze and normalize relationship types |
Codebase Mapping
| Command | Description |
|---------|-------------|
| ai map [directory] | Map a codebase into the knowledge graph |
| ai graph | Generate an interactive HTML visualization |
Auth & Config
| Command | Description |
|---------|-------------|
| ai init | Set up Apart Intelligence in the current directory |
| ai login [url] | Log in to an Apart Intelligence server |
| ai logout | Log out from the server |
| ai whoami | Show current login info |
Examples
# Capture a decision
ai add "We chose Hono over Express for the API server because it's lightweight \
and has native TypeScript support" --type decision --title "Use Hono for API"
# Search for knowledge
ai search "API framework"
# Get context for an AI agent
ai context "onboarding process" --max-nodes 20
# Map your codebase
ai map ./src --domain engineering/backend
# Review and approve drafts
ai drafts
ai status <node-id> approved
# Visualize the knowledge graph
ai graph --openClaude Code Integration
Apart Intelligence ships with Claude Code skills for capturing knowledge as a natural byproduct of development:
| Skill | Description |
|-------|-------------|
| /capture <text> | Quick-capture a decision, process, or knowledge node |
| /document [path] | Analyze recent changes, generate documentation nodes |
| /sync [range] | Incremental knowledge graph update from git diff |
Copy the .claude/ directory from the repository to your project to enable these skills.
Architecture
Apart Intelligence uses a PostgreSQL database with pgvector for semantic search and tsvector for keyword search. Nodes are embedded using OpenAI's embedding model and connected via typed, weighted edges.
Two modes of operation:
- Direct mode — connects to PostgreSQL directly (for local development or self-hosted)
- API mode — connects to a hosted Apart Intelligence server (via
ai login)
License
MIT
