Skip to content

Quickstart

Run in your terminal. Requires uv. Use an upstream-supported Python release (3.11–3.14). The package still accepts Python 3.10 for compatibility, but upstream security support has ended.

Terminal window
uv tool install --upgrade selvedge
selvedge --version

Current release: Selvedge 0.3.16.

Use pip instead

Install in a virtual environment:

Terminal window
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade selvedge

On Windows, activate with .venv\Scripts\Activate.ps1 in PowerShell. If your system calls Python python3, use that to create the environment. Start your editor from the activated terminal, or use the absolute path to selvedge-server in its MCP configuration.

Try a demo first
Terminal window
selvedge demo

The demo saves a rejected approach and retrieves it through a fresh connection to a temporary database. It does not write to your project. The demo requires Selvedge 0.3.12 or newer.

Selvedge works with any agent that can call a local stdio MCP server or invoke its CLI. No particular brand or model provider is required. The presets below automate setup for some clients; they are not the compatibility limit.

Agent not listed? Connect another compatible agent with MCP or the CLI.

Requires Selvedge. Install →

Check compatibility and lifecycle hooks →

For a client with local stdio MCP support:

  1. Run selvedge init from your project folder.
  2. Register a server named selvedge with command selvedge-server, using your client’s MCP settings format. Use the executable’s absolute path if it is not on the client’s PATH.
  3. Set the server’s SELVEDGE_DB environment variable to the absolute path of your project’s .selvedge/selvedge.db if the client starts outside the project.
  4. Run selvedge prompt and add its output to the instructions your agent reads. Restart the client and approve its tool permissions if needed.

Clients that only accept remote HTTP endpoints cannot connect directly to this local stdio server. If your agent has shell access, it can instead call selvedge log, selvedge prior-attempts and the other CLI commands. Both interfaces use the same local store.

Native lifecycle hooks are optional integrations and vary by client. A custom agent can use the MCP tools or CLI without one of the bundled hook adapters.

Paste this into your connected coding agent:

Use Selvedge to save one real decision from this project, including why we made it and any approach we rejected. Ask me if no decision is available; do not invent one. Show me the saved entity path and record ID.

Open a new session in the same project. Give your agent the saved entity path and ask it to retrieve the decision with prior_attempts. Check that the result matches what you saved.

Only decisions explicitly saved to Selvedge can be recalled.

Walk through the verification →

My agent cannot find Selvedge or my saved decision
  1. Run selvedge doctor and check your version.
  2. Confirm selvedge-server is on your agent’s PATH. With uv, run uv tool update-shell, then restart your terminal and editor.
  3. Restart your agent in this project and enable Selvedge’s tools. Codex needs a trusted project; Copilot uses VS Code Local in Agent mode.
  4. Confirm both sessions use the same project database.
  5. Ask the agent explicitly to use log_change, then look up the saved entity with prior_attempts.

Native lifecycle adapters are available for the six setup presets; capabilities and activation differ. Activate and verify your agent’s hooks.

Use the CLI to read history
Terminal window
selvedge status
selvedge prior-attempts users.api_key
selvedge history --since 7d
selvedge search "credentials"

Replace users.api_key with your saved entity path. Read commands support --json. See the CLI reference, MCP tools, and entity path guide.

Connect multiple agents or automate setup

Repeat --agent to connect several tools to one project. Without it, setup detects supported tools. Custom MCP entries raise a conflict; custom Codex TOML entries need manual reconciliation. --force never rewrites those entries.

For unattended setup:

Terminal window
selvedge setup --agent codex --non-interactive --yes

Without --yes, non-interactive setup is a dry run.

Share feedback

Trying this in a project you control? Join the voluntary feedback pilot. The discussion is public; share only redacted, non-sensitive notes.

You can also report that you recalled a decision in a new session. This is a voluntary self-report, not an automatic check. No project contents or contact details are sent.