Skip to main content

Contexer

Capture decisions. Review changes. Enforce selected rules.

PyPI version License: MIT Python 3.12+ GitHub stars Discord

Quick start · Features · How it works · Commit checks · Console · Cloud & Teams · Benchmark · FAQ · Docs · Discord

New: Contexer Personal Cloud & Teams: sync decisions across machines, share a team decision layer.


The decision and enforcement layer for AI coding agents

Capture engineering decisions and their reasoning, review changes, and bring the right guidance into Claude Code, Cursor, Codex, and Gemini CLI. Share approved decisions through optional Contexer Teams and enforce selected rules with optional commit checks.

Contexer keeps a reviewable, versioned record of what was decided, why, and whether it has been approved. The same local decision store works across supported assistants, so your engineering guidance is not tied to one agent's conversation history. Review, revision history, team approval, and explicitly enabled checks turn recorded decisions into guidance you can manage and verify.

A simple example

You tell your assistant:

"Always use our shared API client for outgoing requests. It handles authentication and retries; separate implementations caused duplicate requests."

Contexer can save both the rule and its reason. In a later session, your assistant can retrieve that decision instead of guessing why the shared client exists. If you link the decision to source files, Contexer can flag when those files change so you know to recheck the advice.

Clear directives can be captured automatically. For an important decision made during a discussion, say "store that decision". Capture beyond explicit directives is best-effort.

See Contexer in action

Watch how to install Contexer and capture your first decisions.

Watch: Install Contexer and capture your first decisions

Quick start

Requires Python 3.12+ and uv.

uv tool install contexer   # 1. install
contexer install           # 2. wire into your AI assistants

contexer install auto-detects supported assistants and configures the ones it finds. Restart your assistant, open your project, and follow Contexer's first-run setup guidance to build its starting context.

Then try telling your assistant:

Save this as a convention: always use uv, not pip, in this project.

Decisions are stored locally in plain JSON under ~/.contexer/. The local features do not require a cloud account; cross-machine sync and team sharing are optional.

Details: installation & verification · per-tool integration notes


Features

Feature What it does for you
Decisions with reasons Saves what you chose and why: architecture, constraints, conventions, and reusable patterns.
Relevant reminders Loads standing rules at session start and retrieves matching decisions using your question or referenced files. Avoids repeatedly injecting decisions already shown in the session.
Decisions across assistants Makes the same local project decisions available to Claude Code, Cursor, Codex, and Gemini CLI. Automatic delivery varies by assistant.
Project and global rules Keeps project-specific choices separate from preferences you want to reuse across repositories.
Repository-derived context Reads configuration and uses source-backed analysis to build starting knowledge. Observations and inferences are labeled, not treated as human-approved rules.
Review and history Lets you review pending decisions and proposed updates, while preserving earlier revisions and their origins.
Outdated-advice warnings Flags changes to linked code, follows detected file renames, and rechecks measured conventions. A warning asks you to verify the decision; it does not prove it is wrong.
Optional commit checks Reminds you of relevant approved rules. Explicitly armed regex or secret checks can block a commit.
Local web console Lets you browse, search, edit, review, delete, and restore decisions across your projects.
Claude memory import Imports Claude Code's file-based memory into the decision store, updating existing entries when the source changes.

Keep your CLAUDE.md, AGENTS.md, GEMINI.md, or .cursor/rules files for stable instructions. Contexer adds searchable decisions, revision history, review, and file-linked context alongside them.


How it works

  1. Capture. Contexer detects clear directives, imports supported memory files, and gives your assistant tools to save decisions with their reasoning.
  2. Reuse. Standing rules load when a session starts. Matching decisions can be retrieved as you ask questions or reference files, without loading the entire store.
  3. Review and maintain. Inspect pending items, correct an entry, or update a decision when your approach changes. Earlier revisions remain available.

Ask your assistant in plain English:

What decisions did we make about Postgres?
Store that decision, including why we rejected the other option.
Store that globally: use conventional commits across my projects.

Deep dive: how it works · day-to-day usage & CLI

Review and trust

contexer review

Not all captured knowledge has the same status. Clear user directives can be approved automatically. Repository observations and AI-inferred starting context are usable but explicitly non-authoritative; confidence or repeated scans do not count as human approval. Some other AI-inferred knowledge is available as a labeled suggestion; items marked pending approval wait for your review instead of becoming standing rules.

Proposed changes to an existing decision do not silently replace its current revision. When a proposed update conflicts with the standing decision, Contexer can show both versions, clearly labeling the unreviewed one, so you can choose what is correct.

Use the review command or local console to inspect the reasoning and evidence, approve or edit pending items, and dismiss advice you do not want.


Optional commit checks

contexer guard adds an opt-in Git pre-commit hook with two levels of checking:

contexer guard --install-hook   # wires .git/hooks/pre-commit for this repo (opt-in, not run by `install`)

Reminders by default. A relevant, trusted approved decision linked to or mentioning a staged file surfaces before the commit, which still goes through. This is a reminder to check the rule, not automatic detection of a violation.

Blocking only when you enable it. Arm an approved decision with a machine-checkable rule (contexer guard arm <id> --regex '<pattern>' or --check secret). A detected violation can then fail the commit. Only explicitly armed checks can block; the guard does not interpret arbitrary architectural rules as executable tests.

GUI commit flows (VS Code, Cursor, and similar) run the hook but only surface a blocked commit; the warning-only reminders are terminal output a graphical commit panel won't show you.

The guard fails open (any internal error, or a run over budget, skips checks rather than blocking your commit) and can be bypassed per-commit with CONTEXER_GUARD=0 git commit …, same as any pre-commit hook is bypassed with --no-verify. It's a local nudge, not a substitute for CI: your pipeline's checks are the backstop that can't be skipped from a developer's machine.

