Skip to content

Principle-Labs/Corivo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

373 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corivo

A memory companion that lives in your AI workflow
Corivo listens quietly, organizes what matters, and brings context back when it is useful.

npm version MIT License Platform support Node.js >= 18 Beta status

English · 中文

Corivo hero image


What Corivo Is

Corivo is not another standalone app. It is a background service for people who already work inside AI tools and want continuity across conversations.

It captures decisions, facts, and preferences from ongoing sessions, stores them locally, and surfaces them later with [corivo] context prompts.

You:    Remember we prefer TypeScript for backend services.
Agent:  [corivo] Saved.

...two weeks later...

You:    What should we use for this service?
Agent:  [corivo] You previously chose TypeScript for backend services.

Today, the strongest supported path is the local corivo CLI plus the Claude Code integration. Other integrations in this repository are either early-stage or experimental.

Current Status

Corivo is in active beta. The project is usable today, but still evolving quickly.

Area Status
corivo CLI (packages/cli) Beta, primary entry point
Local memory engine (SQLite + heartbeat) Available
Claude Code integration Available
Sync relay (packages/solver) Early-stage package
Host integration bundles + runtime plugins Mixed maturity by package
Official platform support macOS arm64 first

Quick Start

Install with npm:

npm install -g corivo
corivo init

Typical first commands:

corivo status
corivo save --content "Use PostgreSQL for billing" --annotation "决策 · project · database"
corivo query "database"
corivo host list
corivo host install claude-code

Notes:

  • corivo host list shows the supported host integrations managed by the CLI.
  • corivo host install <host> is the primary host-management entry point.
  • The local CLI is the main product surface today.
  • scripts/install.sh can detect and configure Claude Code, Codex, Cursor, and OpenCode on the same machine.
  • Some integrations shown in the repository are still in progress or experimental.

Single Installation Path

Corivo keeps one installation control path: the local corivo CLI.

  • scripts/install.sh is the one-command bootstrap entry that installs and then delegates to CLI flows.
  • corivo host install <host> is the stable host install entry for Claude Code, Codex, Cursor, and OpenCode.
  • OpenCode install uses the packaged plugin asset from packages/plugins/opencode/assets/corivo.ts.
  • packages/plugins/<plugin> is the primary repository layout for plugin code and plugin-facing assets.
  • Some plugin roots only contain host-facing assets today, while others contain executable runtime code or both.

This boundary keeps install behavior centralized while allowing each plugin root to carry the files it actually needs.

Install by Host

Corivo supports multiple AI coding agents. You can either use the one-command installer to auto-detect local hosts, or install a specific host adapter yourself.

One-command installer

curl -fsSL https://i.corivo.ai/install.sh | bash

This installer:

  • prepares the local runtime Corivo needs
  • installs the corivo CLI and initializes the local database
  • detects Claude Code, Codex, Cursor, and OpenCode on your machine
  • connects every supported host it finds automatically
  • walks through four visible stages: preparing your machine, connecting your AI tools, starting Corivo, and warming up with local context
  • can run an optional local warm-up so Corivo starts with recent context from this device
  • writes a diagnostic summary to ~/.corivo/install-diagnostic.txt whenever the installer needs your attention
  • tells you when you can paste that diagnostic summary into an AI assistant for help
  • ends with a ready-to-copy prompt so you can immediately try Corivo in your agent

Claude Code

What you get:

  • Claude Code hooks for carry-over, recall, and review
  • Corivo skills and command docs for Claude Code workflows
  • global Claude Code host wiring through the Corivo CLI

Install:

corivo host install claude-code

What the installer does:

  • installs Claude Code hook scripts and skills
  • updates Claude Code settings so lifecycle hooks call Corivo
  • enables the primary Corivo active-memory flow for Claude Code

Notes:

  • This is the most mature integration in the repository today.
  • Use the one-command installer if you want Claude Code to be configured automatically when detected.

Codex

What you get:

  • global Codex active-memory instructions
  • notify adapter wiring for post-response review
  • local plugin assets and marketplace-ready packaging in this repository

Install:

corivo host install codex

What the installer does:

  • writes the global Codex Corivo instructions
  • installs the Codex notify adapters under ~/.codex/corivo/
  • updates Codex global configuration so Corivo participates in the active-memory flow

Notes:

  • Restart Codex after installation so the new configuration takes effect.
  • The one-command installer will configure Codex automatically if it detects codex or ~/.codex.

Cursor

What you get:

  • global Cursor rules for carry-over, recall, and review
  • native Cursor lifecycle hook wiring
  • CLI permission setup so Cursor can call corivo

Install:

corivo host install cursor

What the installer does:

  • writes the global corivo.mdc rule file
  • installs Corivo hook scripts under ~/.cursor/corivo/
  • updates ~/.cursor/settings.json with Cursor lifecycle hooks
  • ensures Cursor CLI permissions allow Shell(corivo)

Notes:

  • If Cursor Agent is installed but not logged in yet, the installer will report that extra attention is required.
  • The one-command installer will configure Cursor automatically if it detects cursor or ~/.cursor.

OpenCode

What you get:

  • an OpenCode plugin that maps native OpenCode events to Corivo memory flows
  • carry-over, recall, and review integration through the local Corivo CLI

Install:

corivo host install opencode

