cli
1. Overview
The cli
library is a fully-featured toolkit for working with and
building CLI programs.
1.1. dependencies
(ql:quickload :doc) (let ((sys (asdf:find-system :cli))) (asdf:system-depends-on sys))
- std
- log
- dat
- obj
1.2. dependents
(ql:quickload :doc) (let ((sys (doc:system-documentation :cli))) (mapcar (lambda (s) (asdf:component-name (doc:doc-system s))) (doc:doc-dependents sys)))
- packy
- box
- pod
- vc
- skel
- core/lib
- prelude
- cli/tests
- net
1.3. files
(mapcar (lambda (p) (enough-namestring p (asdf:system-source-directory :cli))) (doc:doc-files (doc:system-documentation :cli)))
- pkg.lisp
- ansi.lisp
- env.lisp
- progress.lisp
- spark.lisp
- repl.lisp
- shell.lisp
- prompt.lisp
- ed.lisp
- tools/pkg.lisp
- tools/term.lisp
- tools/tmux.lisp
- tools/pacman.lisp
- tools/cc.lisp
- tools/systemd.lisp
- tools/wg.lisp
- tools/cargo.lisp
- tools/sbcl.lisp
- clap/pkg.lisp
- clap/ast.lisp
- clap/vars.lisp
- clap/util.lisp
- clap/macs.lisp
- clap/proto.lisp
- clap/opt.lisp
- clap/cmd.lisp
- clap/cli.lisp
- multi.lisp
- cli.lisp
1.4. packages
(mapcar (lambda (p) (package-name (doc:doc-package p))) (doc:doc-packages (doc:system-documentation :cli)))
- CLI/REPL
- CLI/CLAP/UTIL
- CLI/CLAP/PROTO
- CLI/TOOLS/PACMAN
- CLI/CLAP/OBJ
- CLI/ENV
- CLI/CLAP/MACS
- CLI/TOOLS/SBCL
- CLI/TOOLS/WG
- CLI/TOOLS/SYSTEMD
- CLI/PROMPT
- CLI-USER
- CLI/PROGRESS
- CLI/CLAP
- CLI/TOOLS/TMUX
- CLI/TESTS
- CLI/ANSI
- CLI/SPARK
- CLI/MULTI
- CLI/TOOLS/TERM
- CLI/CLAP/AST
- CLI/CLAP/VARS
- CLI/ED
- CLI/TOOLS/CARGO
- CLI/CLAP/SIMPLE
- CLI/TOOLS/CC
- CLI
- CLI/SHELL
1.5. tests
(ql:quickload :cli/tests) (rt:in-suite :cli) (print rt:*test-suite* nil)
#<RT:TEST-SUITE CLI [9:9:0:0] {10203A95C3}>
(rt:tests rt:*test-suite*)
(#<RT:TEST SBCL-TOOLS :fn SBCL-TOOLS-TEST1024 {1020570DC3}> #<RT:TEST CLAP-MAIN :fn CLAP-MAIN-TEST1023 {1020570CD3}> #<RT:TEST CLI-AST :fn CLI-AST-TEST1022 {1020570BB3}> #<RT:TEST ENV :fn ENV-TEST1021 {1020570AC3}> #<RT:TEST REPL :fn REPL-TEST1020 {10205709D3}> #<RT:TEST SPARK :fn SPARK-TEST1019 {10205708E3}> #<RT:TEST PROGRESS :fn PROGRESS-TEST1018 {10205707F3}> #<RT:TEST CLAP-OPTS :fn CLAP-OPTS-TEST1017 {1020570703}> #<RT:TEST ANSI :fn ANSI-TEST1014 {10203A97D3}>)
2. Packages
2.1. cli/clap
- nicknames
- clap
clap
is a name borrowed from the clap.rs Command Line Argument
Parser. What can I say, it's a good acronym.
Besides the system tests, you can find this package used in our lisp
applications (lisp/bin
).
clap
provides an object protocol and classes which parse input into
a simple AST and execute the appropriate option and command handlers.
Several macros form the public API used to build a CLI including
defcommand
, defopt
, define-cli
, and defmain
.