Bower can be configured using JSON in a .bowerrc file.
Placement & Order
The config is obtained by merging multiple configurations by this order of importance:
- CLI args via –config.
- Environment variables
.bowerrclocated in the current working directory
.bowerrcfiles upwards the directory tree
.bowerrcfile located in user’s home folder (
.bowerrcfile located in the global folder (
Example of valid environment variables:
bower_endpoint_parseris evaluated as
bower_storage__cacheis evaluated as
Bower can collect anonymous usage statistics. This allows the community to improve Bower and publicly display insights into CLI usage and packages at bower.io/stats.
Data is tracked using Google Analytics and instrumented via Insight. It is made available to all Bower team members. Tracking is opt-in upon initial usage. If you’d prefer to disable analytics altogether, set
"analytics": false in your
.bowerrc file. Details on exactly what’s tracked is available here.
Current working directory - the directory from which bower should run. All relative paths will be calculated according to this setting.
The path in which installed components should be saved. If not specified this
Object or String
The registry config. Can be an object or a string. If a string is used, all the property values bellow will have its value. Defaults to the bower registry URL.
If your organization wishes to maintain a private registry, you may change the values below.
Array or String
An array of URLs pointing to read-only Bower registries. A string means only one. When looking into the registry for an endpoint, Bower will query these registries by the specified order.
The URL to use when registering packages.
The URL to use when publish packages.
Define a custom template for shorthand package names.
shorthand-resolver key provides support for defining a custom template
which Bower uses when constructing a URL for a given shorthand. For example, if
a shorthand of
twitter/flight#v1.0.0 is specified in the
package’s manifest dependencies, the following data can be referenced from
owner: "twitter" package: "flight" shorthand: "twitter/flight"
"shorthand-resolver": "git://example.com//components/.git" "shorthand-resolver": "git://example.com/.git"
The proxy to use for http requests.
The proxy to use for https requests.
Sets the User-Agent for each request made.
node/<process.version> <process.platform> <process.arch>
The timeout to be used when making requests in milliseconds, defaults to
Whether or not to do SSL key validation when making requests via https.
Object or String
The CA certificates to be used, defaults to null. This is similar to the registry key, specifying each CA to use for each registry endpoint.
The Certificate Authority signing certificate that is trusted for SSL
connections to the registry.
Set to null to only allow “known” registrars, or to a specific CA cert to trust only that specific signing authority.
Enable or disable use of colors in the CLI output. Defaults to true.
Where to store persistent data, such as cache, needed by bower. Defaults to
paths that suite the OS/platform. Valid keys are
Where to store temporary files and folders. Defaults to the system temporary directory suffixed with /bower.
Makes bower interactive, prompting whenever necessary. Defaults to