This is the cl-cli Reference Manual, version 0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Jul 15 03:42:57 2025 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-cliCommand line parser
Sébastien Gross
Sébastien Gross
WTFPL
Simple and easy to use modern command line argument parser for common lisp.
0.2
split-sequence (system).
cl-cli.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-cli/cl-cli.lispcl-cli (system).
defcommand (macro).
defcommand-to-list (macro).
help (function).
parse-cli (function).
run-command (function).
version (function).
with-environment (macro).
%make-options-list (function).
%print-option (function).
%print-positional (function).
%symbol-to-option-string (function).
bad-argument-type (condition).
bad-argument-type-option (reader method).
bad-argument-type-type (reader method).
consume-option (function).
convert-vars-vals-to-keys (function).
copy-option (function).
copy-sub-command (function).
get-positional-args (function).
make-option (function).
make-sub-command (function).
not-enougth-pos-args (condition).
not-enougth-pos-args-command (reader method).
not-enougth-pos-args-count (reader method).
not-enougth-pos-args-items (reader method).
opt-alias (reader).
(setf opt-alias) (writer).
opt-default (reader).
(setf opt-default) (writer).
opt-help (reader).
(setf opt-help) (writer).
opt-long (reader).
(setf opt-long) (writer).
opt-name (reader).
(setf opt-name) (writer).
opt-params (reader).
(setf opt-params) (writer).
opt-type (reader).
(setf opt-type) (writer).
option (structure).
option-p (function).
option-requires-argument (condition).
option-requires-argument-nargs (reader method).
option-requires-argument-option (reader method).
parse-command-args (function).
parse-commands (function).
parse-options (function).
sub-command (structure).
sub-command-p (function).
sub-docstring (reader).
(setf sub-docstring) (writer).
sub-func (reader).
(setf sub-func) (writer).
sub-options (reader).
(setf sub-options) (writer).
sub-positional (reader).
(setf sub-positional) (writer).
sub-verbs (reader).
(setf sub-verbs) (writer).
Packages are listed by definition order.
cl-clicommon-lisp.
defcommand (macro).
defcommand-to-list (macro).
help (function).
parse-cli (function).
run-command (function).
version (function).
with-environment (macro).
%make-options-list (function).
%print-option (function).
%print-positional (function).
%symbol-to-option-string (function).
bad-argument-type (condition).
bad-argument-type-option (generic reader).
bad-argument-type-type (generic reader).
consume-option (function).
convert-vars-vals-to-keys (function).
copy-option (function).
copy-sub-command (function).
get-positional-args (function).
make-option (function).
make-sub-command (function).
not-enougth-pos-args (condition).
not-enougth-pos-args-command (generic reader).
not-enougth-pos-args-count (generic reader).
not-enougth-pos-args-items (generic reader).
opt-alias (reader).
(setf opt-alias) (writer).
opt-default (reader).
(setf opt-default) (writer).
opt-help (reader).
(setf opt-help) (writer).
opt-long (reader).
(setf opt-long) (writer).
opt-name (reader).
(setf opt-name) (writer).
opt-params (reader).
(setf opt-params) (writer).
opt-type (reader).
(setf opt-type) (writer).
option (structure).
option-p (function).
option-requires-argument (condition).
option-requires-argument-nargs (generic reader).
option-requires-argument-option (generic reader).
parse-command-args (function).
parse-commands (function).
parse-options (function).
sub-command (structure).
sub-command-p (function).
sub-docstring (reader).
(setf sub-docstring) (writer).
sub-func (reader).
(setf sub-func) (writer).
sub-options (reader).
(setf sub-options) (writer).
sub-positional (reader).
(setf sub-positional) (writer).
sub-verbs (reader).
(setf sub-verbs) (writer).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Create a new command defined by VERBS list (dispatch arguments) a list of OPTIONS, a DOCSTRING and use BODY as dispatch function.
Call DEFCOMMAND and append result to VAR.
Parse ARGV using OPTIONS both and COMMANDS directives.
Return:
- options variables
- options values
- matched command dispatch function
- dispatch function keyword arguments
- the rest of the command line argument
Parse ARGV using OPTIONS both and COMMANDS directives.
Convert given OPTIONS list into a list of CL-CLI:OPTION
Convert SYMBOL to its argument string representation by prepending with double dash "–" and removing fancy chars such as "*".
Extract all OPTION arguments from ARGS.
Return both consumed arguments count and the arguments
Convert VARS and VALS lists to a keyword plist.
Example:
’(VAR1 VAR1) (val1 val2) => (:VAR1 val1 :VAR2 val2)
Parse ARGS and return 3 lists:
- A function suitable lambda-list
- A list of all positional arguments
- A list of all key arguments.
ARGS is a lambda-list as defined for defcommand.
bad-argument-type)) ¶bad-argument-type)) ¶type.
not-enougth-pos-args)) ¶not-enougth-pos-args)) ¶not-enougth-pos-args)) ¶option-requires-argument)) ¶option-requires-argument)) ¶error.
:command
This slot is read-only.
common-lisp.
:count
This slot is read-only.
:items
This slot is read-only.
| Jump to: | %
(
B C D F G H M N O P R S V W |
|---|
| Jump to: | %
(
B C D F G H M N O P R S V W |
|---|
| Jump to: | A C D F H I L N O P S T V |
|---|
| Jump to: | A C D F H I L N O P S T V |
|---|
| Jump to: | B C F N O P S |
|---|
| Jump to: | B C F N O P S |
|---|