Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

nucleuscloud/cli

Repository files navigation

Nucleus CLI

Dependencies

golangci-lint: brew install golangci-lint

Command Line Tools Package for XCode: xcode-select --install

Enable private repo access (using ssh)

export GOPRIVATE=github.com/nucleuscloud

Add the following to ~/.gitconfig

[url "git@github.com:nucleuscloud"]
    insteadOf = https://github.com/nucleuscloud

Building

All of the build scripts are encapsulated within the Makefile

To build the project in a standard way for your OS, simply run:

make build

This will output to bin/nucleus

Releasing

To release a new version of the CLI for consumption, a new git tag must be created.

$ ./hack/tag.sh v1.0.0

This will create a git tag and push it to the origin. This will kick off a Github Action, which will do the following:

  1. Build the project across multiple targets (linux, mac) and multiple architectures (64bit, ARM)
  2. Create a new Github Release based off of the new tag and attach the binaries to the release.

Installing Nucleus CLI

Homebrew

You can install Nucleus CLI directly from Homebrew

brew install nucleuscloud/tap/nucleus

Download from releases page

  1. Go to the Releases Page.
  2. Download the tarball for your operating system: tar xzf <path-to-tar.gz> nucleus
  3. Put the binary somewhere on your PATH. E.g., on linux and mac: mv nucleus /usr/local/bin/nucleus.

Using the AUR

The Nucleus CLI can be found at nucleus-bin on the AUR. This can be installed with an AUR helper or by running:

sudo pacman -S base-devel git
git clone https://aur.archlinux.org/nucleus-bin.git
cd nucleus-bin
makepkg -si

Install via a package manager

Ensure you have go installed. This is only possible today for Nucleus devs as the CLI depends on types that live in the private organization

make
./bin/nucleus