Package: just.sh
just.shjust.shtranspilesJustfilesto portable,
POSIX-compatible shell scripts.Run Justfile recipes without installingjustRunjustcommands in constrained environments (such as CI pipelines and
Docker containers)Use ajustfileas a starting point for a shell scriptjust.shis built as a drop-in replacement forjust. It can parse any validjustfile, and generated scripts behave identically tojust. In almost all
cases, generated scripts even have byte-for-byte identical output tojust.
There are over 32,000 tests (covering every line of code!) that validate this
compatibility for each commit.Install & Quick StartTryjust.shonline without installing.Installjust.shlocally with:python3-mpipinstalljust.shOnce installed, runjust.shto convert aJustfileto a shell script. Then,
run the generated script./just.shas you would runjust.$ ls
justfile

$ just --summary
build lint test

$ just.sh
Compiling Justfile to shell script: `justfile` -> `just.sh`

$ ls
justfile just.sh

$ ./just.sh --summary
build lint testThepipinstallation script also installs the following aliases to thejust.shcommand-line tool:just_shjust-shpyjustProject StatusI like tools that effectively achieve one well-defined goal, without growing
indefinitely. My hope is forjust.shto be such a tool.In other words,just.shis "complete" software. I will fix bugs and make
changes to maintain compatibility withjust, but there are no new features
planned.As such, even if there are no recent commits, the project is not dead! Few
commits means that everything has been running smoothly.just.shis written in Python with only one dependency outside the Python
standard library:parsy, which itself
has no external dependencies. All of the code is spread across two fairly small
files (plus one more for tests), and every line of code is covered by tests.Known Issues & IncompatibilitiesNot all Just functions are implemented in shellFor example, many of the string manipulation functions such astrim_end_match,trim_start_match,titlecase, etc. remain to be
implementedTrying to compile a Justfile with an unimplemented function will raise an
errorSome Just functions (sha256in particular) cannot be made portable without
depending onsha256sumor Python on the target systemNot all nested calls tojustare detected. Callingjustin the middle of a
recipe may result in unexpected behavior100% Python line coverage guarantees that all Python code that generates shell
scripts is exercised, but it does not guarantee that all generated lines of
shell are exercised in testsJust re-runs recipes if they are called again with a unique combination of
arguments.just.shapproximates this behavior instead of replicating it,
using simpler heuristics for whether a recipe has run beforeGeneratedjust.shshell files may be hard to read, and are typically much
larger than the Justfiles they replaceimport,[confirm], and possibly some other recent features from Just
versions greater than 1.14.0 may not yet be supportedThe./just.sh --dumpcommand does not reformat JustfilesThe tests check colorless output ofjust.shagainstjust. They do not
confirm that the colors and ANSI escape sequences are the same between the
twoAcknowledgmentsThanks toLogan Snowfor testing early versions,
consulting on design decisions, and being a great guy overall