Quickstart
Create a workspace, store your first secret, and run a command against it - start to finish in about ten minutes.
Before you start
You need an account on shortspan.dev - or a self-hosted deployment, in which case read Installation first and come back here. Everything below works on the free tier.
Signing up walks you through four short setup steps: name a workspace, tell us a little about yourself, create a first project, and optionally invite people. That is covered in First-run setup; this page picks up once you have a workspace and a project.
1. Install the CLI
# macOS and Linux
curl -fsSL https://shortspan.dev/install.sh | sh
# or with Go, from source
go install github.com/ft72/shortspan/cli@latestshortspan versionFull instructions, including Windows and self-hosted hosts, are in Installing the CLI.
2. Sign in
shortspan loginThe CLI prints an eight-character code and a URL. Open the URL in a browser where you are signed in, confirm the code matches, and approve. The CLI is polling and will pick up the token within a few seconds.
The token goes into your operating system keyring - Keychain on macOS, Secret Service on Linux, Credential Manager on Windows. It is not written to a file.
shortspan whoami3. Choose where you are working
Almost every command acts on a project, so the CLI keeps an active organization and project rather than making you name them each time.
shortspan org list
shortspan org use acme
shortspan project list
shortspan project use production4. Store a secret
shortspan secret set STRIPE_SECRET_KEY --template plainSecrets are typed. plain is an opaque string; there are also templates for environment variables, JSON documents, TLS certificates, SSH logins, database connections, AWS credentials, and kubeconfigs. shortspan secret templates lists them, and Secret templates documents each one's fields.
shortspan secret list5. Use it without ever seeing it
This is the part worth internalising. There are two ways to get a secret out, and only one of them is a good habit.
# Injects the value as an env var into one process. Nothing is printed,
# nothing reaches your shell history, nothing lands on disk.
shortspan secret run STRIPE_SECRET_KEY -- ./deploy.sh# Prints the plaintext to stdout. Requires the secrets:reveal ability,
# is rate limited separately, and is recorded as a reveal in the audit log.
shortspan secret get STRIPE_SECRET_KEY6. Group what belongs together
An application needs a dozen environment variables, not one. A secret group names that set so it can be injected as a unit.
shortspan secret group create api-production --environment production
shortspan secret set DATABASE_URL --template env --group api-production
shortspan secret set REDIS_URL --template env --group api-production
# Every secret in the group, injected into one process.
shortspan run api-production -- npm start7. Register a server
Servers, databases, AWS accounts, and Kubernetes clusters are registered in the console under Infrastructure, because doing so means handing over a credential and that is worth doing deliberately.
Once a server is registered with the alias prod-web-1, anyone with developer access to the project can connect without ever holding its key:
shortspan ssh prod-web-1
# or across a whole tagged fleet
shortspan ssh exec @web "systemctl status nginx"Databases work the same way, including through a bastion:
shortspan db main
shortspan db main --via prod-web-1
shortspan db main --printWhat to read next
Something here wrong or missing? Tell us.