| Crates.io | yggdrasil-cli |
| lib.rs | yggdrasil-cli |
| version | 0.3.1 |
| created_at | 2025-09-06 21:55:21.888257+00 |
| updated_at | 2025-12-25 19:33:14.974671+00 |
| description | Yggdrasil is a project flattener and diff engine that turns any subset of your codebase into a single AI-ready codex (index + contents), or compares snapshots with annotated diffs. |
| homepage | https://github.com/andrewrgarcia/yggdrasil-cli |
| repository | https://github.com/andrewrgarcia/yggdrasil-cli |
| max_upload_size | |
| id | 1827653 |
| size | 966,915 |
The god-tree of your codebase
Flatten any subset of your project into an AI-ready codex — index + contents, in one command.
Yggdrasil is a project flattener and diff engine. It builds a single, deterministic codex from whatever subset of your codebase you choose:
[MOVED])Use it for:
Yggdrasil does not guess what you want. You explicitly choose the files — this makes your snapshot deterministic and deeply controllable.
Yggdrasil never prints the entire repo by default. You must specify what to include using any of:
--only <paths…>--show <extensions…>--white <manifest>You may also exclude using:
--ignore--blackFormatting is separate:
--printed → Markdown (SHOW.md by default)--contents --out FILE → explicit output mode--printed does not select files.
It only specifies the output format.
These examples are accurate and guaranteed to work because they always include a file-selection flag.
.rs and .md files as Markdownygg --show rs md --printed
ygg --only src/main.rs \
src/scanner \
src/snapshot/format_selection.rs \
src/snapshot/writer.rs \
--printed
WHITE.md:
src/lib/model.rs
src/app/main.tsx
README.md
Command:
ygg --white WHITE.md --printed
--contents --outMarkdown:
ygg --show py --contents --out PY_SNAPSHOT.md
Plain text:
ygg --show rs --contents --out snapshot.txt
ygg --show rs
ygg --show py md txt
ygg --only src --printed
Yggdrasil can split large codices into LLM-safe shards while preserving structure.
Use --split to divide output into multiple standalone codex files:
ygg --only <...> --printed --split
ygg --only <...> --printed --split 8
ygg --white <WHITE.md> --printed --split 10
ygg --whited --split
ygg --whited --split 30
Each shard:
Splitting is expressed in thousands of tokens, not raw token counts.
This allows large projects to pass through constrained context windows intact — piece by piece.
--whited.--white never triggers interactive input.
--whited Shortcut (Interactive)--whited enables the fastest workflow:
--white--contentsSHOW.md automaticallyRun:
ygg --whited
You will see:
Enter WHITE patterns (one per line):
Tip: Paste your paths (e.g., from VS Code → Copy Relative Path).
Finish with Ctrl+D (Linux/macOS) or Ctrl+Z then Enter (Windows).
Paste:
src/main.rs
src/utils/io.rs
README.md
Then Yggdrasil generates SHOW.md automatically.
This is the only flag that triggers interactive paste mode.
Compare directories:
ygg diff src/ -- old_src/
Compare specific files:
ygg diff controller.py -- controller_old.py
Align annotations:
ygg diff --align-tags src/ -- old_src/
Diff features:
[MOVED → file:line] annotationsRequires Rust:
cargo install yggdrasil-cli
Ensure ~/.cargo/bin is in your path.
Install from local source:
cargo install --path . --force
In Norse myth, Yggdrasil is the world-tree unifying realms. This tool unifies your project structure into one portable artifact.
Design principles:
--white and interactive --whited--ignore, --black--only and --show filters--align-tags--printedMIT License.