sweb

A command-line interface for the SpaceWeb (sweb.ru) hosting
API, modeled after kubectl / yc. Built on
sweb-go-sdk (Cobra + Viper + Charm
Fang).
Install
mise (installs the released binary via the ubi backend):
mise use -g ubi:sanchpet/sweb # latest release
mise use -g ubi:sanchpet/sweb@0.1.0 # a specific version
Go (builds from source; needs a Go toolchain):
go install github.com/sanchpet/sweb@latest
Pre-built binary — download the archive for your OS/arch from the
Releases page, verify it against
checksums.txt, extract, and put sweb on your PATH.
Debian/Ubuntu and RHEL/Fedora — grab the .deb / .rpm from the
Releases page:
sudo dpkg -i sweb_*_linux_amd64.deb # Debian/Ubuntu
sudo rpm -i sweb_*_linux_amd64.rpm # RHEL/Fedora
Homebrew (brew install) is planned — it needs a dedicated tap repository.
Releases are produced by GoReleaser on every v* tag
(cross-platform binaries + checksums + deb/rpm).
Usage
# 1. Authenticate (prompts for login/password, stores the token in the OS
# keyring — falls back to a 0600 file when none is available). Or set
# SWEB_TOKEN in the environment.
sweb configure
sweb configure --insecure-storage # force the plaintext-file backend
# 2. Inspect the catalog (plan / OS / datacenter IDs).
sweb vps config
# 3. List your VPS instances (-o json for machine output).
sweb vps list
sweb vps list -o json
# 4. Provision a VPS (mutates — bills your account).
sweb vps create --plan 4 --distributive 32 --datacenter 1 \
--alias hub --ssh-key "$(cat ~/.ssh/id_ed25519.pub)"
Token resolution precedence: --token flag → $SWEB_TOKEN → OS keyring → config file.
Develop
mise install # Go + golangci-lint + pre-commit
mise run ci # lint + test + build
License
MIT — see LICENSE.