| Crates.io | sbenv |
| lib.rs | sbenv |
| version | 0.1.13 |
| created_at | 2025-09-11 02:49:16.190233+00 |
| updated_at | 2025-09-24 06:39:49.605951+00 |
| description | SyftBox Env - virtualenv for SyftBox |
| homepage | https://github.com/openmined/sbenv |
| repository | https://github.com/openmined/sbenv |
| max_upload_size | |
| id | 1833260 |
| size | 187,503 |
A virtualenv-like tool for managing isolated SyftBox environments. Create, activate, and manage multiple SyftBox instances without conflicts.
curl -sSL https://raw.githubusercontent.com/openmined/sbenv/main/install.sh | bash
cargo install sbenv
git clone https://github.com/openmined/sbenv
cd sbenv
cargo build --release
sudo cp target/release/sbenv /usr/local/bin/
First, install the shell helper utilities for your shell:
sbenv install-shell
Note: If your shell doesn't look like this with nice text on the right, then open a PR to fix it:
~/datasites/me@madhavajay.com ✔ 📦 me@madhavajay.com
This will detect your shell (bash/zsh) and add the necessary functions to your shell configuration file.
sbenv init
This creates a new SyftBox environment in the current directory.
Dev mode sets SYFTBOX_AUTH_ENABLED=0 and defaults to localhost:8080. You can override that with the --server_url param.
sbenv init --dev # defaults server_url to http://localhost:8080
sbenv init --dev --server_url https://dev.syftbox.net
sbenv init --server_url https://custom.server
Notes:
--dev, default server_url is http://localhost:8080 (overridable).--dev, default server_url is https://syftbox.net.sbenv start and sbenv login run syftbox with SYFTBOX_AUTH_ENABLED=0.sbenv activate
Or use the shell function (after installing shell integration):
sba
Your prompt will change to show the active environment:
~/datasites/me@madhavajay.com ✔ 📦 me@madhavajay.com
Once activated, start the SyftBox instance:
sbenv start
When done, deactivate the environment:
sbenv deactivate
Or use the shell function:
sbd
# Create a new environment
sbenv create <name>
# Remove an environment
sbenv remove <name>
# Show current environment info
sbenv info
# Show environment status
sbenv status
# Activate an environment
sbenv activate <name>
# Deactivate current environment
sbenv deactivate
# Start SyftBox in current environment
sbenv start [--skip-login-check]
# Stop SyftBox in current environment
sbenv stop
# View SyftBox logs
sbenv logs [--lines <n>] [--follow]
Each environment is isolated in ~/.sbenv/envs/<name>/ with:
apps
datasites
.syftbox <- config.json and logs go in here
sbenv info to see details about the current environmentsbenv status to check if SyftBox is runningMake sure you've run sbenv install-shell and restarted your terminal or run:
source ~/.bashrc # for bash
# or
source ~/.zshrc # for zsh
Each environment automatically gets a unique port. If you have port issues, check:
sbenv status # Shows port information
Check the logs for the current environment:
sbenv logs --lines 50
Apache-2.0