changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > docs / core/lib/cli.org

changeset 35: 5eefd1d0e22f
child: 6303e1f79470
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 22 Jun 2024 23:55:21 -0400
permissions: -rw-r--r--
description: core updates
1 #+title: CLI
2 #+author: Richard Westhaver
3 #+description: Command-line Interface Library
4 #+setupfile: clean.theme
5 #+filetags: lisp cli
6 #+property: header-args :dir ~/comp/core/ :exports both
7 #+setupfile: ../../../clean.theme
8 #+INFOJS_OPT: toc:nil
9 
10 * Overview
11 The =cli= library is a fully-featured toolkit for building [[https://en.wikipedia.org/wiki/Command-line_interface][CLI]]
12 programs.
13 
14 
15 * stats
16 ** dependencies
17 #+begin_src lisp :results list
18  (ql:quickload :doc)
19  (let ((sys (asdf:find-system :cli)))
20  (asdf:system-depends-on sys))
21 #+end_src
22 
23 #+RESULTS:
24 - std
25 - log
26 
27 ** dependents
28 #+begin_src lisp :results list
29  (ql:quickload :doc)
30  (let ((sys (doc:system-documentation :cli)))
31  (mapcar (lambda (s) (asdf:component-name (doc:doc-system s))) (doc:doc-dependents sys)))
32 #+end_src
33 
34 #+RESULTS:
35 - prelude
36 - pod
37 - packy
38 - vc
39 - skel
40 - obj
41 - cli/tests
42 - user
43 
44 ** files
45 #+begin_src lisp :output replace :results list
46  (mapcar (lambda (p)
47  (enough-namestring p (asdf:system-source-directory :cli)))
48  (doc:doc-files (doc:system-documentation :cli)))
49 #+end_src
50 
51 #+RESULTS:
52 - pkg.lisp
53 - ansi.lisp
54 - env.lisp
55 - progress.lisp
56 - spark.lisp
57 - repl.lisp
58 - shell.lisp
59 - prompt.lisp
60 - ed.lisp
61 - tools/tmux.lisp
62 - tools/pacman.lisp
63 - clap/pkg.lisp
64 - clap/ast.lisp
65 - clap/vars.lisp
66 - clap/util.lisp
67 - clap/macs.lisp
68 - clap/proto.lisp
69 - clap/opt.lisp
70 - clap/cmd.lisp
71 - clap/cli.lisp
72 - cli.lisp
73 
74 ** packages
75 #+begin_src lisp :output replace :results list
76  (mapcar (lambda (p) (package-name (doc:doc-package p)))
77  (doc:doc-packages (doc:system-documentation :cli)))
78 #+end_src
79 
80 #+RESULTS:
81 - CLI/CLAP/OBJ
82 - CLI/CLAP/SIMPLE
83 - CLI/SHELL
84 - CLI/ANSI
85 - CLI/CLAP/PROTO
86 - CLI/CLAP/AST
87 - CLI/ED
88 - CLI
89 - CLI/CLAP
90 - CLI/CLAP/VARS
91 - CLI/TESTS
92 - CLI/REPL
93 - CLI/CLAP/UTIL
94 - CLI/ENV
95 - CLI/PROGRESS
96 - CLI/PROMPT
97 - CLI-USER
98 - CLI/SPARK
99 - CLI/TMUX
100 - CLI/CLAP/MACS
101 
102 ** tests
103 #+begin_src lisp :output replace
104  (ql:quickload :cli/tests)
105  (print rt:*test-suite* nil)
106 #+end_src
107 
108 #+RESULTS:
109 : #<RT:TEST-SUITE CLI [10:10:0:0] {103BAFED63}>
110 
111 #+begin_src lisp :output replace
112  (rt:tests rt:*test-suite*)
113 #+end_src
114 
115 #+RESULTS:
116 #+begin_example
117 (#<RT:TEST MAIN-OUTPUT :fn MAIN-OUTPUT-TEST2479 {103BB3F5C3}>
118  #<RT:TEST CLAP-AST :fn CLAP-AST-TEST2478 {103BB3F4E3}>
119  #<RT:TEST ENV :fn ENV-TEST2477 {103BB3F403}>
120  #<RT:TEST REPL :fn REPL-TEST2476 {103BB3F323}>
121  #<RT:TEST SPARK :fn SPARK-TEST2475 {103BB3F243}>
122  #<RT:TEST PROGRESS :fn PROGRESS-TEST2474 {103BB3F163}>
123  #<RT:TEST CLAP-OPTS :fn CLAP-OPTS-TEST2473 {103BB3F083}>
124  #<RT:TEST CLAP-BASIC :fn CLAP-BASIC-TEST2472 {103BB3EF73}>
125  #<RT:TEST CLI-PROMPT :fn CLI-PROMPT-TEST2471 {103BB10603}>
126  #<RT:TEST ANSI :fn ANSI-TEST2470 {103BAFEF73}>)
127 #+end_example