1 {{{header(skel,Richard Westhaver,ellis@rwest.io)}}} 3 The
=skel= CLI is the primary build tool for contributors and serves a
4 similar role to language-agnostic build tools like
[[https://www.gnu.org/software/make/][GNU Make]], but with
5 the features and ease-of-use of language-specific build tools like
6 Rust's
[[https://github.com/rust-lang/cargo][Cargo]].
10 The
~skel~ tool can be configured at runtime using the CLI flags, or
11 via local configuration files. The configuration files are in the
12 ~skelfile~ format and are assigned the following locations by default:
13 - ~*default-user-skelrc*~ :: =$HOME/.skelrc= 14 - ~*default-system-skelrc*~ :: =/etc/skel/skelrc= 16 Both files are optional and the user skelrc takes precedence over
20 #+begin_src skel :results pp replace :exports both 21 ;;; .skelrc @ 2023-10-12.02:58:08 -*- mode: skel; -*-
22 :author "Richard Westhaver <ellis@rwest.io>"
41 Projects are the main top-level object users interact with. A project
42 consists of a list of slots which are populated automatically or by
43 the user. Once a project is initialized the slots can be accessed and
44 a set of high-level operations can be performed.
46 The easiest way to initialize a project is with a
~skelfile~. These
47 files are parsed as a simplified Lisp dialect and generate
48 ~sk-project~ objects based on their contents.
50 The simplest project looks like this:
52 #+begin_src skel :results pp replace :exports both 56 Don't worry, this is still lisp - the parentheses are implied. All we
57 actually need is a name to generate an object, and we can fill in the
58 blanks later as the project develops.
60 Here is a more verbose example, still with only metadata:
62 #+begin_src skel :results pp replace :exports both 63 ;;; skelfile --- core skelfile -*- mode: skel; -*-
65 :author "Richard Westhaver <ellis@rwest.io>"
68 :description "The Compiler Company Core"
71 :docs ((:org "readme") (:org "install") (:org "tests") (:org "todo"))
72 :imports ("lisp/lisp.sk" "rust/rust.sk")
75 Another example with rules and components:
78 ;;; skelfile @ 2023-10-08.02:37:25 -*- mode: skel; -*-
82 :description "a hacker's project compiler"
86 :rules ((build () (print (asdf:make :skel/cli)))
87 (clean () #$rm -rf */*.fasl$#))
88 :docs ((:org "readme"))
91 :stash "~/dev/comp/stash"
92 :shed "~/dev/comp/shed"
94 ((autogen #$sbcl --eval '(ql:quickload :app/cli/skel)' --eval '(asdf:make :app/cli/skel)'$#))
97 =skel= integrates closely with our Version Control System (VCS) which
98 is built on
[[https://www.mercurial-scm.org/][Mercurial]], but we also interact with and host many
[[https://git-scm.com/][Git]] 101 The
=skel= tool helps us abstract away the differences between git/hg
102 and make maximum use of their utility. When you run a
=skel vc= 103 command the currently active
~sk-project~ and configuration are used
104 to determine the appropriate VC backend to call. New backends can of
105 course be added as extensions.
108 - State "TODO" from [2023-12-09 Sat 19:28]
109 One of the most unusual features of
=skel= is the compiler set. With
110 the
=skel= CLI you can compile the following types of files for your
111 project directly from a
~skelfile~:
113 - Lisp system defs (.asd)
116 - .hgignore/.gitignore
118 We treat skelfiles as the mother of all build formats and consolidate
119 different formats into our own project DSL. This helps reduce
120 complexity while increasing capability and portability.
122 Project compilation occurs on demand with the
=sk compile= command.
124 ** TODO virtualization 125 - State "TODO" from [2023-12-09 Sat 18:55]
127 =skel= offers a mechanism for generating and running Virtual
128 Machines (VMs) and Containers. Under the hood we depend on
[[https://podman.io/][podman]] 129 for our container runtime as well as
[[https://www.qemu.org/][QEMU]] for some
132 ** TODO emacs integration 133 - State "TODO" from [2023-12-09 Sat 19:30]
134 =sk.el= is the Emacs support package for skel. It contains a
135 =skel-mode= for working with skelfiles and will soon contain
136 additional built-in integrations for
=project.el=,
=vc.el=, and more.
138 - State "TODO" from [2023-12-09 Sat 19:37]
139 ** TODO visualization 140 - State "TODO" from [2023-12-09 Sat 19:37]
142 #+begin_src shell :results pp replace :exports both 149 usage: skel [global] <command> [<arg>]
151 A hacker's project compiler and build tool.
153 -h/--help* : print this message
154 -v/--version* : print version
155 -d/--debug* : set log level (debug,info,trace,warn)
156 -c/--config* : set a custom skel user config
157 -i/--input : input source
158 -o/--output : output target
160 init : initialize a skelfile in the current directory
161 -n/--name : project name
163 show : describe the project skelfile
164 -f/--file : path to skelfile
166 inspect : inspect the project skelfile
167 -f/--file : path to skelfile
169 make : build project targets
170 -t/--target : target to build
172 run : run a script or command
174 push : push the current project upstream
176 pull : pull the current project from remote
178 clone : clone a remote project
180 commit : commit changes to the project vc
182 edit : edit a project file
184 shell : open the sk-shell interpreter