<commit_before>npm-config(1) -- Manage the npm configuration file
==================================================

## SYNOPSIS

    npm config set <key> <value> [--global]
    npm config get <key>
    npm config delete <key>
    npm config list
    npm config edit
    npm get <key>
    npm set <key> <value> [--global]

## DESCRIPTION

npm gets its configuration values from 6 sources, in this priority:

### Command Line Flags

Putting `--foo bar` on the command line sets the
`foo` configuration parameter to `"bar"`.  A `--` argument tells the cli
parser to stop reading flags.  A `--flag` parameter that is at the *end* of
the command will be given the value of `true`.

### Environment Variables

Any environment variables that start with `npm_config_` will be interpreted
as a configuration parameter.  For example, putting `npm_config_foo=bar` in
your environment will set the `foo` configuration parameter to `bar`.  Any
environment configurations that are not given a value will be given the value
of `true`.  Config values are case-insensitive, so `NPM_CONFIG_FOO=bar` will
work the same.

### Per-user config file

`$HOME/.npmrc` (or the `userconfig` param, if set above)

This file is an ini-file formatted list of `key = value` parameters.

### Global config file

`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above):
This file is an ini-file formatted list of `key = value` parameters

### Built-in config file

`path/to/npm/itself/npmrc`

This is an unchangeable "builtin"
configuration file that npm keeps consistent across updates.  Set
fields in here using the `./configure` script that comes with npm.
This is primarily for distribution maintainers to override default
configs in a standard and consistent manner.

### Default Configs

A set of configuration parameters that are internal to npm, and are
defaults if nothing else is specified.

## Sub-commands

Config supports the following sub-commands:

### set

    npm config set key value

Sets the config key to the value.

If value is omitted, then it sets it to "true".

### get

    npm config get key

Echo the config value to stdout.

### list

    npm config list

Show all the config settings.

### delete

    npm config delete key

Deletes the key from all configuration files.

### edit

    npm config edit

Opens the config file in an editor.  Use the `--global` flag to edit the
global config.

## Shorthands and Other CLI Niceties

The following shorthands are parsed on the command-line:

* `-v`: `--version`
* `-h`, `-?`, `--help`, `-H`: `--usage`
* `-s`, `--silent`: `--loglevel silent`
* `-q`, `--quiet`: `--loglevel warn`
* `-d`: `--loglevel info`
* `-dd`, `--verbose`: `--loglevel verbose`
* `-ddd`: `--loglevel silly`
* `-g`: `--global`
* `-l`: `--long`
* `-m`: `--message`
* `-p`, `--porcelain`: `--parseable`
* `-reg`: `--registry`
* `-v`: `--version`
* `-f`: `--force`
* `-desc`: `--description`
* `-S`: `--save`
* `-D`: `--save-dev`
* `-O`: `--save-optional`
* `-B`: `--save-bundle`
* `-y`: `--yes`
* `-n`: `--yes false`
* `ll` and `la` commands: `ls --long`

If the specified configuration param resolves unambiguously to a known
configuration parameter, then it is expanded to that configuration
parameter.  For example:

    npm ls --par
    # same as:
    npm ls --parseable

If multiple single-character shorthands are strung together, and the
resulting combination is unambiguously not some other configuration
param, then it is expanded to its various component pieces.  For
example:

    npm ls -gpld
    # same as:
    npm ls --global --parseable --long --loglevel info

## Per-Package Config Settings

When running scripts (see `npm-scripts(1)`)
the package.json "config" keys are overwritten in the environment if
there is a config param of `<name>[@<version>]:<key>`.  For example, if
the package.json has this:

    { "name" : "foo"
    , "config" : { "port" : "8080" }
    , "scripts" : { "start" : "node server.js" } }

and the server.js is this:

    http.createServer(...).listen(process.env.npm_package_config_port)

then the user could change the behavior by doing:

    npm config set foo:port 80

## Config Settings

### always-auth

* Default: false
* Type: Boolean

Force npm to always require authentication when accessing the registry,
even for `GET` requests.

### browser

* Default: OS X: `"open"`, others: `"google-chrome"`
* Type: String

The browser that is called by the `npm docs` command to open websites.

### ca

* Default: The npm CA certificate
* Type: String or null

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<commit_msg>document bin-links config<commit_after>npm-config(1) -- Manage the npm configuration file
==================================================

## SYNOPSIS

    npm config set <key> <value> [--global]
    npm config get <key>
    npm config delete <key>
    npm config list
    npm config edit
    npm get <key>
    npm set <key> <value> [--global]

## DESCRIPTION

npm gets its configuration values from 6 sources, in this priority:

### Command Line Flags

Putting `--foo bar` on the command line sets the
`foo` configuration parameter to `"bar"`.  A `--` argument tells the cli
parser to stop reading flags.  A `--flag` parameter that is at the *end* of
the command will be given the value of `true`.

### Environment Variables

Any environment variables that start with `npm_config_` will be interpreted
as a configuration parameter.  For example, putting `npm_config_foo=bar` in
your environment will set the `foo` configuration parameter to `bar`.  Any
environment configurations that are not given a value will be given the value
of `true`.  Config values are case-insensitive, so `NPM_CONFIG_FOO=bar` will
work the same.

### Per-user config file

`$HOME/.npmrc` (or the `userconfig` param, if set above)

This file is an ini-file formatted list of `key = value` parameters.

### Global config file

`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above):
This file is an ini-file formatted list of `key = value` parameters

