# Installation

You can install `cfig` in multiple ways!

Note

The CLI tools are not included by default in the package, but are distributed as an extra.

This page refers to the installation with the `[cli]` extra, but you may omit to install it if you do not intend to provide the CLI to users.

Warning

Never install packages outside `venv`s, unless you know very well what you’re doing!

## From PyPI

`cfig` is distributed through the Python Package Index, and you can install it with your favourite dependency manager!

### Using pip

You can install `cfig` through `pip`:

    $ pip install cfig[cli]

Note

If you’re working on a project, remember to add it to your `requirements.txt` file!

### Using Poetry

You can install `cfig` through `poetry`:

    $ poetry add cfig[cli]

## From source

If you have the source of `cfig`, you can install it from its own folder!

### Using PEP 518

Introduced with PEP 518, `pip` supports automatic build and installation:

    $ cd cfig
    $ pip install .[cli]

## For development

If you want to contribute to `cfig`, you can use `poetry` to install the project in “development” mode in an isolated environment:

    $ cd cfig
    $ poetry install -E cli

Hint

Setting `virtualenvs.in-project` to `True` is recommended!

    $ poetry config virtualenvs.in-project true