TypeScript SDK and CLI for Upstash Box — sandboxed AI coding agents
See the codeTypeScript SDK, Python SDK, and CLI for Upstash Box — sandboxed AI coding agents with streaming, structured output, file I/O, git, and snapshots.
| Package | Description |
|---|---|
@upstash/box | TypeScript SDK — programmatic access to the Box API |
upstash-box | Python SDK — sync + async clients, published to PyPI |
@upstash/box-cli | CLI — REPL-first terminal interface wrapping the SDK |
The TypeScript SDK and CLI live in a pnpm workspace:
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Watch mode (both packages)
pnpm dev
The Python SDK is a standalone package with its own tooling (it is not part of the pnpm workspace):
cd packages/python-sdk
pip install -e ".[dev]"
pytest # run the test suite
python scripts/generate_sync.py # regenerate the sync client from the async source
See packages/python-sdk/README.md and its
CONTRIBUTING.md for details.
.
├── packages/
│ ├── sdk/ # @upstash/box — TypeScript SDK
│ │ ├── src/
│ │ └── examples/
│ ├── python-sdk/ # upstash-box — Python SDK (sync + async)
│ │ ├── upstash_box/
│ │ ├── examples/
│ │ └── tests/
│ └── cli/ # @upstash/box-cli — CLI + interactive REPL
│ └── src/
├── pnpm-workspace.yaml
├── tsconfig.base.json
└── package.json
The TypeScript SDK and CLI use Vitest. There are two test suites:
The Python SDK uses pytest (with pytest-asyncio +
respx) and follows the same unit/integration split — integration tests are
gated on UPSTASH_BOX_API_KEY. Run it from packages/python-sdk with pytest.
Create a .env file at the repository root:
UPSTASH_BOX_API_KEY=abx_...
AGENT_API_KEY=sk-ant-...
Integration tests are automatically skipped when these variables are not set.
# Run all tests (unit + integration if .env is present)
pnpm test
# Run only integration tests
pnpm test:integration
# Run tests for a single package
cd packages/sdk && pnpm test
cd packages/cli && pnpm test
The npm packages (@upstash/box, @upstash/box-cli) and the Python package
(upstash-box) version and publish independently.
This repo uses Changesets for versioning and automated npm publishing via OIDC.
pnpm changeset
main. The Changeset workflow creates a "Version Packages" PR that bumps versions and updates changelogs.pnpm changeset to create a changeset, and push the branch to GitHub.0.2.0-canary-20260219131415-abc1234), publishes to npm under the canary tag, and creates a GitHub prerelease.The Python SDK versions independently of the npm packages (it does not track the
JS SDK version lockstep — see packages/python-sdk/RELEASE.md).
version in packages/python-sdk/pyproject.toml and __version__ in upstash_box/_version.py, and update the changelog.python-sdk-v<X.Y.Z> (matching the package version).pypi GitHub Environment.| Workflow | Trigger | Purpose |
|---|---|---|
ci.yml | PR + push to main | Build and test (Node 18/20/22) |
changeset.yml | Push to main | Version PR or tag + GitHub Release |
canary.yml | Manual dispatch | Snapshot version + GitHub prerelease |
npm-publish.yml | workflow_run (after changeset/canary) | Publish to npm with OIDC provenance |
python-sdk-ci.yml | PR + push to main (packages/python-sdk/**) | Lint, type-check, and test the Python SDK (3.9–3.14) |
python-sdk-publish.yml | Tag python-sdk-v* or manual dispatch | Publish upstash-box to PyPI via Trusted Publishing |
npm-publish.yml is the sole npm trusted publisher — configure it on npmjs.com for both packages. No npm tokens or PATs required.
MIT
959 followers · starred Mar 2026
252 followers · starred Jun 2026
TypeScript SDK and CLI for Upstash Box — sandboxed AI coding agents
See the codeTypeScript SDK, Python SDK, and CLI for Upstash Box — sandboxed AI coding agents with streaming, structured output, file I/O, git, and snapshots.
| Package | Description |
|---|---|
@upstash/box | TypeScript SDK — programmatic access to the Box API |
upstash-box | Python SDK — sync + async clients, published to PyPI |
@upstash/box-cli | CLI — REPL-first terminal interface wrapping the SDK |
The TypeScript SDK and CLI live in a pnpm workspace:
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Watch mode (both packages)
pnpm dev
The Python SDK is a standalone package with its own tooling (it is not part of the pnpm workspace):
cd packages/python-sdk
pip install -e ".[dev]"
pytest # run the test suite
python scripts/generate_sync.py # regenerate the sync client from the async source
See packages/python-sdk/README.md and its
CONTRIBUTING.md for details.
.
├── packages/
│ ├── sdk/ # @upstash/box — TypeScript SDK
│ │ ├── src/
│ │ └── examples/
│ ├── python-sdk/ # upstash-box — Python SDK (sync + async)
│ │ ├── upstash_box/
│ │ ├── examples/
│ │ └── tests/
│ └── cli/ # @upstash/box-cli — CLI + interactive REPL
│ └── src/
├── pnpm-workspace.yaml
├── tsconfig.base.json
└── package.json
The TypeScript SDK and CLI use Vitest. There are two test suites:
The Python SDK uses pytest (with pytest-asyncio +
respx) and follows the same unit/integration split — integration tests are
gated on UPSTASH_BOX_API_KEY. Run it from packages/python-sdk with pytest.
Create a .env file at the repository root:
UPSTASH_BOX_API_KEY=abx_...
AGENT_API_KEY=sk-ant-...
Integration tests are automatically skipped when these variables are not set.
# Run all tests (unit + integration if .env is present)
pnpm test
# Run only integration tests
pnpm test:integration
# Run tests for a single package
cd packages/sdk && pnpm test
cd packages/cli && pnpm test
The npm packages (@upstash/box, @upstash/box-cli) and the Python package
(upstash-box) version and publish independently.
This repo uses Changesets for versioning and automated npm publishing via OIDC.
pnpm changeset
main. The Changeset workflow creates a "Version Packages" PR that bumps versions and updates changelogs.pnpm changeset to create a changeset, and push the branch to GitHub.0.2.0-canary-20260219131415-abc1234), publishes to npm under the canary tag, and creates a GitHub prerelease.The Python SDK versions independently of the npm packages (it does not track the
JS SDK version lockstep — see packages/python-sdk/RELEASE.md).
version in packages/python-sdk/pyproject.toml and __version__ in upstash_box/_version.py, and update the changelog.python-sdk-v<X.Y.Z> (matching the package version).pypi GitHub Environment.| Workflow | Trigger | Purpose |
|---|---|---|
ci.yml | PR + push to main | Build and test (Node 18/20/22) |
changeset.yml | Push to main | Version PR or tag + GitHub Release |
canary.yml | Manual dispatch | Snapshot version + GitHub prerelease |
npm-publish.yml | workflow_run (after changeset/canary) | Publish to npm with OIDC provenance |
python-sdk-ci.yml | PR + push to main (packages/python-sdk/**) | Lint, type-check, and test the Python SDK (3.9–3.14) |
python-sdk-publish.yml | Tag python-sdk-v* or manual dispatch | Publish upstash-box to PyPI via Trusted Publishing |
npm-publish.yml is the sole npm trusted publisher — configure it on npmjs.com for both packages. No npm tokens or PATs required.
MIT
959 followers · starred Mar 2026
252 followers · starred Jun 2026