You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-30Lines changed: 33 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,18 +43,21 @@ The key features are:
43
43
44
44
## Installation
45
45
46
-
Create and activate a [virtual environment](https://typer.tiangolo.com/virtual-environments/) and then install**Typer**:
46
+
First, [install `uv`](https://docs.astral.sh/uv/getting-started/installation/), and then add**Typer** to your project:
47
47
48
48
<divclass="termy">
49
49
50
50
```console
51
-
$ pip install typer
51
+
$ uv add typer
52
52
---> 100%
53
-
Successfully installed typer rich shellingham
54
53
```
55
54
56
55
</div>
57
56
57
+
This installs both the Typer library and the `typer` command in the project's virtual environment. To use `typer` directly with shell completion, [activate the project environment and install completion](tutorial/install.md#activate-the-virtual-environment).
58
+
59
+
If you prefer to use `pip`, install `typer` inside a virtual environment. See the [installation guide](tutorial/install.md) for the alternative steps.
60
+
58
61
## Example
59
62
60
63
### The absolute minimum
@@ -78,29 +81,29 @@ Run your application with the `typer` command:
78
81
// Run your application
79
82
$ typer main.py run
80
83
81
-
// You get a nice error, you are missing NAME
82
-
Usage: typer [PATH_OR_MODULE] run [OPTIONS] NAME
84
+
// You get a nice error, you are missing 'name'
85
+
Usage: typer [PATH_OR_MODULE] run [OPTIONS] {name}
0 commit comments