caml turns well-documented YAML tasks into a runnable CLI.
make and just inspired it, but the tasks live in YAML.
Give a task a name, a desc, and an execute shell command,
then run caml to list every task with its description. caml does not
track file timestamps, so it never skips work that is already done. Treat it as a
task runner, not a build system.
caml ships as a Ruby gem and needs Ruby 3.0 or newer.
gem install caml
To pin caml to one project instead, add it to that project's Gemfile.
gem 'caml'
quickstart
Run caml init first, because it writes the starter
caml.yaml that the next two commands read.
gem install caml
caml init # scaffold a starter caml.yaml
caml # list tasks
caml hello # run the starter task
If a caml.yaml already exists, caml refuses to overwrite it and
exits 1. Rename the old file, then retry.
The scaffold holds one task, hello. Open the file, replace that task
with a real one, then read the reference for every key a
task accepts.
features
You declare commands. caml builds the CLI around them on every run.
declarative
Define your commands in YAML. Every top-level key in the file is a task.
three keys
A task needs a name, a desc, and an execute shell command. It needs nothing else.
read on every run
caml reads caml.yaml and registers the commands each time you invoke it. No build step. No cache to clear.
reference
Each topic below shows the YAML first and then explains it, so you can skim the
blocks and stop where the shape matches your problem. Copy any example as it stands.
Tasks
test:
desc: Run the test suite
execute: bundle exec rspec
Each top-level key is a task. A task has a desc and an
execute shell command. Run caml or caml help
to list every task with its description.