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@latestBinary 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.0Command 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 commandGlobal Flags
| Flag | Description |
|---|---|
--config | Config file path (default: .tinysystems.yaml) |
--verbose | Verbose output |
--debug | Debug mode |
--kubeconfig | Path to kubeconfig |
--namespace | Kubernetes 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 greeterRun Locally
bash
# Start module locally
tinysystems run
# With specific port
tinysystems run --port 50051
# With debug logging
tinysystems run --debugBuild 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.0Configuration 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: 3Environment Variables
| Variable | Description | Default |
|---|---|---|
TINYSYSTEMS_CONFIG | Config file path | .tinysystems.yaml |
TINYSYSTEMS_NAMESPACE | Default namespace | tinysystems |
TINYSYSTEMS_REGISTRY | Container registry | (none) |
KUBECONFIG | Kubeconfig 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 pathgenerate
Generate code:
bash
# Generate component
tinysystems generate component [name]
# Generate schema from struct
tinysystems generate schema [type-name]
# Generate Helm chart
tinysystems generate helmrun
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 accessbuild
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 cachedeploy
Deploy to Kubernetes:
bash
tinysystems deploy [flags]
Flags:
--image Container image
--namespace Target namespace
--replicas Number of replicas
--dry-run Print manifests onlyBash Completion
Bash
bash
tinysystems completion bash > /etc/bash_completion.d/tinysystemsZsh
bash
tinysystems completion zsh > "${fpath[1]}/_tinysystems"Fish
bash
tinysystems completion fish > ~/.config/fish/completions/tinysystems.fishNext Steps
- Development Commands - Detailed commands
- Module Scaffold - Project templates
- Local Testing - Test locally