Tiny CLI Tools That Earn Their Keep

Python #cli#automation#productivity

A few dozen lines of Python can replace a habit. Here are the little command-line tools I actually reach for every day.

Not every project needs a framework. Some of my favourite code is under 40 lines and lives in ~/bin.

The pattern

Each tool is a single file, made executable, with a shebang and argparse:

#!/usr/bin/env python3
import argparse

def main():
    p = argparse.ArgumentParser(description="do one small thing well")
    p.add_argument("name")
    args = p.parse_args()
    print(f"hello, {args.name}")

if __name__ == "__main__":
    main()

chmod +x, drop it on your PATH, and it feels like a real command.

Why bother

The value isn’t the code — it’s that the friction of doing the thing drops to nearly zero. A tool I have to think about is a tool I won’t use.