Skip to content

KevinSays/Directorizor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Directorizor

[NOTIFICATION: A file-indexing utility of Considerable Bureaucratic Importance has been detected in your repository. Interaction is, regrettably, permitted.]

Congratulations. You have stumbled upon Directorizor — a cross-platform Bash TUI graciously designed to compensate for your apparent inability to remember where you put things. It will catalog your entire directory tree into a tidy little index, allow you to search said index by filename, list the contents of any folder within that index, open a terminal at the result's location, and — in the event that you have managed to misplace something that the Hoard List has never heard of — it will patiently walk you through the process of updating your own records. As one does.

[NOTE: The Bureau makes no guarantees regarding the emotional state of the user upon discovering how many duplicate files they have been hoarding. That particular horror is yours to bear, free of charge.]

Works on Linux, macOS, Unix, and Windows. No dependencies. No excuses.

Features

  • Instant file search — case-insensitive, partial or exact filename matching
  • Numbered results — pick any result for follow-up actions after a search
  • Persistent index — builds a {folder}-DRZ.md Hoard List so searches don't require re-scanning disk each time
  • Smart update flow — when a file isn't found, prompts to rebuild the index and rechecks automatically
  • Review before saving — Approve or Edit a new Hoard List before it replaces the old one
  • Folder browsing/ls lists directory contents directly from the index
  • Open terminal — launch a new terminal at a result's location; SSH/headless sessions get a cd command instead
  • Custom index location-n / --new-loc saves the Hoard List to any directory you choose
  • Config file — persistent settings at ~/.config/directorizor/config
  • Installer — Linux/macOS system-wide or user install; Windows Git Bash alias; optional central Hoard vault prompt
  • Man pageman directorizor after installation
  • Cross-platform — Linux, macOS, Unix, and Windows (Git Bash / MSYS2)
  • No dependencies — pure Bash, nothing to install

Requirements

  • Bash 4.0 or later
  • find, grep, sed, wc — standard on all Unix-like systems
  • Windows: Git for Windows (includes Git Bash)

Installation

bash install.sh

The installer will ask whether to install system-wide (/usr/local/bin, requires sudo) or for the current user (~/.local/bin), and whether you want a central location for all Hoard List files. On Windows (Git Bash) it adds a shell alias to ~/.bashrc.

To uninstall:

bash uninstall.sh

Manual Usage (no install)

bash census.sh

Or make it executable first (Linux/macOS):

chmod +x census.sh
./census.sh

Directorizor always runs against the directory it is called from.

Searching

Type any filename at the prompt — exact or partial, case-insensitive:

Search> babygroot.stl
Search> shark           # matches any file whose name contains "shark"
Search> .pdf            # find all PDFs in the index

Results are numbered. After a search, an action menu appears:

  [L] List folder contents    [O] Open terminal there    [S] New search    [X] Back

Type a number with L or O to target a specific result (e.g. L2, O1), or just L / O to act on a single result.

Commands

Command Description
/help Show available commands, search tips, and active Hoard List path
/update Rebuild the Hoard List from disk
/show Preview the current Hoard List in the terminal
/ls [path] List contents of a folder (from last results or a given path)
/exit Quit

Flags

Flag Short Description
--new-loc <path> -n Save Hoard List to a custom directory
--config -c Show config file path
--version -v Print version
--help -h Show help
--no-color Disable ANSI color output

Config File

Located at ~/.config/directorizor/config (or $XDG_CONFIG_HOME/directorizor/config).

# Directorizor configuration
hoard_dir=/path/to/central/vault
no_color=1

hoard_dir — override the default Hoard List storage location globally (same as always using -n)
no_color — disable color output

How It Works

  1. On first launch, Directorizor scans the directory it is called from and writes {folder-name}-DRZ.md — a flat index of every file and subfolder path.
  2. Searches run against this cached index, so they're instant regardless of how many files exist.
  3. If a file isn't found, you're prompted to rebuild the Hoard List and recheck automatically.
  4. After an update, choose Approve to replace the old index, or Edit to save it to disk for manual review.

SSH and Headless Sessions

When Directorizor detects an SSH session or a headless environment (no display server), the "Open terminal" action does not attempt to launch a graphical terminal. Instead it prints a ready-to-paste cd command pointing at the target directory.

Files

File Description
census.sh The main program
install.sh Installer (Linux/macOS/Windows)
uninstall.sh Uninstaller
directorizor.1 Man page
{folder}-DRZ.md Auto-generated Hoard List (git-ignored, rebuilt on demand)
~/.config/directorizor/config Optional config file
.gitignore Excludes generated files from version control

Notes

  • Hoard Lists are git-ignored — generated per-machine, not shared
  • The script excludes itself, the Hoard List, and the .claude/ folder from the index
  • ANSI colors are auto-disabled on terminals that don't support them

Acknowledgments

The tone and style of the description and in-app notifications are written as a creative homage to the System voice from the Mage Tank LitRPG novel series by Cornman. No text from the novels was reproduced. If you enjoy the attitude, go read the books — they earned it.

License

GPL-3.0 — see LICENSE for details.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

About

a little search script for making a searchable list of a directory.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors