Just CLIs; wcurl; Rerere
Welp. There was supposed to be a Bonus Drop yesterday, but I went down a duck-shaped rabbit hole making an extension (for the coolest database ever) that lets you treat network packet captures (PCAPs) as rectangular data structures.
That also put me a bit behind on today’s Drop, so we’ll keep it focused on three very different topics that all make your digital life a bit simpler.
TL;DR
(This is an AI-generated summary of today’s Drop using Sonnet via Perplexity.)
- Just CLIs: Discusses using justfiles to create an internal CLI for organizations, based on Chay Choong’s post on “Creating an internal CLI” (https://blog.chay.dev/create-an-internal-cli/).
wcurl: Introduces wcurl, a wrapper around curl that simplifies file downloads with sane defaults, available in newer curl distributions (https://github.com/curl/wcurl).rerere: Explains Git’s “reuse recorded resolution” feature, which remembers and automatically applies previous conflict resolutions, enabled with the command “git config –global rerere.enabled true”.
Just CLIs

It’s no seekrit that I adore justfiles. Fundamentally, they’re a modern alternative to Makefiles, and fit into a class of CLI tools that I shall dub “task runners”. Except — it turns out — they’re even cooler than I already thought they were, and aren’t merely runners of tasks.
To be pretty up-front, I feel somewhat daft for not realizing the potential of these justfiles the same way Chay Choong has in this epic post on Creat[ing]an internal CLI (for organizations) by using jusfiles!
Chat starts off by underscoring the value of an internal CLI, highlighting its ability to preserve institutional knowledge by encapsulating useful snippets, scripts, and workflows. By offering a centralized approach to handling organization-wide tasks — such as installing tools, generating boilerplate code, and executing complex commands — the post argues that a well-designed CLI can significantly enhance operational efficiency.
The design and implementation strategy proposed by Choong is both meticulous and approachabe. The CLI features a common entry point (acme <command>) that is accessible from any location, supports easy contribution of new commands without requiring a deep understanding of syntax, and ensures cross-platform compatibility. Discoverability is also prioritized, making it easy for users to find available commands. The decision to use just as the foundation for the CLI is particularly astute, given its cross-platform capabilities and its similarity to the widely-adopted make.
Practical examples provided in the post demonstrate the versatility of this proposed CLI. Examples range from simple recipes for tasks like retrieving an AWS IAM identity, to platform-specific and cross-platform recipes, as well as more complex workflows embedded within recipes.
The post also covers the sharing and updating process, advocating for the use of Git for version control and distribution. This approach leverages existing infrastructure and familiar tooling while incorporating an update mechanism (acme update) to ensure the CLI evolves over time. Chay emphasized the need for thorough documentation, and also focuses a bit on the need for user adoption (with helpful suggestions).
I learned some new capabilities that exist in justfiles, and I think almost everyone will benefit from this quick read, even if you aren’t a justfile acolyte.
wcurl

Much like Raymond, everybody 💙 curl. But, I will gladly admit, having to type the output filename for a quick download usually has me reaching for the venerable wget pretty quickly.
That is, until now.
curl distributions are now shipping with wurl, “a simple wrapper around curl to easily download files”. (This next bit is shamelessly pilfered from the README).
Simply call wcurl with a list of URLs you want to download and wcurl will pick
sane defaults.
If you need anything more complex, you can provide any of curl’s supported
parameters via the –curl-options option. Just beware that you likely
should be using curl directly if your use case is not covered.
By default, wcurl will:
- Encode whitespaces in URLs;
- Download multiple URLs in parallel if the installed curl’s version is >= 7.66.0;
- Follow redirects;
- Automatically choose a filename as output;
- Avoid overwriting files if the installed curl’s version is >= 7.83.0 (–no-clobber);
- Perform retries;
- Set the downloaded file timestamp to the value provided by the server, if available;
- Disable curl‘s URL globbing parser so {} and [] characters in URLs are not treated specially.
If you can’t wait for your distro to catch up, just grab the shell script and start wurling away!
Rerere

(This one is filed in the “I should really read the entire Git manual some day” category.)
The rerere feature in Git, short for “reuse recorded resolution,” is an often overlooked (at least by me) but valuable feature of this widely-used version control utility. This feature is designed to help us streamline our workflow by remembering how we have resolved conflicts in the past and automatically applying those solutions when the same conflicts arise again.
Essentially, rerere acts as a memory for conflict resolutions. It keeps track of how conflicts were handled previously, building a knowledge base of past solutions. When a similar conflict occurs in the future, rerere can automatically apply the previously used resolution, saving time and reducing the chance of errors.
This tool is particularly useful in situations where long-lived feature branches or frequent rebases are involved. Instead of having to resolve the same conflicts repeatedly, rerere allows developers to reuse their past work, making the merging process much smoother and less frustrating.
To enable rerere, you simply need to run the following command:
git config --global rerere.enabled true
Once enabled, rerere will quietly do its work, reducing the manual effort required to handle merge conflicts. Each conflict resolution it records becomes part of its growing database, further enhancing its ability to assist with future merges.
While it may seem like a minor feature in the grand scheme of Git’s capabilities, rerere can have a significant impact on your workflow. By automating the repetitive task of conflict resolution, it allows you to focus more on writing code and less on resolving the same conflicts over and over again.
This one was a no-brainer to enable immediately.
FIN
Remember, you can follow and interact with the full text of The Daily Drop’s free posts on Mastodon via @dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev ☮️
Leave a comment