OP Stack CLI is a command-line utility for easily spinning up an OP Stack–based rollup. This tool wraps the manual steps normally required to deploy an Optimism-based chain, handle address generation, configure environment variables, build repositories, and run the associated services (execution client, consensus client, batcher, proposer, etc.).
- Initialize directories, clone repos, and check dependencies
opstack-cli init
- Build the OP Stack binary
opstack-cli build
- Generate addresses and private keys
opstack-cli addresses
- Deploy L1 contracts
opstack-cli deploy-l1
- Create L2 configuration (genesis.json, rollup.json, jwt.txt)
opstack-cli config-l2
- Start all services
(You can also start them one by one, e.g.
opstack-cli start geth
)
opstack-cli start all