indytag
v1.5.0
Published
Tag paths, write agent ignore rules and directory indexes, then import a manifest or index to move, recycle, delete, zip or export the paths it lists. One Python file, no dependencies, wrapped in a charmbracelet-style gold TUI.
Maintainers
Readme
indytag
Tag paths in a tree, turn those marks into durable artifacts agents can consume, then act on the inventory later.
- Tag — pick files/folders and assign labels (
project,skill,vault, … or custom). - Write rules + indexes — emit ignore rules, per-tag files,
index.md, and a.indytag/inventory. - Act — import that inventory (or scan a scope) and move / recycle / delete / zip / csv / meta / dedupe / atomize.
One Python file, standard library only. The npm package is a thin launcher: it finds a Python 3 interpreter and hands it the real terminal, so the interactive selector keeps its raw-mode keys, mouse and animation.
npm i -g indytag
indytag # interactive TUI, on the folder you are standing in
indytag . # tag + index this folder, selector first
indytag --no-select --yes # scripted run, no promptsThe indytag TUI
Run indytag (or indytag <directory>) in a terminal and it opens a full-screen,
charmbracelet-flavoured front door: rounded gold-gradient panels, a coin-rain
and molten-gold backdrop, gems glinting in the melt, and a menu floating over
it. It targets the specified directory or active root (the folder you launched it from)
and never indexes its own install directory.
| Key | Action |
|---|---|
| ↑ ↓ / j k | move |
| Enter | choose / activate |
| / | filter the menu |
| q / Esc / Ctrl-C | back / leave indytag |
The main menu features modular submenus:
- Tag & labels…:
Tag current root— execute tag pipeline on active root.Change target dir…— browse or choose another directory.Select active labels— toggle active labels for tagging.Create new label…— add custom tags with interactive prompt.Update label…— rename existing labels.Remove label…— delete labels.Reset labels— restore default tag set.
- Change directory…:
Search by name…— deep scan downward for folders.Type path…— enter a target directory path directly.Recent directories…— quick jump to recently opened paths.Favorite directories…— pinned favorites and instant bookmarking.Current directory— reset target to launch folder.Drive roots…— jump to filesystem drive roots (C:\,D:\,/).Vaults discovery…— automatic discovery of Obsidian vaults (.obsidian) and git projects (.git).
- Index directory…:
Default index— standard 4-layer depth overview index.4 level only— explicit depth cap of 4 layers.All layers— full recursive index tree.Target directory…— index a specific custom folder.Whole drive— index entire drive root.
- Settings…:
Customize tag colors…— assign palette colors (Ruby, Gold, Emerald, Sapphire, etc.) to labels.Configure active tags…— toggle which tags participate in pipeline runs.Toggle animations— toggle particle and molten background simulation on/off.Wipe all tags on current root— clean.ignore,.aiignore,tags.*, and.indytag/artifacts with confirmation.
- Import, Metadata, Dedupe, Atomize:
- Import manifest/index to list, csv, zip, move, recycle, or delete.
- Metadata CSV export (size, mode, sha256).
- Dedupe (Recycle Bin) and Atomize (permanent delete). Dangerous actions always pass through a red confirm panel.
Picking any folder
"Choose another root…" opens a browser that starts at the active root but is never trapped there:
| Key | Action |
|---|---|
| ↑ ↓ / j k | move |
| → Enter / l | open the folder |
| ← Backspace / h | up one level (..) |
| Space / o | use the highlighted folder as the root |
| u | use the folder you have open |
| s | deep search under the current folder, by name |
| / | fuzzy-filter the listing |
| d | jump to the drive list (every drive on Windows, / elsewhere) |
| r | filesystem root |
| ~ | home |
| c | back to the launch folder |
| Tab | show/hide dotfolders |
| q / Esc | back |
Search and filter highlight the matched characters, skip node_modules,
.git, __pycache__, .indytag and friends, and stop on a time budget so a
swollen tree can never freeze the screen.
The gold splash
The tag/index run opens on an animated splash: rain falls the full width of the
terminal, each drop adds volume where it lands, and the heap slumps under its
own weight as the run advances — 24-bit colour, no dependencies, skipped
entirely for --no-gold, NO_COLOR or INDYTAG_NO_GOLD.
Root, search, find
The root defaults to the active root: the folder you ran the tool from.
It is never the folder indytag.py lives in, so a global install or an
npx/npm exec run indexes what you meant.
indytag # active root (cwd)
indytag --root ../other # explicit folder
indytag --nearest # climb to the nearest project root (.git, .indytag, package.json, …)
indytag --find vault # hunt downward for a folder named `vault`
indytag --search invoice # open the path tree already filtered to `invoice`
indytag --tui # force the indytag TUI
indytag --no-tui # never open it (pipes already skip it)--search is the selector's initial filter (also reachable with / or s
inside the tree); --nearest and --find decide which folder the run works
on.
What it writes
Run against a folder and it produces:
| Path | What it is |
|---|---|
| .ignore, .aiignore | gitignore-syntax rules for the paths you tagged |
| .indytag/tags.<tag> | one rule file per tag (e.g. tags.project, tags.vault) |
| index.md | layered directory index for humans and agents |
| .indytag/manifest.json | counts, tag map and file locations |
| .indytag/inventory/ | index.md, manifest.json, list.csv |
| .indytag/index/ | index-all.md, manifest-all.json (full depth) |
Everything except index.md and .ignore lives inside the hidden .indytag/
container, so the folder you aimed it at stays readable.
Default tags
project skill agent archive review private vault app frozen staleFiles written: .indytag/tags.project, .indytag/tags.skill, … one per tag.
Add your own with --tags (comma list). Custom names become tags.<custom> the same way:
indytag . --tags project,skill,mine,yoursInteractive selector
indytag . # tag + index, selector first
indytag . --no-select --yes # scripted run, no prompts| Key | Action |
|---|---|
| Space | tag / untag the current path with the active tag |
| Tab, 1–9 | switch the active tag (first nine presets) |
| a / n / i | tag all / clear all / invert for the active tag |
| / or s | search; Enter keeps it, Esc clears it |
| ← → e c | collapse, expand, expand all, collapse all |
| Backspace / 0 | clear tags on the current path |
| Enter | save and continue |
| q / Esc | cancel, write nothing |
A faint coin-rain runs behind the tree, tag chips are inverse-gold pills, and
the footer keeps the charm help-bar shape (SPACE tag · TAB next tag · …).
Import a previous run
Point --import at a manifest.json, index.md or list.csv written by
indytag, or by the standalone index.py that shares the same manifest shape.
The format is detected from the content, so the file name does not matter.
indytag --import .indytag/inventory/manifest.json # asks what to do
indytag --import index.md --action list # just print them
indytag --import index.md --action csv --target picks.csv
indytag --import manifest-all.json --action zip --target bundle.zip
indytag --import index.md --action move --target ../keep # keeps layout
indytag --import index.md --action recycle --pick 'build/*'| Action | Effect |
|---|---|
| list | print the imported paths, change nothing |
| move | move into --target, root-relative layout preserved |
| recycle | Recycle Bin on Windows, .indytag/trash/<stamp>/ elsewhere |
| delete | permanent removal of the imported paths |
| zip | one archive, root-relative entry names |
| csv | imported paths only: path, kind, size, modified, tags |
| meta | full scope walk → rich CSV (size, times, mode, sha256) |
| dedupe | byte-match duplicates in a scope; recycle extras |
| atomize | byte-match duplicates in a scope; permanent delete extras |
The indytag TUI can drive the same actions: pick a manifest in the browser, then choose list / csv / zip / move / recycle / delete, with a text field for the target and a red confirm for anything irreversible.
meta
One row per file. Does not need an import when you pass a scope:
indytag --action meta --scope other --other ./tree --target meta.csv
indytag --action meta --scope workspace --no-hash # skip sha256
indytag --action meta --scope drives --drive C:\ --drive Z:\Columns: path, name, parent, kind, extension, size_bytes, size_human,
created_utc, modified_utc, accessed_utc, mode, sha256, is_symlink,
symlink_target, exists.
dedupe vs atomize
Both scan a scope (workspace / drives / all / other), group files by
size then sha256, keep one copy per set, remove the rest.
| | dedupe | atomize |
|---|---|---|
| extras go to | Recycle Bin (or .indytag/trash/) | permanent delete — no recycle |
| confirm | yes (unless --yes) | yes, stronger wording (unless --yes) |
indytag --action dedupe --scope other --other ./tree --dry-run
indytag --action atomize --scope other --other ./tree --yesSafety: absolute paths, drive letters and .. segments are refused and
counted, a nested path collapses when its ancestor is already selected,
--dry-run writes nothing, and a non-interactive run needs --yes before
anything is moved, recycled, deleted or atomized.
Every command, with expected output
COMMANDS.md lists every command and flag combination with the
output it is expected to produce, generated by running them:
python tools/commands.py # regenerates COMMANDS.md, refuses to write lies
python workshop/test_commands.pyThe test suite checks three layers per command: the exit code, that documented
line, and the real filesystem effect (files created, moved, recycled,
deleted, zipped, hashed, or provably untouched for --dry-run).
Requirements
Python 3.8 or newer on PATH. Override the interpreter with
INDYTAG_PYTHON (or PYTHON). Node 18+ is only needed for the npm launcher.
indytag --version
indytag --helpTests
python workshop/test_ui_render.py # selector + chooser frames
python workshop/test_tui_fidelity.py # diff paint, ascii, narrow, mouse
python workshop/test_hoard_ui.py # indytag TUI + folder picker
python workshop/test_commands.py # every command: exit, voice, effect
python workshop/test_import_e2e.py # every import format and action
python workshop/test_root_scope.py # active root, --nearest, --find, --version
python workshop/test_submenus_and_settings.py # submenus, settings, CLI root, rebrand
# or: npm test