baseshift
Command-line client for Baseshift. Create dubs (masked or subsetted copies of a source database), take snapshots, and start clones for development and testing.
Install
pip install baseshift
Platform wheels ship for:
- macOS (Intel and Apple Silicon)
- Linux (
x86_64andarm64) - Windows (
amd64)
The default install talks to clones over WireGuard. For Tailscale, install the companion extra so both packages stay on the same version:
pip install 'baseshift[ts]'
Confirm the install:
baseshift --version
baseshift --help
Quick start
# Browser OAuth (default). Use --method=direct for email/password.
baseshift auth login
# Optional: write ~/.baseshift/config (org token and default dub)
baseshift init
# Create a cloud dub with demo data, or point at your own Postgres.
baseshift dub create --name my-dub --use-demo-db --encryption-password MyKey123
baseshift dub list
# Snapshot, then start a clone and print connection details.
baseshift snapshot create --dub my-dub --wait
baseshift server-clone start --dub my-dub
baseshift server-clone list --dub my-dub
baseshift server-clone stop
--dub accepts a name or a UUID. A name is resolved by the API; pass
--org-token (or set BASESHIFT_ORG_TOKEN / orgToken in config) when the
same name exists in more than one org. A UUID never needs --org-token.
dub create and dub list use your only organization when --org-token
is omitted. When you belong to more than one organization, pass
--org-token.
Commands
| Command | What it does |
|---|---|
auth |
Log in, log out, and check authentication status |
init |
Create ~/.baseshift/config with default org and dub |
dub |
Create and manage dubs (cloud or self-hosted Helm) |
data-env |
Create and manage data environments and their snapshots |
server-clone |
Start, stop, and list clones on Baseshift servers |
local-clone |
Pull or run a dub's snapshot image with local Docker |
snapshot |
Create, check, and list snapshots of a dub |
mcp |
Run the Baseshift MCP server on stdio |
Run baseshift <command> --help (and baseshift dub create -h) for flags.
Common dub actions: create, list, describe, status, health-check,
validate-values, configure-source, subset, masking.
Cloud dub against your database
baseshift dub create --name my-dub \
--hostname mydb.example.com --database acme --username app \
--password-stdin --encryption-password MyKey123
Self-hosted dub (Helm values)
baseshift dub create --deployment self-hosted --name my-onprem-dub \
--hostname mydb.example.com --database acme --username dubhub \
--password-stdin --registry-type none
baseshift dub validate-values --values-file values.yaml
Local Docker clone
baseshift local-clone pull --dub my-dub
baseshift local-clone run --dub my-dub -- --publish 5432:5432
Configuration
Values resolve as CLI flag → environment variable → ~/.baseshift/config → default.
baseshift init writes JSON to ~/.baseshift/config:
{
"orgToken": "<org-uuid>",
"dubUuid": "<dub-uuid>"
}
| Setting | Flag | Environment | Config key |
|---|---|---|---|
| Organization | --org-token |
BASESHIFT_ORG_TOKEN |
orgToken |
| Default dub | --dub / --dub-uuid |
BASESHIFT_DUB_UUID |
dubUuid |
Useful environment variables:
BASESHIFT_VERBOSE=1— DEBUG logs and full tracebacks (same as-v)BASESHIFT_DISABLE_SENTRY=1— disable error telemetryBASESHIFT_HELM_BIN— override the bundled Helm binary used bydub validate-values
MCP
baseshift mcp runs an MCP server on stdio (start/stop clones and related
tools). Log in with baseshift auth login first. Example Cursor config:
{
"mcpServers": {
"baseshift": {
"command": "baseshift",
"args": ["mcp"]
}
}
}
Links
- Product: baseshift.com
- App: app.baseshift.com
- PyPI: pypi.org/project/baseshift
License
BSD 2-Clause. See LICENSE, THIRD-PARTY-NOTICES, and
LICENSES-Apache-2.0-Helm.txt (bundled Helm).
Metadata
Release files for baseshift 3.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| baseshift-3.7.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| baseshift-3.7.0-py3-none-manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| baseshift-3.7.0-py3-none-manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| baseshift-3.7.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| baseshift-3.7.0-py3-none-macosx_10_9_x86_64.whl | Python 3 | none | macOS 10.9+ x86-64 | Details |
Total release size: 104.9 MB
Release files / baseshift-3.7.0-py3-none-win_amd64.whl
| Download URL | baseshift-3.7.0-py3-none-win_amd64.whl |
|---|---|
| Size | 21.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a3b10a2ac3b9e05fed3bf1a2fcd6f9c120761c097b5e3ff0597bd621a0c150ee
|
|
BLAKE2b-256 checksum How to use checksums |
049812345628d5149a3519c39baaf2a75e05b60f53838c0a01f0b6560eca6f2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / baseshift-3.7.0-py3-none-manylinux2014_x86_64.whl
| Download URL | baseshift-3.7.0-py3-none-manylinux2014_x86_64.whl |
|---|---|
| Size | 21.1 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b06318f92a365ca4e867239ce17a0cdf4bcc849779d5486b71d473014e5164b6
|
|
BLAKE2b-256 checksum How to use checksums |
2d0136b2eb6b235a41e6898c9e63c0dbf8a90e21a2b20b6e8056cf97b42bbf1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / baseshift-3.7.0-py3-none-manylinux2014_aarch64.whl
| Download URL | baseshift-3.7.0-py3-none-manylinux2014_aarch64.whl |
|---|---|
| Size | 19.3 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
439886e6c7c469181738bbf818e70cc80564fa17f0da1bc0ab9b19c441d50d06
|
|
BLAKE2b-256 checksum How to use checksums |
0c31a6f7ef9f7c26a7f5d3820d89e5322c6503392c64d328c94883725a739084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / baseshift-3.7.0-py3-none-macosx_11_0_arm64.whl
| Download URL | baseshift-3.7.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 20.9 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
665ffdd57ee871da7f7414c6731ca8a364d63f2d3ee8637e68dd538dcc5ca240
|
|
BLAKE2b-256 checksum How to use checksums |
74893e4a3ea24381e2a441d40c1b2ec5fb3db85d73498ee4f6c7045c6baca2fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / baseshift-3.7.0-py3-none-macosx_10_9_x86_64.whl
| Download URL | baseshift-3.7.0-py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 22.0 MB |
| Tags | Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
c755826cf937c3f8c5116128cbebe2a45bf9b2935855fe9d0c46f8dc935ee6c1
|
|
BLAKE2b-256 checksum How to use checksums |
feb8cf773a06fc4aac8a3a147e69a7811fdc586a12df4168be738c44225b2c59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|