MoonJust

    A MoonBit implementation of the just command runner

    command-runner
    just
    task-runner
    wasm
    Download zip
    Author
    Version
    0.1.3
    License
    Apache-2.0
    Last updated
    10 hours ago
    Downloads
    77

    #MoonJust

    MoonJust runs justfiles through MoonX and targets CLI compatibility with just 1.59.0.

    #Usage

    Save this recipe as justfile.

    hello name="world": @echo "Hello, {{ name }}!"

    # Run the default recipe (prints "Hello, world!") moonx ZSeanYves/MoonJust # List recipes, then run one with an argument moonx ZSeanYves/MoonJust --list moonx ZSeanYves/MoonJust hello MoonBit # Preview the shell command moonx ZSeanYves/MoonJust --dry-run hello MoonBit

    MoonJust looks for a justfile in the current directory and its parents. By default, the first recipe runs when you omit the recipe name. Use [default] to select a different recipe.

    #All options

    Put MoonJust options before the recipe name. To pass a flag to a recipe, place it after the recipe name. Use -- to end option parsing explicitly.

    #Finding and editing justfiles

    OptionDescription
    -f, --justfile FILERead a specific justfile. Use - to read it from standard input.
    -d, --working-directory DIRUse DIR as the working directory. With automatic discovery, start the search there.
    --justfile-name NAMESearch for the given filename. Repeat the option or supply a comma-separated list to try multiple names.
    --ceiling DIRStop the upward search for a justfile at DIR.
    -g, --global-justfileUse the global justfile.
    --init, --initializeCreate a starter justfile in the project root.
    -e, --editOpen the justfile in an editor.
    --fmt, --formatFormat the justfile. When reading from stdin, write the formatted text to stdout. See Notes for in-place writes.
    --checkUse with --fmt to check formatting. Exit 0 if the input is formatted, or exit 1 and show a diff if it needs changes.
    --indentation TEXTUse TEXT to indent recipe bodies when formatting.

    #Listing and inspecting recipes

    OptionDescription
    -l, --list [MODULE...]List available recipes in the root justfile or in the named module.
    --default-listList recipes when invoked without arguments.
    --list-submodulesInclude recipes from submodules in --list.
    --group GROUPFilter --list or --choose by group. Repeat to include multiple groups.
    --groupsPrint recipe group names.
    --summaryPrint available recipe names on one line.
    -u, --unsortedShow list and summary entries in source order.
    --no-aliasesHide recipe aliases in the list.
    --alias-style STYLEDisplay aliases on the left, on the right (default), or as separate entries.
    --list-heading TEXTSet the text before the recipe list. The default is Available recipes: followed by a newline.
    --list-prefix TEXTSet the prefix before each list entry. The default is four spaces.
    -s, --show RECIPE_PATH...Print the definition of the recipe at the given path.
    --usage [PATH...]Print usage for one recipe or for all recipes in a module. Omit the path for the root module.
    --variablesPrint variable names.
    --evaluate [VARIABLE], --eval [VARIABLE]Print evaluated assignments, or just the value of the named variable.
    --evaluate-format FORMATPrint evaluated assignments in just (default) or shell syntax.
    --dumpPrint the parsed justfile.
    --dump-format FORMATSelect just (default) or json output for --dump.
    --jsonPrint the justfile as JSON.

    #Running recipes and commands

    OptionDescription
    -n, --dry-runPrint the commands a recipe would run.
    --chooseSelect one or more recipes interactively and run them.
    --chooser COMMANDSet the chooser used by --choose. The default is fzf.
    -c, --command COMMAND [ARG...]Run an external command with the justfile’s working directory and environment.
    --shell-commandWith --command, invoke the command through the recipe shell.
    --shell SHELLSet the shell for recipe lines and backticks.
    --shell-arg ARGPass an argument to the shell. Repeat to pass more than one.
    --clear-shell-argsClear the shell argument list.
    --set VARIABLE VALUEOverride a variable. Repeat for additional overrides.
    --jobs NRun at most N recipes simultaneously when executing parallel dependencies.
    --oneAllow only one recipe to be requested on the command line.
    --allow-missingIgnore missing recipe or module errors.
    --no-deps, --no-dependenciesSkip recipe dependencies.
    --yesAutomatically confirm recipes that ask for confirmation.
    --no-cacheBypass the recipe cache.
    --clean [RECIPE_PATH...]Clear the project’s recipe cache. Supply a path to clear only entries with that recipe path prefix.
    --tempdir DIRUse DIR for temporary files.
    --cygpath PROGRAMSet the program used to convert Unix and Windows paths. The default is cygpath.
    --unstableEnable features marked unstable.

    #Loading environment variables

    OptionDescription
    -F, --dotenv-filename NAMESearch for an environment file with this name. Repeat to supply multiple names.
    -E, --dotenv-path FILELoad an environment file from an explicit path. Repeat to supply multiple paths.
    --dotenv-command COMMANDRun a command and read its stdout as dotenv data. Repeat for multiple commands.
    --no-dotenvDisable dotenv loading.

    #Output and program information

    OptionDescription
    -q, --quietSuppress output during execution.
    -v, --verboseIncrease verbosity. Repeat for more detail.
    --explainPrint the recipe’s documentation comment before running it.
    --color MODESet color output to always, auto (default), or never.
    --command-color COLORColor echoed recipe lines. Choose black, blue, cyan, green, purple, red, or yellow.
    --highlightDisplay echoed recipe lines in bold.
    --no-highlightDisable bold highlighting for echoed recipe lines.
    --timePrint recipe execution times.
    --timestampAdd timestamps to echoed commands.
    --timestamp-format FORMATSet the timestamp format. The default is %H:%M:%S.
    --changelogPrint the upstream just changelog.
    --manPrint the manual page.
    -h, --helpShow command-line help, including environment variable names.
    -V, --versionPrint the MoonJust version.

    The table describes the current source. In MoonJust builds targeting just 1.57, --usage requires a recipe path, -d requires -f, and --justfile-name accepts a single filename.

    #Notes

    • Use --fmt --check to check formatting. If formatting would change an existing file, the Wasm CLI refuses the rewrite to preserve its permissions.
    • Recipes can start child processes with the permissions of the host. Review unfamiliar justfiles before running them. See the security policy.

    See the compatibility guide for tested behavior and known differences from upstream just.

    Source Files