Some CLI utilities written in Go.
- Mainly intended as Unix-like commands for Windows, but cross-platform anyway.
- Covers similar ground to coreutils, but not intended as a replacement. (Won't ever support all commands & options).
- Just because.
- Grab some recent (v0.3.0) Windows binaries zipped up for 32-bit Windows and 64-bit Windows.
- Just unzip somewhere on your %PATH% (environment variable).
- (These binaries were built and uploaded with
goxc
, ofcourse)
go get github.com/laher/someutils/cmd/some
some ls
,some pwd
etc
NOTE: On Unix systems in particular, be careful that your system PATH elements come BEFORE GOPATH
within your PATH environment variable
go get github.com/laher/someutils
cd <....>/someutils
go install ./...
ls
,pwd
etc
My main target is to get my Windows CLI a bit closer to being as productive as my Linux CLI, by creating many small utilities under one umbrella. Some commands are excluded because they're either ubiquitous anyway (such as echo,cd,whoami), just too big, or hard to acheive with pure Go.
I'll just keep adding stuff as I need it. Contributions welcome!
So far, limited versions of the following commands are available:
Command | Options supported | STDIN support | Notes |
---|---|---|---|
cat | -Ens | Yes | |
cp | -r | n/a | TODO: check symlink behaviour |
grep | -nvHi -E -P | Yes | TODO: binary files support. !!No support for BRE - uses -E by default. |
ls | -lahr -1 | Yes | TODO: -p -t |
mv | n/a | TODO: check symlink behaviour | |
pwd | n/a | ||
rm | -r | n/a | TODO: check symlink behaviour |
scp | -r -P | ? | INCOMPLETE AND NOT WORKING WITH ALL SSH SERVERS. |
touch | n/a | ||
unzip | -t | TODO(STDOUT) | |
which | -a | n/a | TODO: Windows treats current dir above PATH variables. |
wget | -c -o | n/a | TODO: multi-threading? (not part of real wget) |
zip | TODO | No password support. |
You can also use 'some [cmd] [args...]' for any of the above.
- tar,gzip,gunzip
- stat,size,file,split,type
- tee,split,join,head,tail (tail -f??)
- chmod/chown (relevant?)
- diff (too big? Maybe a minimal version would be good here)
- more (how easy is it?)
- du/dh (need OS-specifics?)
- find/locate
- ln (would it need some non-Go stuff for Windows? YES at this stage)
- ps,kill,pgrep,pkill
- id,w,which
- tailf (tail -f). How easy would this be?
- ssh (terminal handling might be too challenging)
- less
- a text editor
- top
- dd
- awk, sed
- xargs, find -exec
- rsync (algorithms might be a bit hard)
- cron,chroot,bg,fg
- ps
- fsck
- dig (unless I can construct raw DNS requests & collect responses)
- I have separated out the 'flag' functionality into a separate package, uggo