Netlify CLI build command
build
Build on your local machine
Usage
netlify build
Flags
context
(string) - Specify a deploy context for environment variables read during the build (”production”, ”deploy-preview”, ”branch-deploy”, ”dev”) orbranch:your-branch
whereyour-branch
is the name of a branch (default: value of CONTEXT or ”production”)dry
(boolean) - Dry run: show instructions without running themfilter
(string) - For monorepos, specify the name of the application to run the command indebug
(boolean) - Print debugging informationauth
(string) - Netlify auth token - can be used to run this command without logging inoffline
(boolean) - Disables any features that require network access
Examples
netlify buildnetlify build --context deploy-preview # Build with env var values from deploy-preview contextnetlify build --context branch:feat/make-it-pop # Build with env var values from the feat/make-it-pop branch context or branch-deploy context