CLI / Terminal Access
30-60 minAdvanced
Stencil CLI is the official tool for local theme development, allowing developers to design and test locally while syncing with the main BigCommerce store.
Prerequisites
- Node.js 18+ (verified with
node -v) - Stencil CLI installed (
npm install -g @bigcommerce/stencil-cli) - Store API Credentials (with 'Local Development' or 'Publish Theme' scope)
Advanced Recommended
Installing CLI
Setting up the environment.
1
Setup
1
Run npm install -g @bigcommerce/stencil-cli
2
Generate API Token in Admin (Advanced Settings > API Accounts)
3
Run stencil init in your theme folder
4
Run stencil start to launch localhost
Verification Checklist
- stencil start runs and site loads at localhost:3000
- stencil pull successfully updates local config.json
- stencil push successfully uploads theme to BigCommerce
Pro Tips
- Use `stencil start -e` to verify your theme with valid AMP HTML
- Use `stencil bundle` to zip the theme for manual upload
- Keep `secrets.stencil.json` out of version control (.gitignore)