open-index/open-npm huggingface dataset:
npm package: @openweave/weave-cli
Description: Weave CLI - Command-line interface for OpenWeave agent framework
Author: OpenWeave Team
Latest version: 1.0.3

# ⌨️ Weave CLI

> Command-line interface for OpenWeave intelligent agent framework

## Overview

**Weave CLI** is the command-line tool for interacting with OpenWeave locally. It provides commands to scaffold projects, track progress, and manage the agent's knowledge graph.

## Installation

```bash
npm install -g @openweave/weave-cli
```

Or use directly with npx:

```bash
npx @openweave/weave-cli --help
```

## Commands

### `weave init <project>`

Initialize a new OpenWeave project session.

```bash
weave init my-project
# Creates:
# - my-project/.weave/context.json (knowledge graph state)
# - my-project/ROADMAP.md (milestone tracker)
```

### `weave status`

Show current project status and milestones.

```bash
weave status
# Output:
# 🗺️ OpenWeave Project Status
# M1 · WeaveGraph Core        [✅ 100%]
# M2 · WeaveLint Core          [🔄 50%]
# M3 · WeavePath Core          [🔜 0%]
```

### `weave milestones`

List all milestones and sub-tasks.

```bash
weave milestones
# Shows detailed breakdown of all milestones
```

### `weave errors`

List error registry and correction patterns.

```bash
weave errors
# Shows common errors encountered and corrections applied
```

### `weave query <term>`

Search the knowledge graph.

```bash
weave query "authentication system"
# Returns nodes matching the query with relevance scores
```

### `weave save-node`

Manually add a node to the knowledge graph.

```bash
weave save-node --label "API Design Decision" --type DECISION
```

### `weave orphans`

Run code orphan detection on current project.

```bash
weave orphans --path ./src
# Shows unused functions, classes, and modules
```

## Configuration

Weave CLI uses `.weave/config.json` for project settings:

```json
{
  "project_name": "my-project",
  "knowledge_graph_path": ".weave/context.json",
  "roadmap_file": "ROADMAP.md",
  "include_tests": false,
  "max_context_depth": 2
}
```

## Environment Variables

- `WEAVE_PROJECT_ROOT` — Override project root directory
- `WEAVE_VERBOSE` — Enable verbose logging
- `WEAVE_DEBUG` — Enable debug mode

## Related Packages

- **@openweave/weave-graph** — Knowledge graph storage and retrieval
- **@openweave/weave-lint** — Code orphan detection
- **@openweave/weave-path** — Milestone planning
- **@openweave/weave-link** — MCP server for integrations
npm package: @openweave/weave-link
Description: WeaveLink — MCP Server for integrating WeaveGraph with AI clients
Latest version: 0.6.0

# 🧠 weave-graph

> **WeaveGraph** — The knowledge graph engine at the heart of OpenWeave.

Part of the [OpenWeave](../../README.md) monorepo.

---

## What it does

WeaveGraph manages all memory for an OpenWeave session:

- Stores **concepts, decisions, errors and corrections** as typed graph nodes
- Connects them with **semantic edges** (relates, causes, corrects, implements, depends_on)
- **Compresses context** into the graph when the LLM window reaches 75% capacity
- **Retrieves relevant nodes** from long-term memory given a query
- **Persists everything** to disk by `chat_id`, survives across sessions

## Node Types

| Type | Description |
|---|---|
| `CONCEPT` | A key idea or term in the project |
| `DECISION` | An architectural or implementation decision |
| `MILESTONE` | A planned deliverable |
| `ERROR` | A response flagged as incorrect by the user (suppressed) |
| `CORRECTION` | The correct version linked to an ERROR node |
| `CODE_ENTITY` | A function, class, or module created during the session |

## Edge Types

| Relation | Meaning |
|---|---|
| `RELATES` | General semantic relationship |
| `CAUSES` | A causes B |
| `CORRECTS` | A is the correction of B (B is an ERROR node) |
| `IMPLEMENTS` | A implements B (code → decision) |
| `DEPENDS_ON` | A depends on B |
| `BLOCKS` | A blocks B |

## Quick Start

```python
from weave_graph import ContextGraphManager, NodeType, EdgeType

# Initialize for a session
graph = ContextGraphManager(chat_id="proj_abc123")

# Add a decision node
decision = graph.add_node(
    content="Use PostgreSQL for persistence, not SQLite — project will scale",
    node_type=NodeType.DECISION,
    tags=["database", "architecture"]
)

# Add a concept and relate it
concept = graph.add_node(
    content="Session persistence by chat_id",
    node_type=NodeType.CONCEPT
)
graph.add_edge(decision.id, concept.id, EdgeType.RELATES)

# Suppress an error and record correction
graph.suppress_error_node(
    node_id=bad_response_node.id,
    correction_content="Use async/await, not threading — the codebase is fully async"
)

# Query relevant context before responding
relevant = graph.query_relevant_nodes("database connection pooling", top_k=5)

# Compress context when window is getting full
compressed_summary = graph.compress_context_to_graph(
    context_text=long_conversation_text,
    llm_extractor_fn=my_extraction_function
)
```

## Storage

