The core utilities of https://github.com/xplshn/Andes.
A-Utils is a growing set of utilities, some are meant to replace the ones you are using right now while others are simple commands that are great to have, like wttr
or issue
.
The code in this repo is largely inspired by u-root
, various commands like ed
are direct modifications upon u-root
's implementations. A-Utils won't implement commands without any reason. If the command is already available in u-root
and it is a suitable, POSIX compliant implementation, there isn't much reason to add it here without modifications.
I am tired of confusing BSD additions, GNU extension and flags added for compatibility with non-POSIX systems. I plan to implement every program that u-root
lacks, or hasn't implemented as per the POSIX specifications, implementation deviations will be marked in the help pages/manual pages as a note stating: "This is NOT POSIX".
Also, I got bored, so I started writting utilities for fun.
- Implement commands that are specific to SunOS/Solaris/Illumos/Plan9/OtherNonGNUThings/NonBSDThings.
- BSD & GNU commands that aren't in the spirit of BSD nor GNU (bloat) should be implemented.
- Use "flag files", whenever feasible and in places that make sense. https://github.com/u-root/u-root/blob/pkg/uflag/flagfile.go. Config files suck.
- The output of commands should be pretty, distinguishable and easy to follow-up if you've been in the terminal for way too much time, colors and other ANSI atributes should be used. Programs should not however use these special atributes when their output is being captured/redirected.
- Transforming extended flags of commands, like BSD's cat -v, into independent programs that execute the specific functionalities of those flags, so as to keep the functionality, but in the spirit of Unix.
- Extend Unix commands without using flags nor changing behavior. For example, I might add colors to enhance the readability of some commands, but have that automatically turn off when our output is being piped or captured by/into another program.
- Avoid repetition. Won't implement commands which's functionality could be reduced to piping 2 or 3 commands together
- Scripting is a priority, thus the commands MUST have reliable output
- Implement interrupt channels (CTRL+C as defined behavior of the programs) in programs that may need them
I am very much against bloat, but I enjoy challenges, which translates into me implementing things I shouldn't and slapping the label "Feature" on-top. If you ever find a so called "feature" like this, do tell me why it is feature creep.
- Should this project adopt all of U-Root's commands and improve upon them? Or should
a-utils
only have in its repo commands that have been modified/improved upon already? - Is making
u-root
commands behave as the POSIX implementation decreed them be something that should be upstreamed?
- Ed with syntax highlighting (ed from u-root but with syntax highlighting)
catv
, the harmful features ofcat
ccat
, syntax highlighted catfortune
, the cookie reader program, it gives you a random quote each time you execute itgetconf
, the POSIXgetconf
programissue
, reads an "issue" file (/etc/issue or a user-suplied one)printf
, the POSIXprintf
commandtest
, the POSIXtest
command with some extensions for compatibility with "extended" shells and their scriptshpwd
, an implementation ofpwd
that replaces your $HOME with a prefix such as~
or something else. For use with PS1 on strict POSIX shellswttr
, get's weather info fromwttr.in
cal
, an implementation of the POSIXcal
command, as described in the OpenBSD manpage, that strives to have the same alignment as Busybox's and has (or tries to have) the Toybox'scal
option to highlight specified dayssed
implementation in Go, didn't add extensions. (doesn't comply, fails standard tests)fin
, file info command, from Torgo, created by "as" and now maintained by @xplshn (me)walk
, walk command, from Torgo, created by "as" and now maintained by @xplshn (me), this command walks a directory based on various rules and it print each file's full path to STDOUTlisten
, listens and announces on a network port, ported from Torgodial
, dials a network endpoint, ported from Torgorelf
, a program that shows you the sections of an ELF file and can also guess what the unknown "sections" containisainfo
, like the SunOS command, it will show info about your architecture, capabilities, bits, etc.envsubst
, works like the built-in that many shells have. https://manned.org/man/alpine/envsubstimportenv
, lets you access variables defined in the namespace/scope of another processnoroot-do
, lets youchroot
into arootfs
without root, it comes with various default presets of options, for different levels of sandboxing, etc, you can see those using the--info
flag and you can also create/redifine your ownmodes
:) (note: It doesn't create any external files, this program saves its config/options WITHIN itself, without rewritting itself, it uses XATTR arguments and a bit of magick)ntpdate
will simply update your HW clock based onNTP
demo
, just a demo of theccmd
pkg/library
I am looking for contributors, in fact. I NEED THEM. This is an ambicious project. And if you wish to contribute, please do! By openning a PR here to add a POSIX compliant utility that you've implemented, or bringing up to my attention bugs in our programs.
A-Utils utilizes build.sh for building utilities. This script checks for cbuild.sh in cloned repositories listed in extendC.b and executes them accordingly. For Go binaries, extendGo.b serves a similar purpose but doesn't require cbuild.sh. By default, ./build.sh builds utilities in the local ./cmd folder but can be adapted for other projects. To build a single-file binary, you'll need: https://github.com/xplshn/a-utils_gobusybox
- Publish my
grep
implementation - Make
ccmd
be more useful and work like a replacement for the"flag"
package, but with similar syntax. (as opposed to other alternatives which SUCK/are completely invasive) - We need a package manager suite. One shall be developed, parting from an specification, and providing at least the following: a command used to create packages, and a command used to install, uninstall and get to KNOW available packages in a remote or local repository
- Transparently NETWORK everything
- Create a library for Go that works like overlayfs & uses fuse, but for use with the "embed" package.