| Crates.io | dirdocs |
| lib.rs | dirdocs |
| version | 0.2.6 |
| created_at | 2025-10-02 02:04:46.470387+00 |
| updated_at | 2025-10-07 02:57:29.476086+00 |
| description | Generate terse, one-sentence documentation for files; plus Nushell-style directory viewers (dls, dtree) that surface .dirdocs.nu descriptions. |
| homepage | https://github.com/graves/dirdocs |
| repository | https://github.com/graves/dirdocs |
| max_upload_size | |
| id | 1863769 |
| size | 798,950 |
dirdocs is a Rust-powered CLI that provides file level documentation by leveraging an LLM.
It walks a directory (respecting .gitignore and extra ignores), hashes files, and for each new or changed file, it queries an LLM using the Awful Jade configuration + prompt templates.
The result is stored in a .dirdocs.nu file at the project root — a Nuon-compatible JSON tree of files, each annotated with descriptions, joy metrics, and personality emojis.
.`.
.`~.-:
.`- . -`
.`- . -`
.`- . -`
.`- . -`
.`- . -`
`- . -`
.`- . -`
;- . -`
.- . -`
;. . -`
;. . -`
::._.-`
(.-`
.Y(.
((()))
_)==(_
| .--. |
| '--' |
'------' LGB(plus at least two more letters)
ignore::WalkBuilder to walk the project, applying .gitignore, global gitignore, excludes, and hidden rules..dirdocs.nu and any subdirectory caches so unchanged files are skipped.dir_docs.yaml in your awful_jade config directory.awful_aj::ask with exponential backoff to request descriptions..dirdocs.nu in place with new/changed entries, preserving older cached docs.💡 Use with the included
dlsanddtreebinaries or replace Github commit messages with the Chrome Extension.
cargo install dirdocs
brew install miniconda
conda create -n aj python=3.11
conda activate aj
pip install torch==2.4.0
export LIBTORCH_USE_PYTORCH=1
export LIBTORCH='/opt/homebrew/Caskroom/miniconda/base/pkgs/pytorch-2.4.0-py3.11_0/lib/python3.11/site-packages/torch' # Or wherever Conda installed libtorch on your OS
export DYLD_LIBRARY_PATH="$LIBTORCH/lib"
conda activate aj
dirdocs init
dirdocs [OPTIONS]
-d, --directory <PATH> — Root directory to scan (default .).-i, --ignore <NAMES> — Extra directories to ignore (comma-separated or repeatable).-f, --force — Force regeneration for all files, even if unchanged.# Document the current project
dirdocs
# Document another directory
dirdocs --directory ~/Projects/my-app
# Ignore build artifacts
dirdocs --ignore target,node_modules,dist
# Regenerate everything
dirdocs --force
.dirdocs.nuExample snippet:
{
"root": "src",
"updated_at": "2025-10-01T12:34:56Z",
"entries": [
{
"kind": "file",
"name": "main.rs",
"path": "src/main.rs",
"hash": "f1a23c...",
"updated_at": "2025-10-01T12:34:56Z",
"doc": {
"fileDescription": "Main entrypoint wiring CLI args to internal modules.",
"joyThisFileBrings": 7,
"personalityEmoji": "🦀"
}
}
]
}
dls and dtree to produce colorized tree listings with inline docs.
Awful Jade config from ~/.config/com.awful-sec.aj/config.yaml.~/.config/com.awful-sec.aj/templates/dir_docs.yamldls — ls-style directory listings with .dirdocs.nu docs attached.dtree — tree-style visualization with emoji 🌿 or ASCII connectors.Together with dirdocs, they form a documentation-aware tree + ls.
rust_ast.nu for Rust-specific symbol trees.PRs welcome!
This project is licensed under CC0 1.0 Universal (Public Domain Dedication).
You can copy, modify, distribute, and perform the work, even for commercial purposes, all without asking permission.