All data is persisted to:
```
{storage_path}/{chat_id}/
├── context_graph.json    ← Full graph (nodes + edges)
├── roadmap.md            ← Human-readable milestone status
├── decisions.md          ← Decision log
└── errors.md             ← Error pattern registry
```

## Installation

```bash
pip install openweave-graph
# or within the monorepo:
pnpm --filter weave-graph dev
```
npm package: @openweave/weave-lint
Description: WeaveLint — Orphan code detector with AST analysis
Latest version: 0.2.0

# 🔌 weave-link

> **WeaveLink** — The MCP Server that connects OpenWeave to any compatible AI client.

Part of the [OpenWeave](../../README.md) monorepo.

---

## What it does

WeaveLink implements the [Model Context Protocol (MCP)](https://modelcontextprotocol.io)
to expose OpenWeave's memory and planning tools to any compatible client:

- **Claude Desktop** — native MCP support
- **Cursor** — via MCP config
- **Cline** — via MCP config
- **Any MCP-compatible client**

---

## Available MCP Tools

| Tool | Description |
|---|---|
| `save_graph_node` | Persist a memory node (concept, decision, error) to the session graph |
| `query_graph` | Retrieve nodes relevant to a query from long-term memory |
| `suppress_node` | Mark a node as erroneous and record its correction |
| `update_roadmap` | Write the current milestone plan to `roadmap.md` |
| `get_session_context` | Load full session state: graph summary + roadmap + error patterns |

---

## Quick Setup

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "openweave": {
      "command": "npx",
      "args": ["-y", "@openweave/weave-link"],
      "env": {
        "OPENWEAVE_STORAGE": "/path/to/your/sessions"
      }
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json` in your project root:

```json
{
  "mcpServers": {
    "openweave": {
      "command": "npx",
      "args": ["-y", "@openweave/weave-link"],
      "env": {
        "OPENWEAVE_STORAGE": "./.openweave"
      }
    }
  }
}
```

### Cline (VS Code)

In Cline settings → MCP Servers → Add:

```json
{
  "name": "openweave",
  "command": "npx -y @openweave/weave-link",
  "env": { "OPENWEAVE_STORAGE": "./.openweave" }
}
```

---

## Environment Variables

| Variable | Default | Description |
|---|---|---|
| `OPENWEAVE_STORAGE` | `./openweave-sessions` | Root directory for session persistence |
| `OPENWEAVE_LOG_LEVEL` | `info` | Log verbosity: `debug`, `info`, `warn`, `error` |

---

## Docker

```bash
docker run -v $(pwd)/sessions:/sessions \
  -e OPENWEAVE_STORAGE=/sessions \
  ghcr.io/openweave/weave-link:latest
```

---

## Installation

```bash
# Use directly via npx (no install needed)
npx @openweave/weave-link

# Or install globally
npm install -g @openweave/weave-link
weave-link start
```
npm package: @openweave/weave-path
Description: WeavePath - Milestone & sub-task planner for OpenWeave
Author: OpenWeave Team
Latest version: 0.2.0

# 🗺️ WeavePath

> Milestone & sub-task planner for OpenWeave intelligent agents

## Overview

**WeavePath** is the planning engine for OpenWeave. It transforms high-level goals into structured milestones and sub-tasks, enabling agents to:

- Break down complex problems into actionable steps
- Generate and maintain dynamic roadmaps
- Track progress across sessions
- Recommend next actionable sub-tasks
- Auto-generate `roadmap.md` documentation

## Features

- **Epic → Milestone → Sub-task** hierarchical planning
- **Smart next-action resolver** - determine what to work on next
- **Roadmap auto-generation** - create living documentation
- **Session persistence** - save/load milestone state
- **Progress tracking** - monitor completion rates
- **Dependency resolution** - handle task prerequisites

## Architecture

```
┌─────────────────────────────────┐
│      Goal / Epic               │
├─────────────────────────────────┤
│  ┌─────────────────────────────┐│
│  │   Milestone (M1, M2, M3...) ││
│  ├─────────────────────────────┤│
│  │ ┌─────────────────────────┐ ││
│  │ │  Sub-task 1 (🔜 10%)   │ ││
│  │ │  Sub-task 2 (🔄 50%)   │ ││
│  │ │  Sub-task 3 (✅ 100%)  │ ││
│  │ └─────────────────────────┘ ││
│  └─────────────────────────────┘│
└─────────────────────────────────┘
```

## Usage

```typescript
import { WeavePath } from "@openweave/weave-path";

const planner = new WeavePath({
  goal: "Build OpenWeave foundation",
  phaseCount: 5,
  estimatedHours: 80
});

// Add milestones
planner.addMilestone({
  id: "M1",
  name: "WeaveGraph Core",
  description: "Knowledge graph engine",
  estimatedHours: 20,
  dependencies: []
});

// Get next action
const nextAction = planner.getNextAction();
console.log(nextAction.title);

// Generate roadmap
const roadmap = planner.generateRoadmap();
console.log(roadmap);
```

## Related Packages

- **@openweave/weave-graph** - Knowledge graph storage and retrieval
- **@openweave/weave-lint** - Code quality and orphan detection
- **@openweave/weave-link** - MCP server for integrations