Show HN: ut – Rust based CLI utilities for devs and IT (github.com)

170 points by ksdme9 ↗ HN
Hey HN,

I find myself reaching for tools like it-tools.tech or other random sites every now and then during development or debugging. So, I built a toolkit with a sane and simple CLI interface for most of those tools.

For the curious and lazy, at the moment, ut has tools for,

- Encoding: base64 (encode, decode), url (encode, decode)

- Hashing: md5, sha1, sha224, sha256, sha384, sha512

- Data Generation: uuid (v1, v3, v4, v5), token, lorem, random

- Text Processing: case (lower, upper, camel, title, constant, header, sentence, snake), pretty-print, diff

- Development Tools: calc, json (builder), regex, datetime

- Web & Network: http (status), serve, qr

- Color & Design: color (convert)

- Reference: unicode

For full disclosure, parts of the toolkit were built with Claude Code (I wanted to use this as an opportunity to play with it more). Feel free to open feature requests and/or contribute.

25 comments

[ 3.0 ms ] story [ 40.6 ms ] thread
Very neat.

Although philosophically I prefer the unix approach of "do one thing and do it well", I really admire this tool. I think it might be the fact that the one thing this does well is curating a set of functions for a particular profile of developer. My story is someone doing web focused full stack development?

It might be worth doing a survey of your users to see what they use ut for and what areas you should focus on next.

Why is everything in the same binary? Why not multiple binaries, one for each function? That way people can install only the ones they need, a-la Unix tools: do only one thing and do it well.

I also have the exact same tools but written in Go. Rust would be a nice upgrade (lower footprint) but to keep them all in the same binary is a bit silly.

Slightly odd suggestion: package it up as both a Python and an NPM module - both just thin wrappers around the combined binary - and then people within those ecosystems will be able to run:

  uvx ut md5 ...
Or:

  npx ut md5 ...
To execute it without having to figure out cargo or how to add a Rust binary to their path.

I've seen a few tools do things like this recently, it's a pretty interesting pattern. I believe there's tooling in the Python/Rust world that makes compiling the different binary wheels relatively easy using GitHub Actions.

is this stuff not pretty easy to do with python?

``` python -c "import base64; print(base64.b64encode('$INPUT_STRING'.encode('utf-8')).decode('utf-8'))" ```

Also with Go:

  $ go run github.com/dolmen-go/goeval@master 'fmt.Println(base64.StdEncoding.EncodeToString([]byte(os.Args[1])))' foobar
  Zm9vYmFy
Many of this utilities are bundled with the "openssl" tool:

  $ echo -n foobar | openssl base64 -e
  Zm9vYmFy
How about uuidv7? That’s catching on, as it’s got improved sortability / clustering behavior in DBs
I can understand why people would find `ut` convenient. That said, I would caution against trying to include too much functionality. What is too much? I don't have a clear idea on this yet.

But I would probably argue that including HTTP functionality is going too far. Why? Because there are already amazing tools dedicated to this already. On the client side, see `xh` [1]. On the server side, see `miniserve` [2]. Both have approximately 7K stars on GitHub.

It seems wiser to let specialized projects focus on a particular functional area; this is better for users and less work for maintainers.

[1]: https://github.com/ducaale/xh

[2]: https://github.com/svenstaro/miniserve

Thanks for disclosing your use of GenAI, that kind of transparency is nice to see up front. On that note though, I took a random example (`calc.rs`) and noticed there was no unit or integration testing validating the parsers or etc. did what was expected of them, or that the end results were correct. Are tests for these tools planned? I get sketched out a bit when I see GenAI code with no automated validations, but I really want to like this tool because it fills such an interesting niche :)
This project cleverly combines formal verification with AI ethics! Using mathematical certainty to constrain AI's uncertainty is like adding a transparent audit window to a "black box." Wadler would surely smile knowingly upon seeing this semantic ledger specification—theory has finally been transformed into verifiable practice From philosophical aphorism to verifiable fact, this is a brilliant path
The first thing I checked was how hashing is implemented and two things stand out to me:

1. Input must be valid UTF-8. 2. stdin is read to EOF instead of being read incrementally

Neither are ideal and can make ut unfit for a fair few use cases.

> ut – Rust based CLI utilities for devs and IT

In this title you tell exactly zero information about what your tools actually do, but somehow find it important to mention the language they're written in.

> Data Generation: uuid (v1, v3, v4, v5)

The new versions 7 and 8 are really a must these days, especially v7.

Someone contributed v7 already!
As it is a utility toolkit, I'd like to have:

- the Web & Network section expanded: the copyparty features (github.com/9001/copyparty) and curlie (github.com/rs/curlie).

- compress/decompress features with password: it doesn't need to use the best compress algorithm, gzip is good enough.

Why would a user of these tools care about what language they are written in?
On HNH it matters to get votes.
When importing a library, it becomes part of your project, therefore it becomes your responsibility to ensure that the imported code is safe and sound.

I am seeing the list of dependencies, and even without looking at the transitive ones, I am sure you didn't review any of those, nor will properly maintain that huge list.

That's a supply chain ticking bomb in my book.

I like Rust, but most projects look like kindergarten collage with no regards to security.

This is literally anti-unix.

  $ which ut
  /usr/local/games/ut/ut
I checked for conflicts but didn't go all the way to check for games. What is that anyway?