Skip to content

taubyte/tau-cli

Repository files navigation

Tau CLI
Tau CLI

Local Coding Equals Global Production

Release License Go Report Card GoDoc Discord

tau is a command-line interface (CLI) tool for interacting with Taubyte-based Clouds. It enables users to create, manage projects, applications, resources, and more directly from the terminal.

Installation

NPM

npm i @taubyte/cli

Self extracting

curl https://get.tau.link/cli | sh

Fetch and Install with Go

go install github.com/taubyte/tau-cli@latest

You can rename tau-cli to tau or create an alias.

Clone and Build

git clone https://github.com/taubyte/tau-cli
cd tau
go build -o ~/go/bin/tau

Offline version (Optional)

Fails faster if exploring an unregistered project

go build -o ~/go/bin/otau -tags=localAuthClient

Login

tau login - opens selection with default already selected - simply logs in if only default available - will open new if no profiles found tau login --new for new

  • --set-default for making this new auth the default tau login <profile-name> for using a specific profile

Environment Variables:

  • TAUBYTE_PROJECT Selected project
  • TAUBYTE_PROFILE Selected profile
  • TAUBYTE_APPLICATION Selected application
  • TAUBYTE_CONFIG (default: ~/tau.yaml) Config location
  • TAUBYTE_SESSION (default: /tmp/tau-<shell-pid>) Session location
  • DREAM_BINARY (default: $GOPATH/dream) Dream binary location

Testing

All tests

go test -v ./...

Hot reload tests

$ cd tests

Edit air config cmd = "go test -v --run <Function|Database|...> [-tags=no_rebuild]

(Optional) Add debug: true, to an individual test

$ air

Running Individual Prompts

go run ./prompts/internal

Measuring Coverage:

Calculate coverage for all packages

go test -v ./... -tags=localAuthClient,projectCreateable,localPatrick,cover,noPrompt -coverprofile cover.out -coverpkg ./...

Display coverage for all packages

go tool cover -html=cover.out
go tool cover -func=cover.out

Documentation

For documentation head to tau.how