mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-01 10:54:18 +00:00
Update cheatsheets
This commit is contained in:
2
tldr/exa
2
tldr/exa
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# exa
|
# exa
|
||||||
|
|
||||||
> A modern replacement for `ls` (List directory contents).
|
> A modern replacement for `ls` (List directory contents).
|
||||||
> More information: <https://the.exa.website>.
|
> More information: <https://github.com/ogham/exa>.
|
||||||
|
|
||||||
- List files one per line:
|
- List files one per line:
|
||||||
|
|
||||||
|
|||||||
8
tldr/uv
8
tldr/uv
@@ -13,15 +13,15 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`uv init`
|
`uv init`
|
||||||
|
|
||||||
- Create a new Python project in a directory with the given name:
|
- Create a new Python project at the specified path:
|
||||||
|
|
||||||
`uv init {{project_name}}`
|
`uv init {{path/to/directory}}`
|
||||||
|
|
||||||
- Add a new package to the project:
|
- Add a new dependency to the project:
|
||||||
|
|
||||||
`uv add {{package}}`
|
`uv add {{package}}`
|
||||||
|
|
||||||
- Remove a package from the project:
|
- Remove a dependency from the project:
|
||||||
|
|
||||||
`uv remove {{package}}`
|
`uv remove {{package}}`
|
||||||
|
|
||||||
|
|||||||
42
tldr/uv-add
Normal file
42
tldr/uv-add
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# uv add
|
||||||
|
|
||||||
|
> Add package dependencies to the `pyproject.toml` file.
|
||||||
|
> Packages are specified according to <https://peps.python.org/pep-0508/>.
|
||||||
|
> More information: <https://docs.astral.sh/uv/reference/cli/#uv-add>.
|
||||||
|
|
||||||
|
- Add the latest version of a package:
|
||||||
|
|
||||||
|
`uv add {{package}}`
|
||||||
|
|
||||||
|
- Add multiple packages:
|
||||||
|
|
||||||
|
`uv add {{package1 package2 ...}}`
|
||||||
|
|
||||||
|
- Add a package with a version requirement:
|
||||||
|
|
||||||
|
`uv add {{package>=1.2.3}}`
|
||||||
|
|
||||||
|
- Add packages to an optional dependency group, which will be included when published:
|
||||||
|
|
||||||
|
`uv add --optional {{optional}} {{package1 package2 ...}}`
|
||||||
|
|
||||||
|
- Add packages to a local group, which will not be included when published:
|
||||||
|
|
||||||
|
`uv add --group {{group}} {{package1 package2 ...}}`
|
||||||
|
|
||||||
|
- Add packages to the dev group, shorthand for `--group dev`:
|
||||||
|
|
||||||
|
`uv add --dev {{package1 package2 ...}}`
|
||||||
|
|
||||||
|
- Add package as editable:
|
||||||
|
|
||||||
|
`uv add --editable {{path/to/package/}}`
|
||||||
|
|
||||||
|
- Enable an extra when installing package, may be provided multiple times:
|
||||||
|
|
||||||
|
`uv add {{package}} --extra {{extra_feature}}`
|
||||||
33
tldr/uv-tree
Normal file
33
tldr/uv-tree
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# uv tree
|
||||||
|
|
||||||
|
> Display project dependencies in a tree format.
|
||||||
|
> More information: <https://docs.astral.sh/uv/reference/cli/#uv-tree>.
|
||||||
|
|
||||||
|
- Show dependency tree for current environment:
|
||||||
|
|
||||||
|
`uv tree`
|
||||||
|
|
||||||
|
- Show dependency tree for all environments:
|
||||||
|
|
||||||
|
`uv tree --universal`
|
||||||
|
|
||||||
|
- Show dependency tree up to a certain depth:
|
||||||
|
|
||||||
|
`uv tree {{-d|--depth}} {{n}}`
|
||||||
|
|
||||||
|
- Show the latest available version for all outdated packages:
|
||||||
|
|
||||||
|
`uv tree --outdated`
|
||||||
|
|
||||||
|
- Exclude dependencies from the dev group:
|
||||||
|
|
||||||
|
`uv tree --no-dev`
|
||||||
|
|
||||||
|
- Show the inverted tree, so children are dependents instead of dependencies:
|
||||||
|
|
||||||
|
`uv tree --invert`
|
||||||
Reference in New Issue
Block a user