Details: mechanism · CLI reference


Browse and manage your decisions

contexer ui --open

A local web console shows what Contexer has stored across your projects, not just the repository you are working in.

Contexer console per-repo dashboard: stored decisions by subtype and status, review queue, global rules, cached team context, and recent decisions

  • Inspect and edit. Search decisions, read their reasoning and revision history, and correct their content without losing earlier versions.
  • Review proposed changes. See pending decisions and before/after diffs for proposed updates.
  • Delete and restore. Remove unwanted decisions while retaining the option to restore them. Deletion markers prevent the same imported entry from immediately reappearing.
  • Switch context. Browse per-repo decisions, global rules, cached team context, deleted entries, and settings.

It binds 127.0.0.1, every route is authenticated, and the server itself never reaches the network. It is also off until you ask for it: contexer ui starts it on demand, and the printed link is short-lived on purpose. Set [ui] autostart = true and every session start hands you the URL for the repo you just opened.

Details, the [ui] settings, and the security model: the local console


Personal Cloud and Teams

The open-source local store works for one developer across supported assistants. Optional hosted services extend where that knowledge is available:

Option What it is for
Local (open source) Keep decisions on your machine and reuse them across your AI assistants. No cloud account required.
Personal Cloud Sync your own decisions across your own machines. Personal sync does not share them with teammates.
Teams (early access) Share decisions through a team review and approval workflow, so teammates' assistants can use shared context.

See personal and team context in action

Watch how Contexer handles your personal decisions and shared team context.

Watch: Contexer personal and team context

Learn more: Personal Cloud & Teams · connection and sharing guide

Limitations

  • Capture is not exhaustive. Contexer does not save every useful conclusion from every conversation. Explicitly ask to store important decisions and review what was captured.
  • Assistant integrations differ. Cursor's hooks limit per-prompt context injection; Gemini CLI restores context on the next turn after compression. See the integration notes.
  • Code changes are signals, not verdicts. A changed file can make a decision worth reviewing, but Contexer cannot guarantee that all stored advice is current or correct.
  • Reminders are not enforcement. Agents can still ignore context, and local commit hooks can be bypassed. Keep tests and CI checks for guarantees you depend on.
  • Sharing is optional. The local store is per-developer. Cross-machine sync and team context require the corresponding hosted service.

Full details: published limitations.

Benchmarks

The published benchmark compares live agent sessions with and without Contexer, measuring token usage, cost, answer quality, and adherence to stored rules.

Published Contexer benchmark results comparing token usage, turns, rule adherence, and session cost

These results describe the measured tasks, not a guarantee for every project. A complete, up-to-date CLAUDE.md ties Contexer on cost in the published comparison. The report includes methodology, deterministic scoring, raw session data, and negative findings.

Read the benchmark →


Documentation

FAQ Product questions, capture limits, authority, privacy, Guards, OSS and Teams
Installation Install, verify, update, uninstall
Integrations Claude Code, Cursor, Codex, Gemini CLI: wiring and parity notes
How it works Capture, bootstrap, session injection, review/versioning, cost, privacy
Usage & CLI Natural-language commands, CLI reference, teams login, troubleshooting, limitations
Local console contexer ui, the seven views, [ui] settings, security model
Decision-impact pilot Explicitly requested file checks, local receipts, consent, setup, and claim limits
Benchmark Live-session A/B methodology, findings (including negative ones), raw data

Contributing

Bug reports, fixes, and documentation improvements are welcome. See CONTRIBUTING.md for setup, code style, and the PR process. Questions or ideas? Join the community on Discord.

License

MIT. See LICENSE for full terms.

The Contexer name and logo are trademarks of Contexer.ai. The MIT license does not grant rights to use the Contexer name, logo, or brand in any way that implies official affiliation.

Metadata

Release files for contexer 0.49.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for contexer 0.49.1
File Size Uploaded
contexer-0.49.1.tar.gz 2.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for contexer 0.49.1
File Interpreter ABI Platform
contexer-0.49.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.0 MB

Release files / contexer-0.49.1.tar.gz

Download URL contexer-0.49.1.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
85609fce45d9cfb101e98ae962201e1fdeb46601de3978f70b794e56ded1f85e
BLAKE2b-256 checksum
How to use checksums
a89d0dd82e52743b9e48b18c05355235e418776c0ac4d270ff051ec07dd65f52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / contexer-0.49.1-py3-none-any.whl

Download URL contexer-0.49.1-py3-none-any.whl
Size 697.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12623490edcfca287f919c40e1b3a35577f64b6a4a27e4fa0a49d4da0c459639
BLAKE2b-256 checksum
How to use checksums
f9dd93687aba32243c6595fb5cbff81bcf5343e7e70286a73880cdcfb5c53258
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.51.1

2 release files

0.49.4

2 release files

0.49.3

2 release files

0.49.2

2 release files

This release

0.49.1 This release

2 release files

0.49.0

2 release files

0.48.2

2 release files

0.48.1

2 release files

0.48.0

2 release files

0.47.0

2 release files

0.45.1

2 release files

0.45.0

2 release files

0.44.0

2 release files

0.43.0

2 release files

0.42.0

2 release files

0.41.0

2 release files

0.40.0

2 release files

0.39.0

2 release files

0.38.0

2 release files

0.37.0

2 release files

0.36.1

2 release files

0.36.0

2 release files

0.35.0

2 release files

0.34.2

2 release files

0.34.1

2 release files

0.34.0

2 release files

0.33.3

2 release files

0.33.2

2 release files

0.33.1

2 release files

0.33.0

2 release files

0.27.0

2 release files

0.26.1

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.24.0

2 release files

0.23.1

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.1

2 release files

0.20.0

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.2

2 release files

0.17.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page