2.5 KiB
Raw Blame History

Building Your Own CLI Toolkit: Introducing genesisctl

After weeks of refining backup scripts, documenting resilience routines, and shoveling thousands of lines of shell logic into shape, we now have something more powerful than the sum of its parts: a unified, self-documenting, command-line interface for managing infrastructure scripts — genesisctl.

What is genesisctl?

genesisctl is a simple but powerful Bash tool designed to manage and interact with the full suite of sysadmin scripts under the Genesis infrastructure umbrella. It pulls together documentation, logging, and execution into one cohesive interface.

Features

  • 🔍 describe <tool.sh> — Pretty-prints documentation and metadata from Markdown files auto-generated by our toolchain.
  • 📋 list — Displays all installed tools based on your setup logs.
  • 🚀 run <tool.sh> — Executes a script from your bin/ folder like a command-line native.

Why This Matters

When you're running dozens of bash scripts across multiple machines — backups, verifications, restores, syncs, DR drills — things get messy. With genesisctl, every script:

  • Has structured metadata
  • Lives in a clean hierarchy
  • Comes with a Markdown doc
  • Can be queried or executed with a single, consistent command

Example Usage

# Describe a script and its purpose
$ ./genesisctl describe backup.sh

# List everything you've got installed
$ ./genesisctl list

# Run a ZFS bootstrap script
$ ./genesisctl run zfs_bootstrap.sh

Behind the Scenes

Every time we run our scaffold script (setup_genesis_tools.sh), it:

  • Reorganizes the toolchain into folders (bin/, docs/, archive/)
  • Generates Markdown from script headers (with frontmatter)
  • Logs every install to a central file

Then genesisctl reads that metadata in real-time — no guesswork, no rot.

What's Next

This framework is rock solid for CLI use. Next steps may include:

  • genesisctl doctor — to validate all tools have docs and correct structure
  • genesisctl docgen — regenerate Markdown docs on demand
  • Static site export of docs with category tags

But for now? It's stable, extensible, and battle-tested.

Final Thoughts

If youve ever tried to manage 50+ bash scripts without structure, genesisctl is the toolkit you wish you had. With it, documentation isn't an afterthought — it's baked in.

Stay tuned. This things just getting started.


📁 Repo: Coming soon to Gitea.

📬 Ping @doc if you want help wiring this into your own ops stack.

💀 FailZero approved.