Commit8819fc0fRecorded26 Apr 2026Repositorysigil-args

Extract sigil-args from sigil monorepo as standalone repo

Message

Filter-repo of packages/sigil-args/ history (31 commits preserved) + single-package scaffolding mirroring sigil-ansi / sigil-socket / sigil-git extractions:

- package.sgl: explicit version 0.13.1, url updated to codeberg:sigil/sigil-args. sigil-stdlib dep unchanged (codeberg:sigil/sigil-lang ^0.13.1). - README.md: usage example + build instructions; full reference in docs/args.md (preserved from monorepo). - dev-redirects.sgl: codeberg:sigil/sigil-lang -> ../sigil-lang for pre-publish local dev. - manifest.scm: pure-Scheme guix-shell environment. - .gitignore: build/, .sigil/. - sigil.lock: pins sigil-stdlib to v0.13.1 (a436005a) via codeberg:sigil/sigil-lang.

Self-bootstrap green: sigil deps install + sigil test --report -> 32/32 passed against published codeberg:sigil/sigil-lang.

See procedures/sigil-package-extraction for the canonical playbook.

Changed
 .gitignore        |  2 ++
 README.md         | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 dev-redirects.sgl |  6 ++++++
 manifest.scm      |  7 +++++++
 package.sgl       |  3 ++-
 sigil.lock        |  9 +++++++++
 6 files changed, 77 insertions(+), 1 deletion(-)
Diff
.gitignoreadded
@@ -0,0 +1,2 @@
+1
build/
+2
.sigil/
README.mdadded
@@ -0,0 +1,51 @@
+1
# sigil-args
+2
+3
Declarative command-line argument parsing for [Sigil](https://codeberg.org/sigil/sigil).
+4
+5
Defines CLIs as composable record values: options, commands, subcommands, with automatic help generation.
+6
+7
## Usage
+8
+9
```scheme
+10
(import (sigil args))
+11
+12
(define cli
+13
(command
+14
name: "greet"
+15
description: "Print a greeting"
+16
options: (list
+17
(option name: 'name short: #\n long: "name"
+18
value: "NAME" default: "World")
+19
(option name: 'loud short: #\l long: "loud"
+20
description: "Use uppercase"))
+21
handler: (lambda (opts args)
+22
(let ((greeting (format "Hello, ~a!" (alist-get 'name opts))))
+23
(display (if (alist-get 'loud opts)
+24
(string-upcase greeting)
+25
greeting))
+26
(newline)))))
+27
+28
(run-command cli (cdr (command-line)))
+29
```
+30
+31
Supports short flags (`-v`, `-vvv`, `-vf`), long flags (`--verbose`, `--no-verbose`), values (`-o val`, `--output=val`), `--` to stop option parsing, env-var fallback, choice restriction, multi-value (repeatable) options, negatable booleans, custom parsers, and required flags.
+32
+33
See [`docs/args.md`](docs/args.md) for the full reference.
+34
+35
## Building
+36
+37
```sh
+38
sigil deps install
+39
sigil build
+40
sigil test
+41
```
+42
+43
For local development against an in-tree `sigil-lang` checkout:
+44
+45
```sh
+46
sigil build --redirects ./dev-redirects.sgl
+47
```
+48
+49
## License
+50
+51
BSD-3-Clause. See [LICENSE](LICENSE) (license header lives in `package.sgl`).
dev-redirects.sgladded
@@ -0,0 +1,6 @@
+1
;; Development redirects — point dependencies at local Sigil checkouts
+2
(redirects
+3
repos: (list
+4
(for-repo
+5
url: "codeberg:sigil/sigil-lang"
+6
use: (from-path dir: "../sigil-lang"))))
manifest.scmadded
@@ -0,0 +1,7 @@
+1
;; sigil-args Development Environment
+2
;; Use with: guix shell -m manifest.scm
+3
+4
(specifications->manifest
+5
'("gcc-toolchain"
+6
"make"
+7
"pkg-config"))
package.sglmodified
@@ -4,9 +4,10 @@
4
5
(package
6
name: "sigil-args"
+7
version: "0.13.1"
8
sigil: "^0.13"
9
description: "Command-line argument parsing for Sigil"
9
url: "https://codeberg.org/sigil/sigil"
+10
url: "https://codeberg.org/sigil/sigil-args"
11
license: "BSD-3-Clause"
12
authors: (list "David Wilson <[email protected]>")
13
sigil.lockadded
@@ -0,0 +1,9 @@
+1
;; Auto-generated by sigil deps install. Do not edit.
+2
(lock
+3
(package name: "sigil-stdlib"
+4
url: "codeberg:sigil/sigil-lang"
+5
ref: "^0.13.1"
+6
sha: "a436005a34754522d3c38b608aa892b4f8e13dd3"
+7
package-selector: "sigil-stdlib"
+8
version: "0.13.1")
+9
)