Metadata-Version: 2.4
Name: api-sandbox
Version: 0.1.0
Summary: CLI for API sandboxes. Test your APIs in a sandbox env.
Author-email: Subbu Athikunte <subramani.a@digitalapi.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://www.digitalapi.ai/
Project-URL: Documentation, https://www.digitalapi.ai/
Keywords: api,sandbox,cli,openapi,simulation
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: cryptography>=46.0
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.8
Requires-Dist: psycopg[binary]>=3.3
Requires-Dist: pyyaml>=6.0
Requires-Dist: typer>=0.12
Requires-Dist: uvicorn>=0.30
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: mypy>=1.11; extra == "dev"
Requires-Dist: pytest>=8.3; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: twine>=6.1; extra == "dev"
Provides-Extra: release
Requires-Dist: build>=1.2; extra == "release"
Requires-Dist: twine>=6.1; extra == "release"

# `sdb`

`sdb` is the CLI for the API sandbox platform from DigitalApi.ai.

It is built for three core jobs:

- import and diff OpenAPI specs
- create sandbox releases and promote aliases
- drive auth, simulation, traces, and generated runtime bundles from one CLI

The public package name is `api-sandbox`.  
The installed binary name is always `sdb`.

## Install

Recommended:

```bash
pipx install api-sandbox
```

Upgrade:

```bash
pipx upgrade api-sandbox
```

If you prefer a virtualenv:

```bash
python -m pip install api-sandbox
```

## Quickstart

Local bootstrap:

```bash
sdb config bootstrap local
sdb doctor --json
```

Managed-beta Cloud Run bootstrap:

```bash
sdb config bootstrap cloud-run \
  --project api-sandbox-20260416-1715 \
  --base-url https://api.sandbox.digitalapi.ai \
  --profile-name prod \
  --activate
```

Common flows:

```bash
sdb spec import ./openapi.yaml
sdb sandbox create bank-sim --api "Payments API" --mode simulation
sdb sandbox list --name bank-sim
sdb sandbox request bank-sim GET /payments --alias latest
sdb trace tail bank-sim --limit 10
```

## What Works Today

- spec import, validate, diff, list, get
- sandbox create, list, get, clone, archive, reset, export-manifest
- release create, list, get, promote
- auth profiles, apps, client credentials, discovery, scopes, login
- simulation packs, scenarios, snapshots, timers, webhooks, bundles, deploys
- traces: list, get, replay, tail
- runtime requests through `sdb sandbox request`
- local profiles and private Cloud Run operator profiles
- `--dry-run`, `--yes`, `--watch`, and redacted `--trace`

## Docs

Start here:

- [Public CLI install runbook](docs/runbooks/public-cli-install.md)
- [CLI contract](docs/product-specs/cli-contract-sdb.md)
- [Managed beta production runbook](docs/runbooks/prod-managed-beta.md)
- [Cloud Run operator runbook](docs/runbooks/cloud-run-control-plane.md)
- [Troubleshooting](docs/runbooks/troubleshooting.md)

## Release

Public release path:

- build wheel + sdist
- verify artifacts in CI
- publish to PyPI from a signed GitHub Actions tag workflow

Release checklist:

- [docs/RELEASING.md](docs/RELEASING.md)

## Repository

This repository also contains the control plane, runtime, runbooks, execution plans, and product contracts that back the CLI.

For repository contributors:

```bash
python -m pip install -e ".[dev]"
make check
pytest -q
```
