Every command as implemented. Global options come before the subcommand.
| Option | Description |
|---|---|
--version |
Print the package version and exit. |
--knowledge <dir> |
Use this directory as the knowledge repo instead of discovering one by walking up from the current directory. Resolved to an absolute path. |
Workspace discovery order (for every command except init):
--knowledge <dir>if given.AKASHIC_HOMEenvironment variable if set.- Walk up from the current working directory looking for
.akashic/config.yaml.
If none resolve, the command fails with: No Akashic knowledge repo found from <dir>. Run 'akashic init' first or pass --knowledge.
Initialize (or top up) a knowledge repository at PATH (default: current directory).
Creates: services/ flows/ system/ adr/ entities/ glossary/, .akashic/cache/, .akashic/logs/, README.md, .akashic/config.yaml, .gitignore. Runs git init if not already a repo, and makes an empty initial commit if there is no HEAD yet.
- Idempotent: existing directories, README, and config are left untouched;
.gitignorelines are merged, not duplicated. - Registers the knowledge repo in
~/.akashic/config.yamlusing the directory basename as the knowledge base name. If that name already points at a different path, a suffix such as-2is added. - The initial commit is authored as
Akashic <akashic@example.invalid>via-coverrides, so it does not depend on your global Git identity.
.gitignore always contains: .akashic/cache/, .akashic/logs/, .akashic/config.local.yaml.
Output: Initialized Akashic repository at <root>
Print the discovered knowledge repository root. Useful for scripting and for confirming discovery works from a subdirectory.
Register a source Git repository. PATH defaults to the current directory.
- Validates
PATHis inside a Git work tree (git rev-parse --is-inside-work-tree); otherwise errors<path> is not a Git repository. - Name defaults to the resolved directory's basename; override with
--name. - Dedupe by resolved path: re-attaching the same path updates the entry in place (and renames it if
--namediffers). - Unique names: attaching a different path under an already-used name errors
Repository name '<name>' is already attached. - Writes the name to
config.yaml(repositories) and the absolute path toconfig.local.yaml.
Output: Attached <name>
Remove a repository from both config.yaml and config.local.yaml. Deletes no files.
- Unknown name errors
Repository '<name>' is not attached.
Output:
Detached <name>
Generated docs remain; remove them with git rm when ready.
List attached repositories, sorted by name.
No repositories attached.when empty.- Each row is tab-separated:
<name>\t<path>— path present and exists.<name>\t[missing local path]— no entry inconfig.local.yaml(e.g. after cloning the knowledge repo on a new machine).<name>\t<path>\t[missing target]— path recorded but the directory no longer exists.
Compose the master prompt and run the configured agent provider.
Steps:
- Merge
config.yamlrepos withconfig.local.yamlpaths. Repos with a missing/nonexistent path are skipped with a warning. - If no valid repo remains, error
No valid attached repositories found. - Build the master prompt from bundled + custom templates (see generation.md).
- Invoke the provider (
agent.provider). Detect changes viagit status --porcelain(ignoring.akashic/). - Write
.akashic/cache/state.json(timestamp, provider, repos, duration).
- No Git commit or staging is performed — changes are left in the working tree.
- Success = agent exit code 0 and at least one changed file. A clean exit with no changes warns:
Agent exited cleanly but produced no knowledge changes. - Real providers (
claude,codex) run with inherited stdio, so the interactive session takes over the terminal; Akashic waits for it to exit and reads its real exit code. See generation.md.
Output: warnings (to stderr), a Changed files: list (or Changed files: none), and State written: <path>.
Start the local React documentation site (Vite dev server) reading directly from the knowledge repo. Binds 127.0.0.1:<site.port> (default 6969). Blocks until the server exits (Ctrl-C). Installs frontend dependencies if missing, then runs npm run dev. Supports in-browser editing (Save writes back to the knowledge repo; Commit stages and commits via Git). See site.md.
Errors … Node.js not found on PATH. … / … npm not found on PATH. … if Node/npm is missing.
Compile the docs into a static dist/ (via the Vite build). Output: Built site at <root>/dist. In this static mode the site is read-only (no in-browser editing).
Run six checks and print pass/fail for each: configuration schema, Git presence, attached repositories, agent provider, writability, and Node runtime. Exits with code 1 if any check fails. See troubleshooting.md.
Print: attached repositories (with paths or missing local path), last generation (from state.json, or None), pending Git changes (porcelain), and per-section document counts (*.md under each section directory).