Skip to content

Commit

Permalink
📝 Update docs references to typer-cli that is now fully integrated in…
Browse files Browse the repository at this point in the history
…to typer
  • Loading branch information
tiangolo committed Apr 5, 2024
1 parent 83d1db5 commit b24f516
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The key features are:
* **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
* **Start simple**: The simplest example adds only 2 lines of code to your app: **1 import, 1 function call**.
* **Grow large**: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments.
* **Run scripts**: Typer includes a `typer` command that you can use to run scripts, automatically converting them to CLIs, even if they don't use Typer internally.
* **Run scripts**: Typer includes a `typer` command/program that you can use to run scripts, automatically converting them to CLIs, even if they don't use Typer internally.

## FastAPI of CLIs

Expand Down Expand Up @@ -355,29 +355,26 @@ By default it also comes with extra standard dependencies:
* <a href="https://github.com/sarugaku/shellingham" class="external-link" target="_blank"><code>shellingham</code></a>: to automatically detect the current shell when installing completion.
* With `shellingham` you can just use `--install-completion`.
* Without `shellingham`, you have to pass the name of the shell to install completion for, e.g. `--install-completion bash`.
* `typer-cli`: adds the `typer` command to your shell:
* Quickly run scripts (that don't have to use Typer) with shell completion.
* Generate docs for your Typer applications.

### `typer-slim`

If you don't want the extra dependencies, install `typer-slim` instead.
If you don't want the extra standard optional dependencies, install `typer-slim` instead.

When you install with:

```bash
pip install typer
```

...it's the equivalent of:
...it includes the same code and dependencies as:

```bash
pip install "typer-slim[standard]"
```

The `standard` extra dependencies are `rich`, `shellingham`, `typer-cli`.
The `standard` extra dependencies are `rich` and `shellingham`.

**Note**: even if you don't install `typer-cli` you can still use it's functionality by calling `typer` as a module, e.g. `python -m typer`.
**Note**: The `typer` command is only included in the `typer` package.

## License

Expand Down
13 changes: 5 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The key features are:
* **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
* **Start simple**: The simplest example adds only 2 lines of code to your app: **1 import, 1 function call**.
* **Grow large**: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments.
* **Run scripts**: Typer includes a `typer` command that you can use to run scripts, automatically converting them to CLIs, even if they don't use Typer internally.
* **Run scripts**: Typer includes a `typer` command/program that you can use to run scripts, automatically converting them to CLIs, even if they don't use Typer internally.

## FastAPI of CLIs

Expand Down Expand Up @@ -355,29 +355,26 @@ By default it also comes with extra standard dependencies:
* <a href="https://github.com/sarugaku/shellingham" class="external-link" target="_blank"><code>shellingham</code></a>: to automatically detect the current shell when installing completion.
* With `shellingham` you can just use `--install-completion`.
* Without `shellingham`, you have to pass the name of the shell to install completion for, e.g. `--install-completion bash`.
* `typer-cli`: adds the `typer` command to your shell:
* Quickly run scripts (that don't have to use Typer) with shell completion.
* Generate docs for your Typer applications.

### `typer-slim`

If you don't want the extra dependencies, install `typer-slim` instead.
If you don't want the extra standard optional dependencies, install `typer-slim` instead.

When you install with:

```bash
pip install typer
```

...it's the equivalent of:
...it includes the same code and dependencies as:

```bash
pip install "typer-slim[standard]"
```

The `standard` extra dependencies are `rich`, `shellingham`, `typer-cli`.
The `standard` extra dependencies are `rich` and `shellingham`.

**Note**: even if you don't install `typer-cli` you can still use it's functionality by calling `typer` as a module, e.g. `python -m typer`.
**Note**: The `typer` command is only included in the `typer` package.

## License

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ The first step is to install **Typer**:
```console
$ pip install typer
---> 100%
Successfully installed typer click shellingham rich typer-cli
Successfully installed typer click shellingham rich
```

</div>

By default, `typer` comes with `rich`, `shellingham`, and `typer-cli`.
By default, `typer` comes with `rich` and `shellingham`.

!!! note
If you are an advanced user and want to opt out of these default extra dependencies, you can instead install `typer-slim`.
Expand All @@ -82,7 +82,7 @@ By default, `typer` comes with `rich`, `shellingham`, and `typer-cli`.
pip install typer
```

...is the equivalent of:
...includes the same optional dependencies as:

```bash
pip install "typer-slim[standard]"
Expand Down

0 comments on commit b24f516

Please sign in to comment.