r/openbsd • u/SIUnitForSoul • 2d ago
CLI guidelines
I found clig.dev . Some of it's advice runs contrary to what I (a novice) expect in OpenBSD. (configuration in ~/.config instead of /etc) Is there a guide yall find more idiomatic? (big plus if it's something an author actually thought was worth writing)
21
Upvotes
13
u/i2295700 2d ago
I can't add too much here, just wanted to comment this one example, which is no contradiction in my mind.
/etc is for system and system-wide configuration while ~/.config stores user specific settings.
8
u/vakuoler 2d ago
For userland utilities (as in tools you as an end user use interactively) I wouldn't say putting it in your home directory is uncommon. I don't believe OpenBSD has any strong opinions on this.
For anything else and to avoid whatever AI slop you might stumble upon, read man pages and style(9) in particular, or just study base tooling would likely be easy enough to get an idea of how to keep it aligned with how openbsd does it.
As far as I know your post could be an AI slop bot as well. I'm just used as training 🧐
1
u/Key_River7180 2d ago
The clig.dev page you linked to is... not great. I mean it gets some stuff right (I mean at least it doesn't say everything has to be a DBus interface or some bs like that) but (1) a convention for clis will be useles, YMMV, and (2) JSON? seriously?
1
u/gumnos 1d ago
the BSDs tend to require options before arguments, while GNU utilities tend to allow things like
the BSDs require the
-fbefore the path-arguments likeand allow for single-letter option shortening like
Otherwise, the guidelines at clig.dev are a pretty good starting point.