@mysten-incubation/create-deepbook-sandbox
v0.1.1
Published
Scaffold a DeepBook V3 sandbox workspace
Readme
@mysten-incubation/create-deepbook-sandbox
A one-command scaffolder for the DeepBook V3 sandbox: a local development environment with Sui localnet, deployed DeepBook contracts, a market maker, an oracle service, an indexer, and a web dashboard — everything you need to build and test against DeepBook without touching mainnet or testnet.
What this package does
When you run pnpm create @mysten-incubation/deepbook-sandbox, it:
- Verifies that
docker,sui,pnpm, andgitare installed on your machine - Looks up the latest
v*release tag of thedeepbook-sandboxrepository - Runs
git clone --recurse-submodules --branch <tag>into your target directory - Prints the next commands to run
You get a pinned, reproducible snapshot of the upstream repo and its external/deepbook submodule, ready to pnpm install.
Why this scaffolder uses a recursive clone
The sandbox includes sandbox/packages/example_contract — a Move package where you can drop your own contracts and have them publish alongside DeepBook on a fresh localnet, with local Move dependencies wired up against the latest DeepBook source:
[dependencies]
token = { local = "../../.external-packages/token" }
deepbook = { local = "../../.external-packages/deepbook" }
deepbook_margin = { local = "../../.external-packages/deepbook_margin" }For example_contract (and any Move package you add alongside it) to compile against the latest DeepBook interfaces, the Move source for deepbook, token, and deepbook_margin has to physically exist on disk at the paths declared by local = "../path". The sandbox vendors that source via the external/deepbook git submodule so it always tracks the latest DeepBook V3 release.
That's why this CLI clones with --recurse-submodules: a recursive clone is the simplest way to land the sandbox and the Move source it builds against in one step, so you can start writing and publishing your own Move packages alongside DeepBook immediately.
So this package exists for two reasons:
- Discoverability —
pnpm create @mysten-incubation/deepbook-sandboxis easier to find and remember than a longgit clonecommand - Preflight + reproducibility — it checks your toolchain up front and pins you to a tagged release instead of
main
The manual equivalent is:
git clone --recurse-submodules --branch <latest-tag> \
https://github.com/MystenLabs/deepbook-sandbox.gitQuick Start
pnpm create @mysten-incubation/deepbook-sandboxOr with a custom directory name:
pnpm create @mysten-incubation/deepbook-sandbox my-projectWhat you get
The scaffolded workspace includes:
- Sui localnet with DeepBook V3 contracts deployed
- Market maker providing liquidity on DEEP/SUI and SUI/USDC pools
- Oracle service updating Pyth price feeds every 10 seconds
- DeepBook indexer + API server for querying on-chain data
- Web dashboard for monitoring and interacting with the sandbox
- SDK examples demonstrating common DeepBook integrations
Prerequisites
The CLI checks for these before scaffolding:
Usage
After scaffolding, install dependencies and start the sandbox:
cd <project>/sandbox
pnpm install
pnpm deploy-allThis starts localnet, deploys contracts, and launches all services. See the project README for full documentation.
License
Apache-2.0
