Skip to content
Soulsand Docs

Repos, secret files & setup

Besides variables, your environment sets what every new sandbox starts with: GitHub repos in ~, secret files, and setup scripts.

$ soulsand environment add-repo https://github.com/you/app        # optionally #branch
$ soulsand environment add-file app/.env ./app/.env              # or pipe on stdin
$ echo 'npm ci' | soulsand environment repo-setup app -         # runs in ~/app after the clone
$ echo 'docker compose up -d' | soulsand environment setup -    # runs in ~
$ soulsand environment show

At every start (create, start, fork, restore), secret files are written (mode 600) before the sandbox is running. Then a background job clones missing repos, runs each repo's setup, then the setup script. The script runs every start, so make it idempotent. Check it with soulsand jobs box and soulsand logs box JOB; setup_status in soulsand info is none, running, done or failed (with setup_error).

Private repos: connect GitHub (short-lived token per sandbox), set a GH_TOKEN variable, or add a .git-credentials secret file. SSH URLs need a key as a secret file (.ssh/id_ed25519).

Per sandbox

$ soulsand new box --file app/.env=.env                         # one sandbox's file (up to 20, 1 MiB)
$ soulsand new pr-42 --repo https://github.com/you/app#pr-42    # one sandbox's repo, in ~/app (--repo-dir)
$ soulsand new box --setup-file setup.sh                        # runs once, after first boot
$ soulsand new box --no-environment                             # none of your variables, repos, files, scripts or froog key

Per-sandbox files win over secret files with the same path. A --repo is cloned even with --no-environment; API: "repo": {"url", "branch"?, "dir"?}. Tokens in the URL are refused; pass -e GH_TOKEN=…. Forks don't redo any of these (the disk has them). Use --no-environment for untrusted code or people; its forks get nothing either.

Removing your logins

When a sandbox starts without the environment from a disk that had it (fork, start or new --from with --no-environment), or from a share code, froog first deletes these. If that fails, the start fails.

  • git/GitHub: ~/.config/gh, ~/.git-credentials, ~/.config/git/credentials, ~/.config/hub, credential sections of ~/.gitconfig.
  • SSH: all of ~/.ssh except authorized_keys and known_hosts*.
  • Coding agents: Claude Code (~/.claude/.credentials.json, login keys in ~/.claude.json), Codex, Kimi Code, Mistral Vibe, Gemini, opencode, Amp, pi, Cursor, GitHub Copilot, aider credentials.
  • Registries: .npmrc, .yarnrc.yml, .pypirc, .netrc, Cargo and gem credentials, .docker/config.json.
  • Clouds: AWS credentials and SSO cache, gcloud and Azure tokens, ~/.kube, Vault, Terraform, 1Password CLI, Hugging Face tokens.
  • froog's key and ~/.froog/env; shell and REPL history.
  • All of the above under /root.
  • Every secret file any of your environments ever had, ~/.froog/setup, and (for share codes) your environments' repo directories.
  • Old cloud-init data and logs, and system logs.

Files are overwritten before deletion and free space is trimmed, so root in the sandbox can't recover them. The sandbox gets a new SSH host key. Your variables never reach it. Later starts of it don't scrub again.

Several environments

Your account starts with default. Make more for different kinds of sandboxes and pick one per sandbox.

$ soulsand environment create ci --copy-from default    # or empty
$ soulsand environment add-file ci .npmrc ./ci.npmrc    # or --env ci; default env if omitted
$ soulsand new job-1 --environment ci
$ soulsand environment list
$ soulsand environment default ci                       # used when a sandbox names none
$ soulsand environment rename ci jobs
$ soulsand environment rm jobs
  • Names: 1–40 lowercase letters, digits, dashes. Up to 20 environments.
  • Account variables go to every environment.
  • Deleting one leaves its sandboxes running. The default can't be deleted (409 environment_is_default).
  • API: /environments, /environments/{env}, /environments/{env}/files; environment_name on POST /sandboxes.

Versions and upgrades

Every change makes a new, immutable version. A sandbox stays on its version until you move it.

$ soulsand environment versions ci
$ soulsand environment upgrade ci            # all of ci's sandboxes to latest
$ soulsand environment upgrade ci --sandbox job-1
$ soulsand start job-2 --environment default # switch environment
  • Upgrades apply at once to running sandboxes (files rewritten, dropped files deleted, setup rerun); stopped ones at next start. API: POST /environments/{env}/upgrade.
  • A fork keeps its source's version. A sandbox from a saved snapshot gets the latest.
  • The last 50 versions are kept, plus any still in use.

Secret files and scripts are encrypted at rest; file contents are never shown again. Limits: 20 repos, 50 files (64 KiB each, 1 MiB total), 64 KiB per script. The dashboard edits all of it.