Skip to main content

spawnm

"spawn machine": Quickly spin up temporary Hetzner Cloud VMs.

Simply run

spawnm --ssh --workdir

to directly SSH into a new server with the contents of the current folder copied into it.

*Requires Hetzner's CLI hcloud to be set up and authed.

Installation

uv install spawnm

Prerequisites

  1. Install the Hetzner Cloud CLI:

    brew install hcloud  # macOS
    

    Or see https://github.com/hetznercloud/cli for other platforms.

  2. Configure hcloud with your API token:

    hcloud context create myproject
    # Enter your API token from https://console.hetzner.cloud/
    
  3. Upload your SSH key to Hetzner Cloud:

    hcloud ssh-key create --name id_hetzner_macbook_air --public-key-from-file ~/.ssh/id_hetzner.pub
    

Usage

Create a VM

# Create with defaults
spawnm

# Create and SSH in immediately
spawnm --ssh

# Create, sync current directory, and SSH in
spawnm --ssh --workdir

# Create with custom options
spawnm --name my-server --size cx33 --image ubuntu-24.04

Destroy a VM

# Destroy the only tracked instance
spawnm destroy

# Destroy a specific instance
spawnm destroy my-server

# Destroy all tracked instances
spawnm destroy --all

Options

Option Default Description
--name spawn-tmp-XXXX Server name (random suffix by default)
--size cx23 Server type (cx23, cx33, cx43, etc.)
--image ubuntu-24.04 OS image
--location fsn1 Datacenter (fsn1, nbg1, hel1, ash)
--ssh-key id_hetzner_macbook_air SSH key name in Hetzner Cloud
--ssh - SSH into server after creation
--workdir - Sync current directory to the server

Server Types

Type vCPU RAM Disk
cx22 2 4 GB 40 GB
cx23 2 4 GB 80 GB
cx32 4 8 GB 80 GB
cx33 4 8 GB 160 GB
cx42 8 16 GB 160 GB
cx43 8 16 GB 320 GB

Locations

Code Location
fsn1 Falkenstein, Germany
nbg1 Nuremberg, Germany
hel1 Helsinki, Finland
ash Ashburn, USA

State

Instance information is stored in $XDG_STATE_HOME/spawnm/instances.json (defaults to ~/.local/state/spawnm/instances.json).

License

BSD-2-Clause

Metadata

Release files for spawnm 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spawnm 0.2.1
File Size Uploaded Provenance Actions
spawnm-0.2.1.tar.gz 13.6 kB Without provenance Details for spawnm-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spawnm 0.2.1
File Interpreter ABI Platform Actions
spawnm-0.2.1-py3-none-any.whl Python 3 none any Details for spawnm-0.2.1-py3-none-any.whl

Total release size: 26.2 kB

Release files / spawnm-0.2.1.tar.gz

Download URL spawnm-0.2.1.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
88e46b7de7f4e21d83dc706a7db3ff6b07a1746ec24e4e67d50ad6a3f540fa8c
BLAKE2b-256 checksum
How to use checksums
6253ff806ebe414e270bdd9db3f6263c19b6e9642b78e3f021627c8a14844f9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / spawnm-0.2.1-py3-none-any.whl

Download URL spawnm-0.2.1-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26903860fc5a7d8bcb4863d46eeb2f365b33941e807fd683002036cdb4cde104
BLAKE2b-256 checksum
How to use checksums
7e23b360f037a86c53d95827417161ca72dbf820694706af368ea837b9578067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Security for spawnm 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page