A very tiny library which provides the functions argv
and argc
for working with command line arguments in Nim, with support for multiple Nim versions.
$ nimble add args
import args
when isMainModule:
echo "total argument count: ", argc
echo "script name: ", argv[0]
if argc > 1:
echo "script args: ", argv[1..^1]
To run tests:
$ nimble test
Args is open source software licensed under the MIT License.