Skip to main content

CodeAlmanac

CodeAlmanac is a local codebase wiki maintained by AI coding agents.

It keeps durable project knowledge next to the code: decisions, workflows, invariants, incidents, gotchas, and context from real engineering sessions. The wiki is markdown in your repository, backed by a local SQLite index for fast search.

Current Status

This Python rewrite is usable as a local alpha. It is not the old Node CLI and it does not require a hosted service.

  • Public command: codealmanac
  • Repo wiki root: almanac/ only
  • Alternate repo wiki roots: none
  • User state root: ~/.codealmanac/
  • Runtime: Python 3.12+
  • Storage: local markdown plus derived state under ~/.codealmanac/

Install

From a published package:

uv tool install codealmanac

or:

python -m pip install codealmanac

From this checkout:

uv sync
uv run codealmanac --help

Setup

Install global agent instructions for the local tools you use:

codealmanac setup --yes
codealmanac setup --yes --target codex
codealmanac setup --yes --target claude

Plain setup installs local agent instructions plus the default local automation: sync, Garden, and daily package update. It does not connect to a hosted service.

codealmanac setup --yes --sync-every 5h
codealmanac setup --yes --sync-off
codealmanac setup --yes --garden-off
codealmanac setup --yes --no-auto-update

During interactive onboarding, setup asks whether to keep CodeAlmanac up to date automatically. --yes chooses the default happy path and enables it.

To uninstall CodeAlmanac-owned local artifacts:

codealmanac uninstall --yes

Quickstart

Inside a repository:

codealmanac init
codealmanac search "getting"
codealmanac show getting-started
codealmanac serve

init creates a local wiki scaffold under almanac/. CodeAlmanac does not support alternate repo wiki roots.

Daily Read Surface

Agents and humans use the same local read commands:

codealmanac search "checkout timeout"
codealmanac search --mentions src/checkout/
codealmanac show checkout-flow
codealmanac topics
codealmanac health
codealmanac validate

Use --wiki <name> to read another registered local wiki. By default, commands target the exact current directory when it is a registered repository root.

Updating The Wiki

Lifecycle commands can ask a configured local agent harness to edit wiki pages. They only allow source edits under almanac/.

codealmanac ingest README.md --using codex
codealmanac ingest github:pr:123 --using claude
codealmanac garden --using codex

ingest folds selected local material into the wiki. Inputs can include files, directories, Git diffs, commit ranges, GitHub PRs or issues, URLs, and local agent transcripts.

garden improves the existing wiki graph: stale pages, links, topics, weak leads, duplicate pages, and unsupported claims.

No-op is valid. If the material adds no durable wiki knowledge, the harness should leave the wiki unchanged.

ingest and garden create queued runs and start a local worker. Use codealmanac jobs and codealmanac jobs attach <run-id> to follow them.

Sync And Automation

sync scans local Claude and Codex transcript stores, finds conversations active since the last completed sync, and queues ordinary local ingest runs.

codealmanac sync status --from codex
codealmanac sync --from codex --using codex
codealmanac automation install sync --every 5h
codealmanac automation install update --every 24h
codealmanac automation status

Scheduled automation launches local sync, garden, or update commands with explicit unattended policy. It is local scheduler state, not cloud sync. Scheduler logs live under ~/.codealmanac/logs/.

Jobs

Lifecycle runs are recorded under ~/.codealmanac/:

codealmanac jobs
codealmanac jobs show <run-id>
codealmanac jobs logs <run-id>
codealmanac jobs attach <run-id>
codealmanac jobs cancel <run-id>

Run logs include source-resolution facts, harness events, safety errors, and terminal status.

Providers

CodeAlmanac currently supports local Codex app-server and Claude Agent SDK harnesses.

codex login
claude auth login
codealmanac doctor

Read commands do not need provider credentials. Write-capable lifecycle commands need the selected harness to be available and authenticated.

What Gets Created By Init

With the default root:

your-repo/
|-- almanac/
|   |-- README.md
|   |-- topics.yaml
|   |-- architecture/
|   |   |-- README.md
|   |   `-- indexer.md
|   |-- decisions/
|   |   `-- local-first.md
|   `-- guides/
|       `-- setup.md
|-- src/
`-- ...

Markdown pages live directly under almanac/ in meaningful folders. topics.yaml organizes pages across folders. README.md files act as landing pages for their folder routes.

For auto-detection, a repository counts as a CodeAlmanac wiki when almanac/topics.yaml and almanac/README.md exist.

Runtime State

Derived local state lives under ~/.codealmanac/:

~/.codealmanac/codealmanac.db
~/.codealmanac/repos/<repo-id>/index.db

The local database records repositories, runs, run events, worker locks, and sync state. Per-repository runtime files contain derived indexes. They do not belong in the committed almanac/ tree.

Configuration

User config lives at:

~/.codealmanac/config.toml

Project config lives at:

almanac/config.toml

The first supported defaults are:

auto_commit = true

[harness]
default = "codex"

CLI flags still win over config.

auto_commit means lifecycle prompts may tell the selected agent to use normal Git commands for wiki source changes. CodeAlmanac does not stage files, split diffs, or commit internally.

codealmanac setup --no-auto-commit
codealmanac config set auto_commit false
codealmanac config set auto_commit true

Local Viewer

codealmanac serve

The viewer is read-only. It renders pages, search, topics, backlinks, and file-reference navigation from local wiki data. By default it can switch across available registered local wikis. Use codealmanac serve --wiki <name> to narrow the viewer to one wiki.

Public Contract

This rewrite is local-only for now.

  • No hosted login/connect/upload commands.
  • No public SDK or MCP package.
  • No compatibility aliases.
  • No alternate wiki roots.
  • No hidden cloud write path.
  • No second wiki command name.

Hosted integration can be added later around the same repo-owned wiki artifact, but it is not part of this release surface.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codealmanac-0.3.1.tar.gz (272.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codealmanac-0.3.1-py3-none-any.whl (327.3 kB view details)

Uploaded Python 3

File details

Details for the file codealmanac-0.3.1.tar.gz.

File metadata

  • Download URL: codealmanac-0.3.1.tar.gz
  • Upload date:
  • Size: 272.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for codealmanac-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2d6218a481eb3e23c7c8e9fddebcccbd364076f136bc5e781e23fcdb804ec608
MD5 3bf51c5db7323a852edab80e34bcecd8
BLAKE2b-256 26f76eabe3736585d4c821787fdd4e65accdeafcb20781928f8f3a006a6c59bc

See more details on using hashes here.

File details

Details for the file codealmanac-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: codealmanac-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 327.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for codealmanac-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d9fd501f32181f141a6def780acc10f80c59af49c706bfedc3c1fddbf76d301
MD5 e21ec589efa8123d6219fb037635722a
BLAKE2b-256 494f4186cbbee4bc76120bae4f08c4947552c857dbaa9a44f4f4d27e20a5af4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page