Skip to main content
Use the CLI when you want a generated project instead of setting up the dependency wiring by hand.

Current availability

The CLI source lives in this repository under packages/create-roll-codes. Build it locally before using it.

Primary command

Example

Useful flags

Generated starter files

  • src/DiceDuelConsumer.sol
  • test/DiceDuelConsumer.t.sol
  • script/DeployDiceDuelConsumer.s.sol
  • foundry.toml
  • remappings.txt
The generated starter uses the public IVRFSystem surface:
  • requestRandomNumberWithTraceId(uint256)
  • requestFee()
  • randomNumberCallback(uint256,uint256)

When to use the CLI

Choose the CLI when you want:
  • the fastest path to a working sample
  • a known-good test and deploy scaffold
  • a reproducible non-interactive setup flow
If you already have an existing Foundry project, use Install and setup instead.

Quickstart

Follow the end-to-end starter flow after scaffolding.

Install and setup

Wire an existing project manually if you do not want a generated starter.

Troubleshooting

Debug install failures, remapping issues, and callback problems.
Last modified on March 9, 2026