What the installer does:

  • installs a local corivo.ts plugin into ~/.config/opencode/plugins/
  • installs a local corivo.ts plugin into ~/.config/opencode/plugins/ from the packaged runtime asset path
  • connects native OpenCode events to Corivo carry-over, recall, and review calls

Notes:

  • The installer may ask you to verify your default OpenCode provider configuration after setup.
  • The one-command installer will configure OpenCode automatically if it detects opencode or ~/.config/opencode.

Why It Exists

AI tools are good at the current conversation and bad at continuity.

Corivo is built for the gap in between: the preferences you repeat, the decisions you already made, the facts that should not vanish between sessions, and the project context that should come back before you ask for it again.

How It Works

AI tools (Claude Code / others)
        |
        v
Ingestors + cold scan
        |
        v
Corivo database (~/.corivo/corivo.db)
Blocks + associations + query logs
        |
        v
Heartbeat engine
- annotation
- vitality decay
- association discovery
- consolidation
        |
        v
CLI commands and optional sync

Memory is modeled as blocks with vitality (active -> cooling -> cold -> archived). Decisions decay slower than lightweight knowledge, so long-lived project choices remain easier to recover.

Shipped Module Boundaries

Corivo now follows a state/capability/flow split with explicit composition roots:

  • packages/cli/src/cli/*: command adapters and presenters only. cli/runtime.ts contains modular CLI runtime helpers.
  • packages/cli/src/application/*: use-case and orchestration flow; application/bootstrap/create-cli-app.ts is the CLI composition root.
  • packages/cli/src/domain/*: durable business models and services.
  • packages/cli/src/infrastructure/*: SQLite, host adapters, provider integrations, service manager, and output-side persistence.
  • packages/cli/src/runtime/*: runtime capabilities and policy functions shared by commands/engine.
  • packages/cli/src/memory-pipeline/*: pipeline state, stage capabilities, and runner flow.
  • packages/plugins/*: host-specific integration assets/runtime, kept thin and delegated to CLI entrypoints.
  • packages/solver/src/routes/*: HTTP adapter layer.
  • packages/solver/src/application/*: application-level contracts/use-cases.
  • packages/solver/src/runtime/create-server.ts + packages/solver/src/server.ts: solver runtime wiring/composition roots.

Practical rule: command/routes adapt IO, application composes dependencies, domain owns stable product logic, infrastructure talks to external systems, and runtime/runner modules own process flow.

CLI Layout Snapshot

Current packages/cli/src layout:

cli/
  commands/
  presenters/
  runtime.ts
application/
domain/
  memory/models/
  memory/services/
  host/contracts/
infrastructure/
  hosts/
  llm/
  platform/
  storage/
    lifecycle/
    repositories/
    schema/
    search/
  output/
runtime/
engine/
  heartbeat.ts
  auto-sync.ts
  rules/

Notable changes from earlier versions:

  • CliContext has been removed in favor of direct runtime helper imports.
  • storage/database.ts is now a facade over storage lifecycle, repositories, search, schema, and mappers.
  • most former engine/* business modules were moved into domain/* or infrastructure/*.

Plugin Directory Model

Corivo organizes plugins by plugin name:

  • packages/plugins/claude-code
  • packages/plugins/codex
  • packages/plugins/cursor
  • packages/plugins/opencode
  • packages/plugins/openclaw

Each plugin root contains the files that plugin needs. Some roots are asset-oriented today, some are code-oriented, and opencode currently contains both runtime source and packaged install assets.

Package Description
@corivo/cli Core CLI, local database, heartbeat engine
@corivo/solver CRDT sync relay server (Fastify v5)
@corivo/claude-code Claude Code plugin root with host integration assets
@corivo/cursor Cursor plugin root with host integration assets
@corivo/codex Codex plugin root with host integration assets
@corivo/opencode OpenCode plugin root with packaged install asset and runtime code
@corivo/openclaw OpenClaw plugin root with runtime ingestion code

Each public-facing package now has its own README so contributors can orient themselves without reverse-engineering the tree.

Host Management

Corivo manages host integrations through the explicit host command surface.

Primary commands:

corivo host list
corivo host install codex
corivo host doctor cursor
corivo host uninstall opencode

There is no legacy inject alias in the current CLI surface.

Privacy and Data Ownership

Corivo is local-first by default.

  • Data is stored in ~/.corivo/ on your machine.
  • SQLite is used for persistence, with optional SQLCipher and fallback application-layer encryption.
  • No telemetry pipeline is required for core local usage.
  • Network behavior is mainly tied to optional sync workflows.

Development

git clone https://github.com/xiaolin26/Corivo.git
cd Corivo
pnpm install
pnpm build

Useful workspace commands:

pnpm dev
pnpm lint
pnpm test

Package-level examples:

cd packages/cli
npm run build
npm run test

cd ../solver
npm run dev

Contributing and Community

Clear bug reports, docs improvements, tests, and integration work are all welcome.

Roadmap Snapshot

  • Improve plugin stability and cross-tool ingestion coverage
  • Expand support beyond macOS arm64
  • Continue tightening sync reliability and operational docs
  • Add a clearer external API story for ecosystem contributors

License

Corivo is released under the MIT License.


Built for humans who work with AI every day.

About

A memory companion that lives in your AI workflow

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Contributors