Skip to main content

Command-Line Options

Complete reference for all command-line options available in Scully.
From version 2.0.3 onwards, all CLI parameters can be provided via an environment variable called SCULLY (all caps).

General Options

—help

Display help information:
npx scully --help

—version

Display the current Scully version:
npx scully version
Output:
Scully version : 2.1.0

Build Options

—watch, -w

Enable watch mode for automatic rebuilding:
npx scully --watch
Default: false
Type: Boolean
Monitors file changes and automatically rebuilds your static site.

—scanRoutes, —sr, —scan

Scan the application for unhandled routes:
npx scully --scanRoutes
Default: false
Type: Boolean
Forces Scully to re-scan your Angular application to discover new routes. Use this when you’ve added or changed routes.

—removeStaticDist, —RSD

Remove the static output folder before building:
npx scully --removeStaticDist
Default: false
Type: Boolean
Deletes the Scully output folder (default: ./dist/static) before starting a new build.

—prod, —Production

Use production mode:
npx scully --prod
Default: false
Type: Boolean
Builds Scully in production mode with optimizations enabled.

Server Options

—port, -p

Specify the server port:
npx scully serve --port=8080
Default: 1668
Type: Number
Sets the port for the Scully server.

—hostName, —host

Set the hostname:
npx scully serve --host=0.0.0.0
Default: localhost
Type: String
Configures the hostname for the Scully server.

—openNavigator, -o, —open

Open browser automatically:
npx scully serve --open
Default: false
Type: Boolean
Automatically opens the default browser when the server starts.

—ssl

Enable SSL/HTTPS:
npx scully serve --ssl
Default: false
Type: Boolean
Runs the server with a self-signed SSL certificate.

—sslCert, —ssl-cert

Path to SSL certificate:
npx scully serve --ssl --ssl-cert=./cert.pem
Default: undefined
Type: String
Provides a custom SSL certificate file.

—sslKey, —ssl-key

Path to SSL key:
npx scully serve --ssl --ssl-key=./key.pem
Default: undefined
Type: String
Provides a custom SSL private key file.

—handle404, —404

Configure 404 handling:
npx scully serve --handle404=index
Default: '' (empty)
Type: Choice: index, baseOnly, 404, none, or empty
Determines how the server handles 404 errors:
  • index - Serve /index.html for all 404s
  • baseOnly - Serve /index.html only for base route 404s
  • 404 - Serve /404.html if it exists
  • none - Return standard 404 errors
  • '' - Use default behavior

—serverTimeout, —st

Set server timeout:
npx scully --serverTimeout=30000
Default: 10000 (10 seconds)
Type: Number (milliseconds)
Time Scully will wait for the Angular server before timing out.

—proxyConfigFile, —proxy, —proxyConfig, —proxy-config

Load proxy configuration:
npx scully serve --proxy=proxy.conf.json
Default: undefined
Type: String
Path to a proxy configuration file for API proxying.

—tds

Start test data server:
npx scully serve --tds
Default: false
Type: Boolean
Starts the built-in test data server with mock API endpoints.

Route Filtering

—routeFilter, —rf, —route-filter

Filter handled routes:
npx scully --routeFilter="/blog/*,/docs/*"
Default: '' (empty)
Type: String (comma-separated wildcards)
Provides wildcard patterns to filter which routes to process.

—baseFilter, —bf

Filter unhandled routes:
npx scully --baseFilter="/api/*,/admin/*"
Default: '' (empty)
Type: String (comma-separated wildcards)
Provides wildcard patterns to filter unhandled routes during route discovery.

—path

Generate a specific path:
npx scully --path=/blog/my-post
Default: undefined
Type: String
Generates only the specified path.

Configuration

—project, —pr

Select a specific project:
npx scully --project=myapp
Default: '' (uses default project)
Type: String
Specifies which Angular project to process in a monorepo.

—configFile, —cf, —configFileName

Use a custom config file:
npx scully --configFile=scully.custom.config.ts
Default: '' (uses default)
Type: String
Loads a specific Scully configuration file. The --project flag takes precedence if both are specified.

—folder

Specify output folder:
npx scully --folder=./dist/my-static
Default: undefined
Type: String
Sets a custom output directory for static files.

—pluginFolder, —pf, —plugin-folder