### Built-in config file

`path/to/npm/itself/npmrc`

This is an unchangeable "builtin"
configuration file that npm keeps consistent across updates.  Set
fields in here using the `./configure` script that comes with npm.
This is primarily for distribution maintainers to override default
configs in a standard and consistent manner.

### Default Configs

A set of configuration parameters that are internal to npm, and are
defaults if nothing else is specified.

## Sub-commands

Config supports the following sub-commands:

### set

    npm config set key value

Sets the config key to the value.

If value is omitted, then it sets it to "true".

### get

    npm config get key

Echo the config value to stdout.

### list

    npm config list

Show all the config settings.

### delete

    npm config delete key

Deletes the key from all configuration files.

### edit

    npm config edit

Opens the config file in an editor.  Use the `--global` flag to edit the
global config.

## Shorthands and Other CLI Niceties

The following shorthands are parsed on the command-line:

* `-v`: `--version`
* `-h`, `-?`, `--help`, `-H`: `--usage`
* `-s`, `--silent`: `--loglevel silent`
* `-q`, `--quiet`: `--loglevel warn`
* `-d`: `--loglevel info`
* `-dd`, `--verbose`: `--loglevel verbose`
* `-ddd`: `--loglevel silly`
* `-g`: `--global`
* `-l`: `--long`
* `-m`: `--message`
* `-p`, `--porcelain`: `--parseable`
* `-reg`: `--registry`
* `-v`: `--version`
* `-f`: `--force`
* `-desc`: `--description`
* `-S`: `--save`
* `-D`: `--save-dev`
* `-O`: `--save-optional`
* `-B`: `--save-bundle`
* `-y`: `--yes`
* `-n`: `--yes false`
* `ll` and `la` commands: `ls --long`

If the specified configuration param resolves unambiguously to a known
configuration parameter, then it is expanded to that configuration
parameter.  For example:

    npm ls --par
    # same as:
    npm ls --parseable

If multiple single-character shorthands are strung together, and the
resulting combination is unambiguously not some other configuration
param, then it is expanded to its various component pieces.  For
example:

    npm ls -gpld
    # same as:
    npm ls --global --parseable --long --loglevel info

## Per-Package Config Settings

When running scripts (see `npm-scripts(1)`)
the package.json "config" keys are overwritten in the environment if
there is a config param of `<name>[@<version>]:<key>`.  For example, if
the package.json has this:

    { "name" : "foo"
    , "config" : { "port" : "8080" }
    , "scripts" : { "start" : "node server.js" } }

and the server.js is this:

    http.createServer(...).listen(process.env.npm_package_config_port)

then the user could change the behavior by doing:

    npm config set foo:port 80

## Config Settings

### always-auth

* Default: false
* Type: Boolean

Force npm to always require authentication when accessing the registry,
even for `GET` requests.

### bin-links

* Default: `true`
* Type: Boolean

Tells npm to create symlinks (or `.cmd` shims on Windows) for package
executables.

Set to false to have it not do this.  This can be used to work around
the fact that some file systems don't support symlinks, even on
ostensibly Unix systems.

### browser

* Default: OS X: `"open"`, others: `"google-chrome"`
* Type: String

The browser that is called by the `npm docs` command to open websites.

### ca

* Default: The npm CA certificate
* Type: String or null

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
{'fraction_non_alphanumeric': 0.12993827160493826, 'fraction_numerical': 0.001851851851851852, 'mean_word_length': 3.604926575082899, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3170633', 'n_tokens_mistral': 3093, 'n_tokens_neox': 2897, 'n_words': 1299}