spawn

Spawn CLI Documentation

The Spawn CLI is a powerful command-line tool designed to simplify the management and development of Spawn projects and infrastructure. This guide provides an overview of the available commands, their subcommands, and usage examples.


Commands Overview

Each command comes with its own set of options and subcommands, which are detailed below.


1. new Command

Description:

Creates a new Spawn project tailored for a specific target language.

Usage:

spawn new <subcommand> [OPTIONS] <name>

Subcommands:

Options for new dart:

Example:

spawn new dart --actor-system=spawn-system myapp

Options for new elixir:

Example:

spawn new elixir --actor-system=spawn-system --statestore-type=postgres myapp

Options for new go:

Example:

spawn new go --actor-system=spawn-system myapp

Options for new java:

Example:

spawn new java --actor-system=spawn-system myapp

Options for new node:

Example:

spawn new node --actor-system=spawn-system myapp

Options for new python:

Example:

spawn new python --actor-system=spawn-system myapp

Options for new rust:

Example:

spawn new rust --actor-system=spawn-system myapp

2. apply Command

Description:

Applies Spawn actor resources to a Kubernetes cluster.

Usage:

spawn apply [OPTIONS]

Options:

Example:

spawn apply --file=myapp-actor-host.yaml

3. config Command

Description:

Configures Spawn applications, including ActorSystem and ActorHost CRDs.

Usage:

TODO


4. dev Command

Description:

Manages local development workflows.

Usage:

spawn dev <subcommand> [options]

Subcommands:

Options for dev run:

Example:

spawn dev run --actor-system "custom-system" \
    --protos="./protos" \
    --proxy-bind-address="192.168.1.1" \
    --proxy-bind-port=8080 \
    --proxy-image="custom/proxy:latest" \
    --actor-host-port=9090 \
    --database-self-provisioning=false \
    --database-host="localhost" \
    --database-port 5432 \
    --database-type="postgres" \
    --database-pool=50  \
    --statestore-key="custom-key" \
    --log-level="debug" \
    --nats-image="nats" \
    --nats-http-port=8222 \
    --nats-port=4222 \
    --name="custom-proxy"

5. install Command

Description:

Installs orchestrators or runtimes, such as Kubernetes.

Usage:

spawn install <runtime> [options]

Runtimes:

Options for install kubernetes:

Example:

spawn install --version=1.4.2

6. playground Command

Description:

Sets up and runs a complete Spawn tutorial, providing a self-contained learning environment.

Usage:

spawn playground <subcommand> [options]

Subcommand:

Options for playground new:

Example:

spawn playground new --name=test

Options for playground list:

TODO

Example:

spawn playground list 

Back to Index

Next: Custom Resources

Previous: Install