vic / clap-nix Goto Github PK
View Code? Open in Web Editor NEWCommand line argument parser in pure Nix. Supports sub-commands, typed positional arguments, value coercion and resolution via Nix Modules.
License: Apache License 2.0
Command line argument parser in pure Nix. Supports sub-commands, typed positional arguments, value coercion and resolution via Nix Modules.
License: Apache License 2.0
Eg, -h
is same than --help
Since clap-nix
is implemented in Nix, it will always need a Nix interpreter to work. However there would be some benefit on creating an external interface (a nix-clap command perhaps) that you could use from the shell and get the resolved options output either in another nix file or json or anything that nix can write to.
Since nix options are self-documenting, it would be nice to be able to output help in various formats: plain-text (for showing as part of --help), as a file for man(1) for longer documentation, as json for processing from other tools.
At least plain text should be implemented.
Currently if you select a command options from their parent commands are no longer recognized. This should not be case since, for example the following should be possible:
mycmd foo --enable-x bar --enable-y
<=> mycmd foo bar --enable-x --enable-y
and clap-nix should automatically know that enable-x
belongs to the foo command (only if there's not an enable-x
in bar itself.
Change the enabled
flag to be true only if anything inside the command was explicitly set by the user. Or perhaps this should be another flag ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.