Metadata-Version: 2.4
Name: serpentine-argparse
Version: 0.2.0
Summary: Serpentine argparse-lite: flags, options, positionals, subcommands and help text in the Serpentine subset
Author: Serpentine contributors
License: MIT
Project-URL: Homepage, https://github.com/avijitbhuin21/Serpentine
Keywords: serpentine,cli,argparse
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: serpentine-shim

# serp-cli

An argparse-lite command-line parser written in the Serpentine subset —
native CLIs are Serpentine's first market.

## API

```python
cli = new_cli("mytool", "Does things.")
cli.add_command("build")        # optional subcommands (first positional)
cli.add_flag("verbose", "chatty output")
cli.add_opt("out", "a.out", "output path")   # --out value or --out=value
cli.add_pos("input", "input file")
res = cli.parse(argv)           # ParseResult
```

`ParseResult` fields: `ok` / `error` (parse failure, message), `help_requested`
(`-h` / `--help` seen; caller prints `cli.usage()` and exits), `command`,
`flags: dict[str, bool]`, `opts: dict[str, str]`, `pos: dict[str, str]`,
`extras: list[str]` (surplus positionals).

## Install

Published on PyPI as **`serpentine-argparse`** (the `serp-cli` name belongs to an unrelated
project); the import name is still `serp_cli`:

```
serp add serpentine-argparse
pip install serpentine-argparse
```