Set plugin directory:
npx scully --pluginFolder=./custom-plugins
Default: ./scully
Type: String
Specifies where to look for custom plugins and configuration.

Debugging

—showBrowser, —sb

Show Puppeteer browser:
npx scully --showBrowser
Default: false
Type: Boolean
Displays the Chromium browser window during rendering for debugging.

—showGuessError, —sge

Show Guess parser errors:
npx scully --showGuessError
Default: false
Type: Boolean
Dumps Guess parser errors to the console for debugging routing issues.

Logging

—noLog, —nl

Reduce console output:
npx scully --noLog
Default: false
Type: Boolean
Logs only warnings and errors, suppressing informational messages.

—logSeverity, —ls, —log-severity

Set log severity level:
npx scully --logSeverity=error
Default: warning
Type: Choice: normal, warning, error, none
Controls the minimum severity of messages to log:
OptionBehavior
normalLog everything
warningLog warnings and errors only
errorLog errors only
noneNo logging, no log file created

—stats, —statistics

Generate build statistics:
npx scully --stats
Default: false
Type: Boolean
Writes detailed build statistics to scullyStats.json:
{
  "numberOfRoutes": 51,
  "generatingTime": 55.63,
  "routesPerSecond": 0.92,
  "findingRoutesAngular": 2.71838,
  "routeDiscovery": 0.00026,
  "renderingPages": 52.21755
}

Error Handling

—pluginsError, —pe

Exit on plugin errors:
npx scully --pluginsError=false
Default: true
Type: Boolean
Controls whether Scully exits when a plugin encounters an error. Set to false to continue rendering despite plugin errors.

—noPrompt, —np, —no-prompt

Disable user prompts:
npx scully --noPrompt
Default: false
Type: Boolean
Prevents interactive prompts, useful for CI/CD environments.

Advanced Options

—killServer, —ks, —kill-server

Kill existing server:
npx scully --killServer
Default: false
Type: Boolean
Automatically kills other running Scully servers without prompting.

—pjFirst, —pjf, —pj-first

Prioritize package.json:
npx scully --pjFirst
Default: false
Type: Boolean
Looks for package.json before angular.json when determining the project root. Useful in mixed monorepos.

—disableProjectFolderCheck

Skip project folder validation:
npx scully --disableProjectFolderCheck
Default: false
Type: Boolean
Disables the check that verifies Scully was launched from the project folder. Useful when using symlinked dependencies (pnpm, npm link).

Environment Variables

All CLI options can be set via environment variables using the SCULLY_ prefix:
# Bash/Linux/macOS
export SCULLY_watch=true
export SCULLY_showBrowser=true
export SCULLY_port=8080
npx scully
# Windows PowerShell
$env:SCULLY_watch="true"
$env:SCULLY_showBrowser="true"
$env:SCULLY_port="8080"
npx scully
# Windows CMD
set SCULLY_watch=true
set SCULLY_showBrowser=true
set SCULLY_port=8080
npx scully

Option Aliases Reference

Quick reference for all option aliases:
Long FormShort FormAliases
--watch-w
--port-p
--openNavigator-o--open
--showBrowser--sb
--showGuessError--sge
--project--pr
--configFile--cf--configFileName
--baseFilter--bf
--routeFilter--rf--route-filter
--removeStaticDist--RSD
--serverTimeout--st
--pjFirst--pjf--pj-first
--handle404--404
--pluginFolder--pf--plugin-folder
--pluginsError--pe
--noPrompt--np--no-prompt
--noLog--nl
--logSeverity--ls--log-severity
--stats--statistics
--killServer--ks--kill-server
--proxyConfigFile--proxy--proxyConfig, --proxy-config
--sslCert--ssl-cert
--sslKey--ssl-key
--scanRoutes--sr--scan
--prod--Production

Examples

Development Build

npx scully --watch --showBrowser --openNavigator

Production Build

npx scully --prod --removeStaticDist --stats

Selective Build

npx scully --routeFilter="/blog/*" --scanRoutes

Serve with SSL

npx scully serve --ssl --port=8443 --open

CI/CD Build

npx scully --prod --noPrompt --logSeverity=error --stats

Debug Build

npx scully --showBrowser --showGuessError --logSeverity=normal

Next Steps

Build docs developers (and LLMs) love