Running Git Commands from Python
Once scaffold writes all the project files, it needs to turn the directory into an actual git repository - run git init, stage everything, and make the first commit. I went with running the git binary
Search for a command to run...
Once scaffold writes all the project files, it needs to turn the directory into an actual git repository - run git init, stage everything, and make the first commit. I went with running the git binary
With the CLI shell in place, the next problem was what scaffoldr init actually creates. In v0.1.0, every project got the same directory structure and files - README, CONTRIBUTING guide, pyproject.toml
I'd used argparse before. It's clunky - lots of boilerplate for even simple commands. Typer works differently. You write a normal function with type annotated parameters. Typer builds the CLI from the
This series has covered why watchr looks the way it does: TOML for config, debouncing for file events, graceful shutdown, and readable output. v0.1.0 is shipped. This post is about what I'd change, an
In the last post, I covered graceful shutdown. This post is about a bug that wasn't really a bug - just bad output that made watchr hard to actually use. What it looked like Initially, watchr ran your
In the last post, I covered debouncing - how watchr groups rapid file events into a single one. This post covers something smaller but just as important: what happens when you hit Ctrl+C The problem w
In the last post, I talked about why watchr uses TOML for its config file. This one covers how watchr actually watches files - and why debouncing is the piece that makes it usable. The problem You hit
When I started building watchr - a CLI tool that watches directories and runs a command whenever a file changes - I hit a decision early on that felt small but wasn't: what format should the config fi
Everytime I created a new project, I'd go through the same ritual. Create the repo, clone it, set up the directory structure, write the initial pyproject.toml, configure CI, add branch protection, cre