Skip to content

restechnica/nuke

Repository files navigation

Nuke

github.com release badge github.com workflow badge go.pkg.dev badge goreportcard.com badge img.shields.io MPL2 license badge

A modern task runner experience for Nushell.

Table of Contents

Features

  • run commands from any subdirectory
  • a set of default script names
  • .env support

Usage

Each command has a -h, --help flag available.

nuke

Walks up the current directory structure in search of a nu script.

Once found, it will change directory to the script's directory and execute the script with any arguments passed on to nuke.

Initially environment variables are loaded from a .env file.

nuke version

prints nuke version information.

Requirements

nuke requires a nu installation.

How to install

nuke can be retrieved from GitHub or a Homebrew tap. Run nuke version to validate the installation. The tool is available for Windows, Linux and macOS.

github

nuke is available through GitHub. The following example works for a GitHub Workflow, other CI/CD tooling will require a different path setup.

NUKE_VERSION=0.1.0
mkdir bin
echo "$(pwd)/bin" >> $GITHUB_PATH
curl -o bin/nuke -L https://github.com/restechnica/nuke/releases/download/v$NUKE_VERSION/nuke-linux-amd64
chmod +x bin/nuke

homebrew

nuke is available through the public tap github.com/restechnica/homebrew-tap

brew tap restechnica/tap [email protected]:restechnica/homebrew-tap.git
brew install restechnica/tap/nuke

golang

nuke is written in golang, which means you can use go install. Make sure the installation folder, which depends on your golang setup, is in your system PATH.

go install github.com/restechnica/nuke/cmd/[email protected]

How to configure

nuke supports a set of default nu script names and environment variables. It currently does not support a config file.

Environment variables

  • NUKE_LOG_LEVEL: sets the nuke log level, DEBUG and INFO are supported.

Script names

Supported default script names:

  • main.nu
  • nuke.nu
  • make.nu
  • tasks.nu
  • nukefile
  • nukefile.nu
  • Nukefile
  • Nukefile.nu