You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 week ago | |
---|---|---|
.github | 2 months ago | |
src | 2 months ago | |
tests | 2 months ago | |
.gitattributes | 8 months ago | |
.gitignore | 9 months ago | |
.woodpecker.yml | 6 months ago | |
LICENSE | 9 months ago | |
Makefile | 2 months ago | |
README.org | 2 months ago | |
build.zig | 2 months ago | |
build.zig.zon | 1 week ago |
README.org
Zigcli
" title="
" />
" title="
" />
Command line programs written in Zig. Currently there are:
loc
, lines of code.tree
, list contents of directories in a tree-like format.yes
, output a string repeatedly until killed.
Prebuilt binaries can be found in CI's artifacts, or you can build from source:
git clone https://github.com/jiacai2050/zigcli.git
Then build with
zig build -Doptimize=ReleaseFast
Zigcli currently supports Zig master, which can be downloaded here.
Tree
./zig-out/bin/tree zig-out
zig-out
└──bin
├──loc
└──tree
1 directories, 2 files
./zig-out/bin/tree -h
USAGE:
./zig-out/bin/tree [OPTIONS] [--] [directory]
OPTIONS:
-m, --mode STRING Line drawing characters. (valid: ascii|box|dos)(default: box)
-a, --all All files are printed.
-s, --size Print the size of each file in bytes along with the name.
-d, --directory List directories only.
-L, --level INTEGER Max display depth of the directory tree.
-h, --help Prints help information.
Yes
Loc
./zig-out/bin/loc
Language File Line Code Comment Blank Size
-------- ---- ---- ---- ------- ----- -------
Zig 7 896 756 22 118 24.72K
YAML 6 145 134 3 8 3.19K
Makefile 1 15 8 3 4 262.00B
Python 1 10 7 2 1 166.00B
C 1 9 2 6 1 34.00B
Ruby 1 8 5 2 1 201.00B
-------- ---- ---- ---- ------- ----- -------
Total 17 1083 912 38 133 28.56K
./zig-out/bin/loc -h
USAGE:
./zig-out/bin/loc [OPTIONS] [file or directory]
OPTIONS:
-s, --sort STRING Column to sort by (valid: language|file|line|code|comment|blank|size)(default: line)
-h, --help Prints help information
Roadmap
License
zigcli is licensed under the GPL 3.0 or later, see LICENSE for details.