Skip to content

Totis CLI

Totis is the official command-line tool for managing builds and releases in Totis. Use it to authenticate, create builds, and upload artifacts directly from your terminal or CI/CD pipelines.

Installation

From Source

git clone https://github.com/gameforgelabs/totis.git
cd totis
go build -o totis ./cmd/totis

Move to PATH

sudo mv totis /usr/local/bin/
move totis.exe C:\Windows\System32\

Verify Installation

totis --help

Configuration

The CLI stores configuration in ~/.totis/config.json.

Server URL

Configure the server URL using one of these methods (in order of priority):

Method Example
Command flag --server https://api.usetotis.com
Environment variable TOTIS_SERVER_URL=https://api.usetotis.com
Default http://localhost:8080

Quick Start

# 1. Login to Totis
totis auth login

# 2. Create a build with files
totis build create \
  --workspace my-company \
  --project my-app \
  --version 1.0.0 \
  --name "Release v1.0.0" \
  --platform ANDROID \
  --file ./app-release.apk

Commands

Global Flags

Flag Short Description
--server Server URL override
--help -h Show help for any command

Authentication

totis auth login

Authenticate with Totis using service account credentials.

# Interactive login (recommended)
totis auth login

# Login with flags
totis auth login --client-id [email protected] --client-secret mysecret

# Login to a specific server
totis auth login --server https://api.usetotis.com

Flags

Flag Short Description
--client-id -i Client ID (service account email)
--client-secret -s Client Secret

Security Note

Passing credentials via flags is insecure as they may appear in process lists and shell history. Prefer interactive login when possible.


totis auth status

Display current authentication status and token information.

totis auth status

Example Output

Server URL: https://api.usetotis.com
Status: Authenticated
Token expires at: 2024-02-15T12:30:00Z
Time remaining: 45m30s

totis auth logout

Remove stored authentication credentials.

totis auth logout

Build Management

totis build create

Create a new build and optionally upload files.

totis build create \
  --workspace myworkspace \
  --project myproject \
  --version 1.0.0 \
  --name "Release v1.0.0"

Required Flags

Flag Short Description
--workspace -w Workspace slug
--project -p Project slug
--version -v Build version (e.g., "1.0.0")
--name -n Build name

Optional Flags

Flag Description Default
--platform Target platform OTHER
--arch Platform architecture (e.g., arm64-v8a)
--type Build type CI
--commit Git commit hash
--branch Git branch name
--notes Release notes
--ci-url CI/CD pipeline URL
--tag Build tags (repeatable)
--file Files to upload (repeatable)
--continue-on-error Continue if a file upload fails false

Platforms

Value Description
ANDROID Android application
IOS iOS application
WINDOWS Windows application
MACOS macOS application
LINUX Linux application
OTHER Other platform

Build Types

Value Description
RELEASE Production release
DEBUG Debug build
BETA Beta release
ALPHA Alpha release
CI CI/CD build

File Validation

Before uploading, the CLI validates all files:

Check Description
Exists File must exist at the specified path
Not empty File must not be 0 bytes
Not directory Must be a file, not a directory
Size limit Must be under 10GB
No duplicates No two files can have the same filename

Large Files

Files larger than 2GB will show a warning. Upload may take significant time.


Examples

Basic Build Creation

totis build create \
  --workspace myworkspace \
  --project myproject \
  --version 1.0.0 \
  --name "Release v1.0.0"

Full Build with All Options

totis build create \
  --workspace gameforge-labs \
  --project puzzle-quest \
  --version 2.1.0 \
  --name "Summer Update" \
  --platform ANDROID \
  --arch arm64-v8a \
  --type RELEASE \
  --branch main \
  --commit a1b2c3d4e5f6 \
  --notes "Summer 2024 update with new features" \
  --ci-url "https://ci.example.com/build/123" \
  --tag production \
  --tag stable \
  --tag summer-release \
  --file ./build/output/app-release.apk \
  --file ./build/output/mapping.txt

iOS Build with Symbols

totis build create \
  --workspace myworkspace \
  --project myapp \
  --version 1.5.0 \
  --name "iOS Release 1.5.0" \
  --platform IOS \
  --arch arm64 \
  --type RELEASE \
  --tag appstore \
  --tag production \
  --file ./build/MyApp.ipa \
  --file ./build/MyApp.app.dSYM.zip

Continue on Error

Upload remaining files even if one fails:

totis build create \
  --workspace myworkspace \
  --project myproject \
  --version 1.0.0 \
  --name "Release" \
  --file file1.apk \
  --file file2.apk \
  --file file3.apk \
  --continue-on-error