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+
- 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.
Get started
Install the CLI (Python 3.12+):
uv tool install codealmanac
# or: python -m pip install codealmanac
On your machine — your repo, your agent credentials:
codealmanac init # build the first wiki for this repo
codealmanac local setup # keep it updating from your commits
codealmanac search "getting"
codealmanac show getting-started
With your team (cloud) — one shared wiki, updated from everyone's sessions, delivered back to the repo as PRs or commits:
codealmanac setup # GitHub sign-in + agent instructions
codealmanac capture enable # capture Codex/Claude sessions as source
Agents can run setup too: codealmanac setup --no-browser prints the login
URL for a human to approve, and codealmanac whoami confirms the identity.
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 — linked into
a topic graph with [[wikilinks]]. Browse it 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 — so the next session starts with context instead of archaeology.
- It's part of your repository. Plain markdown, committed next to the code, every change reviewable in git. This is docs as code: 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 init |
Build the first wiki for the current repo. |
codealmanac local setup |
Configure local self-updating: branch policy + git hooks. |
codealmanac local setup --branch main |
Configure a specific maintained branch locally. |
codealmanac local update |
Run a local wiki update now. |
codealmanac local update --using codex |
Run a local update with Codex. |
codealmanac local triggers enable dev --delivery commit |
Maintain a branch locally. |
codealmanac local jobs list |
Inspect local update jobs. |
codealmanac search / show / topics / health |
Query the wiki. |
codealmanac serve |
Local wiki viewer. |
codealmanac setup |
Cloud sign-in plus agent instructions. |
codealmanac login / whoami / logout |
Manage cloud auth. |
codealmanac capture status |
Show capture status. |
codealmanac capture enable --target codex |
Enable Codex session capture. |
codealmanac capture disable |
Disable capture hooks. |
codealmanac repo triggers enable <branch> --delivery pr|commit |
Choose how cloud updates land. |
codealmanac runs list|show|logs |
Inspect cloud update runs. |
codealmanac doctor |
Check install, auth, 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.
Privacy
Capture is opt-in, per provider, and reversible — capture status shows
exactly what is on, capture disable removes hooks and revokes the stored
credential. CodeAlmanac never stores your Codex or Claude provider
credentials, and 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.2.tar.gz.
File metadata
- Download URL: codealmanac-0.1.2.tar.gz
- Upload date:
- Size: 347.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de84204897386031d7f8369fed2cace423fc98a56232839ffa7b097573b8ae51
|
|
| MD5 |
157738a91e77d94bcb145a9f4a28fe95
|
|
| BLAKE2b-256 |
69b7bff2e49f11587cb27232f15be65a4a0161afc4a866a32f76ad69a915dfc6
|
Provenance
The following attestation bundles were made for codealmanac-0.1.2.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.2.tar.gz -
Subject digest:
de84204897386031d7f8369fed2cace423fc98a56232839ffa7b097573b8ae51 - Sigstore transparency entry: 2057371720
- Sigstore integration time:
-
Permalink:
AlmanacCode/codealmanac@b0a8c5a302d8b5abcb20d7c06c583ddfcba1b453 -
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@b0a8c5a302d8b5abcb20d7c06c583ddfcba1b453 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file codealmanac-0.1.2-py3-none-any.whl.
File metadata
- Download URL: codealmanac-0.1.2-py3-none-any.whl
- Upload date:
- Size: 421.4 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 |
a64c78b5fb71616ed322ac06a5104b304c2c078df49f53bea9464722b826418f
|
|
| MD5 |
e0c50a13c0c541ffc4e3f7e2ff66e683
|
|
| BLAKE2b-256 |
8643a1a53bac61008f2515d0c1cf7efc2e6796df6901983d7c015a02098bbbc4
|
Provenance
The following attestation bundles were made for codealmanac-0.1.2-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.2-py3-none-any.whl -
Subject digest:
a64c78b5fb71616ed322ac06a5104b304c2c078df49f53bea9464722b826418f - Sigstore transparency entry: 2057371874
- Sigstore integration time:
-
Permalink:
AlmanacCode/codealmanac@b0a8c5a302d8b5abcb20d7c06c583ddfcba1b453 -
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@b0a8c5a302d8b5abcb20d7c06c583ddfcba1b453 -
Trigger Event:
workflow_dispatch
-
Statement type: