Open
Description
Is your feature request related to a problem? Please describe.
For a close-to-native UX, it'd be good to support many of the CLI features in other languages.
This could take many forms:
- Functions that return the set of flag strings, as well as their arity (number of subsequent arguments consumed). These can be passed automatically to argument parsing libraries. These functions should ideally not depend on any
nix_lib*_init
functions. - Functions that expose the CLI classes somehow. This would achieve the most Nix-like UX details. This won't be suitable for applications that aren't primarily Nix-focused.
- Functions that expose the configuration system.
- Functions that expose the logging system and progress bar.
Describe the solution you'd like
Consider the above, but perhaps only after we've made some progress on the settings system.
Describe alternatives you've considered
- A function that parses command line flags while ignoring anything that's not recognized by Nix. I don't like such functions, because it assumes that
-
does not occur in non-flag positions in the host CLI. While this often holds up, it inevitably won't, e.g.--skopeo-flags --remove-signatures
. What if Nix also accepts, or worse starts to accept--remove-signatures
? It'd filter out--remove-signatures
, and whatever argument follows will be passed toskopeo
.
Additional context
- (Towards) stable C bindings for libutil, libexpr #8699
nix.conf.json
#8373- ... other settings related issues ...
Priorities
Add 👍 to issues you find important.