We offer a Python CLI/Library for those who prefer to use a CLI (Command Line Interface,) or want to integrate SporeStack with existing Python tooling.
Probably the easiest option all around if you just want to use the CLI, if you already have pipx.
pipx run 'sporestack[cli]'
For a normal install, recommended method is to use pip.
pip install sporestack[cli]
Now you can run sporestack.
pip install sporestack
SporeStack Python source tarballs and wheels
Here are some examples.
# First, read the Acceptable Use Policy.
$ sporestack aup
# Create a new token. Fund it with $250, and pay with Monero.
$ sporestack token create --dollars 250 --currency xmr
# The token creation command will suggest that you create an SSH key for the token.
# That command should look something like this...
$ ssh-keygen -C "" -t ed25519 -f ~/.sporestack/sshkey/primary/id_ed25519
# This SSH key should be backed up and kept secret, just like your token!
# We recommend creating an SSH key for your token.
# If you don't want do this, you can pass `--ssh-key-file` when you launch a server.
# Otherwise, `~/.ssh/id_rsa.pub` will be the default.
# View information about your token, including how many days left your token can
# sustain your autorenewing servers for.
$ sporestack token info
# View messages send to/from your token.
$ sporestack token messages
# View your token's invoices.
$ sporestack token invoices
# View available operating systems.
$ sporestack server operating-systems
# View available "flavors" (plans, or server sizes.)
$ sporestack server flavors
# View available regions.
# Note that all three of these commands (operating-systems/flavors/regions)
# accept a `--provider` option, in case you're only interested in viewing a
# particular provider's offerings.
$ sporestack server regions
# Launch a OpenBSD 7.8 server on Vultr, in Chicago, Illinois, USA.
# This will use your `primary` token, unless you pass `--token` for something else.
# This server will automatically renew from your token's balance.
# Note that hostnames are saved in our database in plain text -- we can see them.
# You don't have to launch with a hostname, but it can be a helpful reference.
$ sporestack server launch --hostname SomeHostname --operating-system openbsd-7.8 \
--autorenew --provider vultr --flavor vc2-1c-1gb --region ord`
# If you find the server off, check your token's balance with `sporestack token info`.
# If servers aren't able to automatically renew, they are powered off as a way to signal
# that payment is needed, else the server will be deleted. We don't have any way to email you
# if this is the case, given the nature of our service!
# Shutdown the server.
$ sporestack server stop --hostname SomeHostname
# Or use the server's machine ID to be more pedantic (or if you didn't assign a hostname.)
$ sporestack server stop --machine-id ss_m_...
# Turn the server back on.
$ sporestack server start --hostname SomeHostname
# List your servers.
$ sporestack server list
# Get more detailed information on your server than the list view.
$ sporestack server info --hostname SomeHostname
# Delete the server when you're all done with it. This deletes all data and is non-recoverable!
$ sporestack server delete --hostname SomeHostname
# Launch a server on DigitalOcean, in a random region.
# This is for a one day fixed lifetime, after which it will be deleted if not renewed.
$ sporestack server launch --hostname SomeHostname --operating-system debian-12 --days 1 \
--provider digitalocean --flavor vps-1vcpu-1gb --region auto