Skip to content

Commit

Permalink
Document available settings for poetry config (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
cauebs authored and sdispater committed Jun 25, 2018
1 parent 7d438b8 commit 29d4f07
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 19 deletions.
20 changes: 1 addition & 19 deletions docs/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,25 +258,7 @@ poetry config [options] [setting-key] [setting-value1] ... [setting-valueN]
````

`setting-key` is a configuration option name and `setting-value1` is a configuration value.

### Modifying repositories

In addition to modifying the config section,
the config command also supports making changes to the repositories section by using it the following way:

```bash
poetry config repositories.foo https://foo.bar/simple/
```

This will set the url for repository `foo` to `https://foo.bar/simple/`.

If you want to store your credentials for a specific repository, you can do so easily:

```bash
poetry config http-basic.foo username password
```

If you do not specify the password you will be prompted to write it.
See [Configuration](/configuration/) for all available settings.

### Options

Expand Down
33 changes: 33 additions & 0 deletions docs/docs/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Configuration

Poetry can be configured via the `config` command ([see more about its usage here](/cli/#config))
or directly in the `config.toml` file that will be automatically be created when you first run that command.
This file can typically be found in one of the following directories:

- macOS: `~/Library/Application Support/pypoetry`
- Windows: `C:\Users\<username>\AppData\Roaming\pypoetry`

For Unix, we follow the XDG spec and support `$XDG_CONFIG_HOME`.
That means, by default `~/.config/pypoetry`


## Available settings

### `settings.virtualenvs.create`: boolean
Create a new virtualenv if one doesn't already exist.
Defaults to `true`.

### `settings.virtualenvs.in-project`: boolean
Create the virtualenv inside the project's root directory.
Defaults to `false`.

### `settings.virtualenvs.path`: string
Directory where virtualenvs will be created.
Defaults to one of the following directories:

- macOS: `~/Library/Caches/pypoetry/virtualenvs`
- Windows: `C:\Users\<username>\AppData\Local\pypoetry\Cache/virtualenvs`
- Unix: `~/.cache/pypoetry/virtualenvs`

### `repository.<name>`: string
Set a new alternative repository. See [Repositories](/repositories/) for more information.
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pages:
- Basic Usage: basic-usage.md
- Libraries: libraries.md
- Commands: cli.md
- Configuration: configuration.md
- Repositories: repositories.md
- Versions: versions.md
- The pyproject.toml file: pyproject.md
Expand Down

0 comments on commit 29d4f07

Please sign in to comment.