Forgejo/Codeberg/GitHub action to install Nushell
  • Just 49%
  • Shell 37.7%
  • Nushell 13.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David 2743462116
All checks were successful
Test / Install Nushell 0.100.0 (push) Successful in 4s
Test / Install Nushell 0.101.0 (push) Successful in 5s
Test / Install Nushell latest (push) Successful in 13s
Merge pull request 'chore: standardize LICENSE (MIT, Nice Guy IT, LLC)' (#10) from chore/license into main
Reviewed-on: #10
2026-06-16 13:24:27 +02:00
.forgejo/workflows chore(ci): match sibling Forgejo runner and bump checkout to v5 2026-06-13 19:50:46 -04:00
.github/workflows chore(ci): match sibling Forgejo runner and bump checkout to v5 2026-06-13 19:50:46 -04:00
.idea feat: New action to test (WIP) 2025-06-29 19:45:25 -04:00
tests feat: add CI tests, floating major tag, drop dead create-config 2026-06-13 19:07:51 -04:00
.gitignore chore: expand .gitignore with language and editor templates 2026-06-13 18:28:45 -04:00
action.yml feat: add CI tests, floating major tag, drop dead create-config 2026-06-13 19:07:51 -04:00
install-nushell.sh fix: install jq on demand when resolving the latest version 2026-06-13 20:00:56 -04:00
justfile feat: create a Forgejo Release in create-release, not just a tag 2026-06-13 19:28:57 -04:00
LICENSE chore: add MIT LICENSE 2026-06-16 06:30:54 -04:00
README.md feat: add CI tests, floating major tag, drop dead create-config 2026-06-13 19:07:51 -04:00

Action to Install Nushell

This is a Forgejo/Gitea/GitHub action to install Nushell into the current environment or container. The goal is to create a lightweight installer that works outside GitHub (i.e. in a self-hosted environment). The source lives on dev.a8n.run and is mirrored to Codeberg and GitHub.

Note: This hasn't been tested much so you may run into problems. Pull requests are welcome!

Why not setup-nu or setup_nu?

Why not use setup-nu or setup_nu instead of reinventing the wheel?

setup-nu (marketplace) uses the GitHub token for API calls. When used outside GitHub, the token is either blank or the Forgejo/Gitea token resulting in a 401 authentication failure. setup-nu can be used only inside GitHub. Additionally, setup-nu pulls in a 1.8MB webpack file.

setup_nu (marketplace) is a little better in that it compiles a Rust program to determine the architecture and download Nushell. Using this outside GitHub results in an error that it couldn't find Cargo.toml. Besides not working, pulling in the Rust toolchain just to download Nushell didn't seem efficient.

Example usage

Here's a complete example with comments.

---
on:
  push:
    branches:
      - '**'

defaults:
  run:
    # Set the default shell to nu
    shell: nu {0}

jobs:
  nushell-action:
    name: Nushell action
    # This label is in the Forgejo Runner.
    runs-on: ubuntu-act-22.04
    steps:
      -
        name: Checkout code
        # Use FQDN for clarity.
        uses: https://code.forgejo.org/actions/checkout@v4

      -
        name: Install Nushell
        id: nushell
        # Nothing has been tagged yet. Use main.
        uses: https://dev.a8n.run/pandoras-box/action-install-nushell@main
        with:
          nushell-version: '0.101.0'
          register-plugins: true

      -
        name: Installed Nushell version
        # This will output the Nushell version emitted from the action.
        env:
          NUSHELL_VERSION: ${{ steps.nushell.outputs.nushell-version }}
        run: $env.NUSHELL_VERSION

      -
        name: Nushell version
        # This will run nu's "version" command.
        run: version

Inputs

  • set-default: Set Nushell as the default shell? This uses chsh to change the shell of the default user (usually root).
  • nushell-version: Nushell version to install.
  • register-plugins: Register plugins after installation?

Outputs

  • nushell-version: Nushell version that was installed. Should match the input of the same name.