Skip to content

CLI Overview

The TinySystems CLI provides tools for module development, testing, and deployment. This guide covers installation and basic usage.

Installation

Go Install

bash
go install github.com/tiny-systems/cli@latest

Binary Download

bash
# Linux/macOS
curl -L https://github.com/tiny-systems/cli/releases/latest/download/tinysystems-$(uname -s)-$(uname -m) -o tinysystems
chmod +x tinysystems
sudo mv tinysystems /usr/local/bin/

Verify Installation

bash
tinysystems version
# tinysystems version 1.0.0

Command Structure

tinysystems [command] [subcommand] [flags]

Commands:
  init        Initialize a new module project
  generate    Generate code (components, schemas)
  run         Run module locally
  build       Build module container image
  deploy      Deploy module to cluster
  version     Print version information
  help        Help about any command

Global Flags

FlagDescription
--configConfig file path (default: .tinysystems.yaml)
--verboseVerbose output
--debugDebug mode
--kubeconfigPath to kubeconfig
--namespaceKubernetes namespace

Quick Start

Create New Module

bash
# Initialize new module
tinysystems init my-module

# Navigate to directory
cd my-module

# Add a component
tinysystems generate component greeter

Run Locally

bash
# Start module locally
tinysystems run

# With specific port
tinysystems run --port 50051

# With debug logging
tinysystems run --debug

Build and Deploy

bash
# Build container image
tinysystems build --tag my-registry/my-module:v1.0.0

# Deploy to cluster
tinysystems deploy --image my-registry/my-module:v1.0.0

Configuration File

Create .tinysystems.yaml in your project root:

yaml
# Module configuration
module:
  name: github.com/myorg/my-module
  version: 1.0.0

# Build settings
build:
  registry: my-registry.io
  image: my-module

# Development settings
development:
  port: 50051
  namespace: tinysystems-dev

# Deployment settings
deployment:
  namespace: tinysystems
  replicas: 3

Environment Variables

VariableDescriptionDefault
TINYSYSTEMS_CONFIGConfig file path.tinysystems.yaml
TINYSYSTEMS_NAMESPACEDefault namespacetinysystems
TINYSYSTEMS_REGISTRYContainer registry(none)
KUBECONFIGKubeconfig path~/.kube/config

Command Reference

init

Create a new module project:

bash
tinysystems init [module-name] [flags]

Flags:
  --template   Template to use (basic, advanced)
  --go-module  Go module path

generate

Generate code:

bash
# Generate component
tinysystems generate component [name]

# Generate schema from struct
tinysystems generate schema [type-name]

# Generate Helm chart
tinysystems generate helm

run

Run module locally:

bash
tinysystems run [flags]

Flags:
  --port        gRPC port (default: 50051)
  --debug       Enable debug logging
  --watch       Watch for file changes
  --kubeconfig  Kubeconfig for CRD access

build

Build container image:

bash
tinysystems build [flags]

Flags:
  --tag         Image tag
  --push        Push after build
  --platform    Target platform (linux/amd64, linux/arm64)
  --no-cache    Build without cache

deploy

Deploy to Kubernetes:

bash
tinysystems deploy [flags]

Flags:
  --image       Container image
  --namespace   Target namespace
  --replicas    Number of replicas
  --dry-run     Print manifests only

Bash Completion

Bash

bash
tinysystems completion bash > /etc/bash_completion.d/tinysystems

Zsh

bash
tinysystems completion zsh > "${fpath[1]}/_tinysystems"

Fish

bash
tinysystems completion fish > ~/.config/fish/completions/tinysystems.fish

Next Steps

Build flow-based applications on Kubernetes