Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/MorganPeterson/args

A simple (KISS) Janet module for command line argument parsing
https://github.com/MorganPeterson/args

Last synced: about 2 months ago
JSON representation

A simple (KISS) Janet module for command line argument parsing

Awesome Lists containing this project

README

        

# NOTICE

__I am moving this repository to [Sourcehut](https://git.sr.ht/~nullevoid/args) and this repository will be archived. Any future development (if any) will be done in the new repository.__

# Args

Args is a simple (44 sloc) pure Janet module for parsing command line flags.

Unlike argparse and it's ilk, this module only parses flags without arguments.

## install

Use JPM
```sh
sudo jpm install https://github.com/MorganPeterson/args.git
```

## examples

Run simple.janet script for an example of usage.

```sh
janet simple.janet -a -b -cd -x --help
```

The above should produce the following output:

```
A flag found
B flag found
C flag found
D flag found
don't recognize flag x
help message
```