I bring to you today zli.
A blazing fast, zero-cost Zig CLI framework inspired by Cobra and Clap. Build ergonomic, high-performance command-line tools with ease.
Coming from Go, i always liked how cobra helps with creating CLIs. now we have one in zig.
I hope it becomes famous because it’s so nice to use (if I do say so myself )
Issues and pull requests are welcome! Please open an issue for bugs, feature requests, or questions as I am still discovering how awesome zig is!!
13 Likes
Hey! Always cool to see other CLI Libraries! I took a little inspiration from Cobra as well.
Just so you’re aware, there is another CLI library named ZLI (not mine). That’s not to say you can’t share the name. More just a heads up in case you wanted to have a unique name.
1 Like
shoot, didn’t know that.
i think i’ll leave it like that
kj4tmp
May 16, 2025, 12:48am
5
Some friendly feedback:
“Blazing fast”, consider performing benchmarks to justify this claim. Check out poop, it might be useful GitHub - andrewrk/poop: Performance Optimizer Observation Platform
Have you considered adding tests? Here is a quick github action that can run your tests:
name: Tests
on:
push:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Zig Compiler
uses: mlugg/setup-zig@v1.2.1
with:
version: 0.14.0
- name: Build and test Zig Project
run: zig build test
11 Likes
Are there actually CLI parser libraries that end up being a performance bottleneck in any non-synthetic workloads?
4 Likes
jibal
May 17, 2025, 4:30am
7
No. I can’t think of a case that is less in need of optimization than parsing the CL.
3.1.2 published
ALREADY AT 34 STARS!! Thank you all
It’s getting better with each release.
!!! Zig is such a productive language.
📟 A blazing fast Zig CLI framework. Build ergonomic, high-performance command-line tools with ease.
1 Like
updated one thank you!
name: Tests
on:
push:
paths:
- "src/**"
- "build.zig"
pull_request:
branches:
- main
paths:
- "src/**"
- "build.zig"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig Compiler
uses: mlugg/setup-zig@v2
with:
version: 0.14.1
- name: Build and test ZLI
run: zig build test --summary all
Shipped a new update Release v3.7.0 · xcaeser/zli · GitHub
You’re gonna like this one: Spinners
worked hard on having powerful DX to add loading steps into the cli, updating current loading text, success&fail messsages etc…
zig continues to amaze me
1 Like