A codebase wiki maintained by AI coding agents.
Project description
CodeAlmanac is a self-updating wiki for your codebase.
Your agent sessions die the moment they end. The decisions, architecture, and dead-ends inside them never compile into anything the next session can reference. CodeAlmanac is that reference layer: a wiki that lives in your repository, written for your agents, and kept up to date from the work itself.
At a glance
- Public command:
codealmanac - Python 3.12+
- Install:
curl -fsSL https://www.codealmanac.com/install.sh | sh - Manual install:
uv tool install --python 3.12 codealmanac - Default repo wiki root:
almanac/ - Custom repo wiki roots: any safe repo-relative directory via
--root - User state root:
~/.codealmanac/ - Cloud commands:
setup,login,whoami,logout,capture,repo, andruns - Local commands live under
local
Get started
Install the CLI:
curl -fsSL https://www.codealmanac.com/install.sh | sh
Manual install:
uv tool install --python 3.12 codealmanac
# or: python -m pip install codealmanac
With your team (cloud) — one shared wiki, updated from everyone's sessions, delivered back to the repo as commits or pull requests:
codealmanac setup # GitHub sign-in + agent instructions
codealmanac capture enable # capture Codex/Claude sessions as source
codealmanac repo setup # configure the current repo in the browser
Agents can run setup too: codealmanac setup --no-browser prints the login URL
for a human to approve, and codealmanac whoami confirms the identity.
On your machine (local) — your repo, your agent credentials, no cloud automation:
cd your-repo
codealmanac init
codealmanac local setup --branch main --delivery commit
codealmanac search "getting"
codealmanac show getting-started
Read commands work without cloud login. Local update jobs use your local agent credentials and write back to your working tree or local commits, depending on the branch delivery policy.
What gets created
The wiki is plain markdown committed to your repository, under almanac/ by
default (docs/almanac/ or any repo-relative directory via --root):
your-repo/
|-- almanac/
| |-- README.md # this repo's notability bar and conventions
| |-- topics.yaml # topic graph
| |-- manual/ # packaged guidance copied for agents
| |-- pages/
| | |-- checkout-flow.md
| | |-- stripe-webhook-deadlock.md
| | `-- jwt-vs-sessions.md
|-- src/
`-- ...
Every page is one stable concept: a flow, a decision, a gotcha, or an
invariant. Pages link into a topic graph with [[wikilinks]]. Browse locally
with codealmanac serve, or in the cloud with codealmanac open.
A folder counts as a CodeAlmanac wiki only when it has both topics.yaml and
pages/. Derived local state appears when commands need it: index.db and
user-level job records are runtime state, not part of the init scaffold.
Principles
- Written for your agents. The primary reader is the AI agent working in your repo. Pages carry what the code can't say: decisions, invariants, gotchas, flows, and known failure modes.
- It's part of your repository. Plain markdown, committed next to the code, every change reviewable in git. You own the wiki, and it travels with every clone.
- Maintained, not just generated. One page per stable concept, a notability bar for what deserves a page, edits in place when facts change. If a session adds no durable knowledge, the wiki is left unchanged. Silence is a valid outcome.
Built for retrieval
The markdown is the source of truth; a derived SQLite index makes it queryable, so the right context reaches the agent at the right moment:
codealmanac search --mentions src/checkout/ # every page about these files,
# before the agent edits them
codealmanac search "auth" # full-text search over the wiki
codealmanac show checkout-flow # read one page
The instruction files installed by setup teach Codex and Claude Code to query
the wiki before touching unfamiliar code. Read commands never invoke a model and
need no credentials.
Commands
| Command | Purpose |
|---|---|
codealmanac |
Open the cloud wiki for the current checkout. |
codealmanac open |
Open the cloud wiki for the current checkout. |
codealmanac setup |
Cloud sign-in plus agent instructions. |
codealmanac login / whoami / logout |
Manage cloud auth. |
codealmanac capture status |
Show Codex/Claude capture status. |
codealmanac capture enable --target codex |
Enable Codex session capture. |
codealmanac capture disable |
Disable capture hooks and revoke the capture token. |
codealmanac repo setup |
Open browser setup for the current repo. |
codealmanac repo triggers enable <branch> --delivery pr|commit |
Choose how cloud updates land for a branch. |
codealmanac runs list|show|logs |
Inspect cloud update runs. |
codealmanac runs start --branch <branch> |
Start a cloud run for a maintained branch. |
codealmanac init |
Build the first local wiki for the current repo. |
codealmanac local setup --branch main --delivery commit |
Configure local branch triggers and delivery. |
codealmanac local update --using codex |
Run a local wiki update now. |
codealmanac local triggers enable dev --delivery commit |
Maintain another branch locally. |
codealmanac local jobs list |
Inspect local update jobs. |
codealmanac search / show / topics / health |
Query the local wiki. |
codealmanac serve |
Start the local wiki viewer. |
codealmanac doctor |
Check install, auth, providers, automation, and wiki health. |
Run codealmanac <command> --help for the full flag surface. Local schedules
stay behind explicit local or automation commands. codealmanac uninstall --yes
removes setup-owned local artifacts; codealmanac uninstall --yes --keep-automation leaves local scheduled automation in place.
Install troubleshooting
The installer uses uv tool install so CodeAlmanac lives in an isolated Python
tool environment. If an older npm or editable checkout shadows the installed
binary, the installer prints both paths. Put uv tool dir --bin earlier on
PATH, then run:
codealmanac --version
codealmanac setup
Privacy
Capture is opt-in, per provider, and reversible. capture status shows exactly
what is on, and capture disable removes hooks and revokes the stored capture
credential. CodeAlmanac never stores your Codex or Claude provider credentials.
Wiki content is canonical in your repository: every change arrives as a commit
or PR you can review, amend, or reject.
Contributing
git clone https://github.com/AlmanacCode/codealmanac.git
cd codealmanac
uv sync
uv run pytest
uv run ruff check .
If CodeAlmanac helps your agents understand a codebase faster, please consider giving the repo a star.
Status
CodeAlmanac is pre-1.0 and under active development. Breaking changes are possible before 1.0 and will be called out in release notes.
License
Apache License 2.0. See LICENSE.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codealmanac-0.1.6.tar.gz.
File metadata
- Download URL: codealmanac-0.1.6.tar.gz
- Upload date:
- Size: 348.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e19653f5800f4faec3ba7ee5514e2c4c54fe0ef94d5e143d7e1b9d462831dc91
|
|
| MD5 |
0b461378049d2e712994fc325b970c08
|
|
| BLAKE2b-256 |
cd1b4d743e262f62bf926114c9007ecb3863b2efc63fe29a4bdf2b43e9112a53
|
Provenance
The following attestation bundles were made for codealmanac-0.1.6.tar.gz:
Publisher:
publish.yml on AlmanacCode/codealmanac
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codealmanac-0.1.6.tar.gz -
Subject digest:
e19653f5800f4faec3ba7ee5514e2c4c54fe0ef94d5e143d7e1b9d462831dc91 - Sigstore transparency entry: 2061903301
- Sigstore integration time:
-
Permalink:
AlmanacCode/codealmanac@a6da193562e74b63387f457a8099e458eba84f79 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AlmanacCode
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6da193562e74b63387f457a8099e458eba84f79 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file codealmanac-0.1.6-py3-none-any.whl.
File metadata
- Download URL: codealmanac-0.1.6-py3-none-any.whl
- Upload date:
- Size: 420.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c522ed4e11a92ecb4f217bc687ce4ebffeed942109eeba597981a018dbf5d5f1
|
|
| MD5 |
1f894c66dc4b34dbd7a2db7b3b920b29
|
|
| BLAKE2b-256 |
125f4558a642c077f0dca854f50ce2e59d366a10a55feaf9a9e8f67280137705
|
Provenance
The following attestation bundles were made for codealmanac-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on AlmanacCode/codealmanac
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codealmanac-0.1.6-py3-none-any.whl -
Subject digest:
c522ed4e11a92ecb4f217bc687ce4ebffeed942109eeba597981a018dbf5d5f1 - Sigstore transparency entry: 2061903605
- Sigstore integration time:
-
Permalink:
AlmanacCode/codealmanac@a6da193562e74b63387f457a8099e458eba84f79 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AlmanacCode
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6da193562e74b63387f457a8099e458eba84f79 -
Trigger Event:
workflow_dispatch
-
Statement type: