Universal Chat and Agentic AI System Manager
Harvest, merge, and recover your AI chat and agent task histories
Chasm extracts and unifies chat sessions from AI coding assistants like GitHub Copilot, Cursor, and more. Never lose your AI conversations again.
- π Harvest - Extract chat sessions from VS Code, Cursor, Windsurf, and other editors
- π Recover - Restore lost or orphaned chat sessions to VS Code
- π Merge - Combine sessions across workspaces and time periods
- π Analyze - Get statistics on your AI assistant usage
- π API Server - REST API for building custom integrations
- π€ MCP Tools - Model Context Protocol support for AI agent integration
- ποΈ Universal Database - SQLite-based storage that normalizes all providers
cargo install chasm-cligit clone https://github.com/nervosys/chasm-cli.git
cd chasm-cli
cargo install --path .Download from GitHub Releases:
| Platform | Download |
|---|---|
| Windows x64 | chasm-v1.0.0-x86_64-pc-windows-msvc.zip |
| Windows ARM | chasm-v1.0.0-aarch64-pc-windows-msvc.zip |
| macOS x64 | chasm-v1.0.0-x86_64-apple-darwin.tar.gz |
| macOS ARM | chasm-v1.0.0-aarch64-apple-darwin.tar.gz |
| Linux x64 | chasm-v1.0.0-x86_64-unknown-linux-gnu.tar.gz |
| Linux musl | chasm-v1.0.0-x86_64-unknown-linux-musl.tar.gz |
The most common use case - recover chat sessions that disappeared from VS Code:
# Recover sessions for a specific project
chasm fetch path /path/to/your/project
# Example output:
# [<] Fetching Chat History for: my-project
# ======================================================================
# Found 3 historical workspace(s)
#
# [OK] Fetched: Implementing authentication system... (abc12345-...)
# [OK] Fetched: Debugging API endpoints... (def67890-...)
#
# ======================================================================
# Fetched: 2 sessions
#
# [i] Reload VS Code (Ctrl+R) and check Chat history dropdownAfter running, reload VS Code (Ctrl+R or Cmd+R) and your sessions will appear in the Chat history dropdown.
# See what chasm knows about a workspace
chasm detect all /path/to/your/project --verbose
# Output shows:
# - Workspace ID and status
# - Available sessions
# - Detected providers
# - Recommendationschasm list workspacesββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββ¬ββββββββββββ
β Hash β Project Path β Sessions β Has Chats β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββΌβββββββββββΌββββββββββββ€
β 91d41f3d61f1... β c:\dev\my-project β 3 β Yes β
β a2b3c4d5e6f7... β c:\dev\another-project β 1 β Yes β
ββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββ΄ββββββββββββ
chasm list sessions --project-path /path/to/your/project# Find sessions by project name
chasm find session "my-project"
# Find sessions containing specific text
chasm find session "authentication"chasm show session <session-id># Export to a backup directory
chasm export path /backup/dir /path/to/your/project| Command | Description |
|---|---|
chasm fetch path <project-path> |
Recover sessions - Fetches and registers sessions for a project |
chasm fetch workspace <pattern> |
Fetch sessions from workspaces matching a pattern |
chasm fetch session <id> |
Fetch a specific session by ID |
chasm register <path> |
Register orphaned sessions in VS Code''s database index |
| Command | Description |
|---|---|
chasm list workspaces |
List all discovered workspaces |
chasm list sessions |
List all sessions |
chasm list sessions --project-path <path> |
List sessions for a specific project |
chasm detect all <path> |
Auto-detect workspace, providers, and sessions |
chasm detect workspace <path> |
Detect workspace info for a path |
chasm detect providers |
List available LLM providers |
| Command | Description |
|---|---|
chasm show session <id> |
Display full session content |
chasm find session <pattern> |
Search sessions by text pattern |
chasm find workspace <pattern> |
Search workspaces by name |
| Command | Description |
|---|---|
chasm export path <dest> <project-path> |
Export sessions from a project |
chasm export workspace <dest> <hash> |
Export sessions from a workspace |
chasm import path <source> <project-path> |
Import sessions into a project workspace |
| Command | Description |
|---|---|
chasm merge path <project-path> |
Merge all sessions for a project into one |
chasm merge workspace <pattern> |
Merge sessions from matching workspaces |
chasm merge sessions <id1> <id2> ... |
Merge specific sessions by ID |
chasm merge all |
Merge all sessions across all providers |
| Command | Description |
|---|---|
chasm harvest scan |
Scan for all available providers and sessions |
chasm harvest run |
Harvest sessions from all providers into database |
chasm harvest run --providers copilot |
Harvest only from specific providers |
chasm harvest status |
Show harvest database status |
chasm harvest search <query> |
Full-text search across all harvested sessions |
| Command | Description |
|---|---|
chasm git init |
Initialize git versioning for chat sessions |
chasm git add |
Stage and commit chat sessions |
chasm git status |
Show git status of chat sessions |
chasm git log |
Show history of chat session commits |
chasm git snapshot |
Create a tagged snapshot |
| Command | Description |
|---|---|
chasm provider list |
List discovered LLM providers |
| Command | Description |
|---|---|
chasm api serve |
Start the REST API server |
chasm api serve --port 8787 |
Start on specific port |
Chasm includes a full agentic coding toolkit similar to Claude Code CLI, but provider-agnostic. Run coding tasks with any LLM backend.
chasm agency tools| Tool | Description |
|---|---|
file_read |
Read file contents |
file_write |
Write or modify files |
terminal |
Execute shell commands |
code_search |
Search codebase for symbols |
web_search |
Search the web for information |
http_request |
Make HTTP requests |
calculator |
Perform calculations |
chasm agency list- coordinator - Orchestrates multi-agent workflows
- coder - Writes and refactors code
- reviewer - Reviews code for issues
- tester - Generates and runs tests
- researcher - Gathers information
- executor - Runs commands and tasks
chasm agency modes| Mode | Description |
|---|---|
single |
Traditional single-agent (like Claude Code) |
sequential |
Agents execute one after another |
parallel |
Multiple agents work simultaneously |
swarm |
Coordinated multi-agent collaboration |
hierarchical |
Lead agent delegates to specialists |
debate |
Agents debate to find best solution |
# Simple coding task (single agent)
chasm agency run "Add error handling to main.rs"
# Specify a model
chasm agency run -m gpt-4o "Refactor this function to use async/await"
# Use local Ollama model
chasm agency run -m ollama/codellama "Write unit tests for lib.rs"
# Multi-agent swarm for complex tasks
chasm agency run --orchestration swarm "Build a REST API with authentication"
# Parallel agents for speed
chasm agency run --orchestration parallel "Analyze and fix all TODO comments"Chasm provides a unified interface to all chat systems, preventing vendor lock-in. Continue conversations seamlessly across providers.
Your AI chat history is scattered across:
- VS Code Copilot (SQLite + JSON in workspaceStorage)
- Cursor (proprietary format)
- ChatGPT (web-only, export required)
- Claude (web-only)
- Local LLMs (various formats)
Each uses different formats, storage locations, and APIs. If you switch providers, you lose context.
Chasm normalizes all sessions into a universal format and lets you:
- Import from any provider into a unified database
- Export to any format (JSON, Markdown, CSV)
- Continue sessions with a different provider
- Search across all history regardless of source
# List all your sessions from all providers
chasm list sessions
# Export a Copilot session
chasm export sessions abc123 --format json --output session.json
# The exported session contains the full conversation:
# - All messages (user + assistant)
# - Tool invocations and results
# - Timestamps and metadata
# - File references and code blocks
# Continue the conversation with a different provider:
chasm agency run --context session.json "Continue implementing the feature"
# Or import into the harvest database for unified access
chasm harvest import session.json# 1. Start a project with GitHub Copilot in VS Code
# (sessions automatically tracked)
# 2. Later, recover and view your sessions
chasm fetch path /path/to/project
chasm list sessions --project-path /path/to/project
# 3. Export the session for portability
chasm export path ./backup /path/to/project
# 4. Continue with Claude, GPT-4, or local Ollama
chasm agency run -m claude-3 --context ./backup/session.json \
"Review the code we wrote and suggest improvements"
# 5. Or merge multiple sessions into one unified history
chasm merge path /path/to/project
# 6. Search across ALL your AI conversations
chasm harvest search "authentication implementation"Chasm's normalized format includes:
{
"id": "uuid",
"title": "Session title",
"provider": "copilot|cursor|chatgpt|claude|ollama|...",
"workspace": "/path/to/project",
"created_at": "2026-01-08T12:00:00Z",
"messages": [
{
"role": "user|assistant|system",
"content": "Message text",
"timestamp": "2026-01-08T12:00:00Z",
"tool_calls": [...],
"references": [...]
}
],
"metadata": {
"model": "gpt-4o",
"total_tokens": 15000,
"files_referenced": ["src/main.rs", "Cargo.toml"]
}
}| Feature | Vendor Lock-in | With Chasm |
|---|---|---|
| Switch providers | Lose all history | Keep everything |
| Search old chats | Per-provider only | Search all at once |
| Backup conversations | Manual exports | Automatic harvesting |
| Continue sessions | Start fresh | Full context preserved |
| Compare providers | Impossible | Same task, different models |
Start the REST API server for integration with web/mobile apps:
chasm api serve --host 0.0.0.0 --port 8787| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/workspaces |
List workspaces |
| GET | /api/workspaces/:id |
Get workspace details |
| GET | /api/sessions |
List sessions |
| GET | /api/sessions/:id |
Get session with messages |
| GET | /api/sessions/search?q= |
Search sessions |
| GET | /api/stats |
Database statistics |
| GET | /api/providers |
List supported providers |
- β GitHub Copilot (VS Code)
- β Cursor
- β Windsurf
- β Continue.dev
- β Ollama
- β LM Studio
- β GPT4All
- β LocalAI
- β Jan.ai
- β llama.cpp / llamafile
- β vLLM
- β Text Generation WebUI
- β OpenAI / ChatGPT
- β Anthropic / Claude
- β Google / Gemini
- β Azure AI Foundry
- β Perplexity
- β DeepSeek
| Platform | Location |
|---|---|
| Windows | %LOCALAPPDATA%\csm\csm.db |
| macOS | ~/Library/Application Support/csm/csm.db |
| Linux | ~/.local/share/csm/csm.db |
- Rust 1.75+
- Git
git clone https://github.com/nervosys/chasm-cli.git
cd chasm-cli
cargo build --releasecargo testLicensed under the Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0).
Contributions are welcome! Please read our Contributing Guide and Code of Conduct.
For security issues, please see our Security Policy.
- π Documentation
- π¬ GitHub Discussions
- π Issue Tracker
Made with β€οΈ by Nervosys