2 #+author: Richard Westhaver
3 #+setupfile: ../../../clean.theme
5 #+INFOJS_OPT: toc:nil view:content
7 The
=skel= CLI is the primary build tool for contributors and serves a
8 similar role to language-agnostic build tools like
[[https://www.gnu.org/software/make/][GNU Make]], but with
9 the features and ease-of-use of language-specific build tools like
10 Rust's
[[https://github.com/rust-lang/cargo][Cargo]].
14 :ID: 90d78420-e6d9-4f18-8222-89c4670633b4 18 :ID: 2658a3d1-cfa5-436e-b2b0-9cf42a6f66c6 20 The
~skel~ tool can be configured at runtime using the CLI flags, or
21 via local configuration files. The configuration files are in the
22 ~skelfile~ format and are assigned the following locations by default:
23 - ~*default-user-skelrc*~ :: =$HOME/.skelrc= 24 - ~*default-system-skelrc*~ :: =/etc/skel/skelrc= 26 Both files are optional and the user skelrc takes precedence over
30 #+begin_src shell :results output 36 ;;; .skelrc @ 2023-10-12.02:58:08 -*- mode: skel; -*-
37 :name "Richard Westhaver"
38 :email "richard.westhaver@gmail.com"
48 ;; :scratch ".stash/scratch"
50 :registry ".data/skel/registry"
51 :scripts ("/usr/local/share/stash/scripts" "~/stash/scripts")
56 :ID: 359441da-1b61-4d73-8563-605ea7262b58 58 Projects are the highest-level objects int the
~skel~ system. A project
59 consists of a list of slots which are populated automatically or by
60 the user. Once a project is initialized the slots can be accessed and
61 a set of high-level operations can be performed.
63 The easiest way to initialize a project is with a
~skelfile~. These
64 files are parsed as a simplified Lisp dialect and generate
65 ~sk-project~ objects based on their contents.
67 The simplest project looks like this:
69 #+begin_src skel :noeval t 73 Don't worry, this is still lisp - the parentheses are implied. All we
74 actually need is a name to generate an object, and we can fill in the
75 blanks later as the project develops.
77 Here is a more verbose example, still with only metadata:
79 #+begin_src skel :noeval t 80 ;;; skelfile --- core skelfile -*- mode: skel; -*-
82 :author "Richard Westhaver <ellis@rwest.io>"
85 :description "The Compiler Company Core"
88 :docs ((:org "readme") (:org "install") (:org "tests") (:org "todo"))
89 :import ("lisp/lisp.sk" "rust/rust.sk")
92 Another example with rules and components:
94 #+begin_src skel :noeval t 95 ;;; skelfile @ 2023-10-08.02:37:25 -*- mode: skel; -*-
99 :description "a hacker's project compiler"
103 :rules ((build () (print (asdf:make :skel/cli)))
104 (clean () #$rm -rf */*.fasl$#))
105 :docs ((:org "readme"))
108 :stash "~/dev/comp/stash"
112 :ID: c15f58b5-d55e-425b-acf5-7001ef4591e4 114 =skel= integrates closely with our Version Control System (VCS) which
115 is built on
[[https://www.mercurial-scm.org/][Mercurial]], but we also interact with and host many
[[https://git-scm.com/][Git]] 118 The
=skel= tool helps us abstract away the differences between git/hg
119 and make maximum use of their utility. When you run a
=skel vc= 120 command the currently active
~sk-project~ and configuration are used
121 to determine the appropriate VC backend to call. New backends can of
122 course be added as extensions.
126 :ID: 5ec3ae9d-8846-4374-a42b-5701606ad119 128 - State "TODO" from [2023-12-09 Sat 19:28]
129 One of the most unusual features of
=skel= is the compiler set. With
130 the
=skel= CLI you can compile the following types of files for your
131 project directly from a
~skelfile~:
133 - Lisp system defs (.asd)
136 - .hgignore/.gitignore
138 We treat skelfiles as the mother of all build formats and consolidate
139 different formats into our own project DSL. This helps reduce
140 complexity while increasing capability and portability.
142 Project compilation occurs on demand with the
=sk compile= command.
144 ** TODO virtualization 146 :ID: fea87861-30c2-4739-b964-1ecb87d3ddff 148 - State "TODO" from [2023-12-09 Sat 18:55]
150 =skel= offers a mechanism for generating and running Virtual
151 Machines (VMs) and Containers. Under the hood we depend on
[[https://podman.io/][podman]] 152 for our container runtime as well as
[[https://www.qemu.org/][QEMU]] for some
155 ** TODO emacs integration 157 :ID: 3df22a04-3f6b-4738-bd5f-3eb91977d3af 159 - State "TODO" from [2023-12-09 Sat 19:30]
160 =sk.el= is the Emacs support package for skel. It contains a
161 =skel-mode= for working with skelfiles and will soon contain
162 additional built-in integrations for
=project.el=,
=vc.el=, and more.
165 :ID: 7e66bdf6-304e-423e-8db4-783e7f6ccfd7 167 - State "TODO" from [2023-12-09 Sat 19:37]
168 ** TODO visualization 170 :ID: efa22675-70d6-453f-b377-8e76875e5f1f 172 - State "TODO" from [2023-12-09 Sat 19:37]
175 :ID: f8e9fab4-67dc-4e7f-b172-7e0fc21047ad 177 #+begin_src shell :results pp replace :exports both 183 skel v0.1.1 --- A hacker's project compiler.
185 usage: skel [global] <command> [<arg>]
188 -h/--help* : print this message
189 -v/--version* : print version
190 -l/--level* : set log level (warn,info,debug,trace)
191 -c/--config* : set a custom skel user config
192 -i/--input* : input source
193 -o/--output* : output target
196 init : initialize a skelfile in the current directory
197 -n/--name : project name
198 new : make a new skel project
199 -n/--name : project name
200 describe : describe a skelfile
201 show : show project slots
202 -f/--file : path to skelfile
203 -u/--user : print user configuration
204 -s/--system : print system configuration
206 -r/--root : repository path
207 id : print the project id
208 rev : print the current vc revision id
209 inspect : inspect the project skelfile
210 -f/--file : path to skelfile
211 make : build project targets
212 -t/--target : target to build
213 run : run a script or command
214 status : print the vc status
215 push : push the current project upstream
216 pull : pull the current project from remote
217 clone : clone a remote project
218 commit : commit changes to the project vc
219 edit : edit a project file in emacs.
220 shell : open the sk-shell interpreter