From b4c3b9f9ca977ace106f4c5ff8a4efd7ef11727f Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sat, 21 Jun 2025 00:20:29 +0000 Subject: [PATCH] Update cheatsheets --- tldr/linux/ip | 4 ++-- tldr/uv-build | 41 +++++++++++++++++++++++++++++++++++++++++ tldr/uv-cache | 37 +++++++++++++++++++++++++++++++++++++ tldr/uv-export | 41 +++++++++++++++++++++++++++++++++++++++++ tldr/uv-publish | 33 +++++++++++++++++++++++++++++++++ tldr/uv-self | 37 +++++++++++++++++++++++++++++++++++++ 6 files changed, 191 insertions(+), 2 deletions(-) create mode 100644 tldr/uv-build create mode 100644 tldr/uv-cache create mode 100644 tldr/uv-export create mode 100644 tldr/uv-publish create mode 100644 tldr/uv-self diff --git a/tldr/linux/ip b/tldr/linux/ip index bf63bef9..9ac02bb3 100644 --- a/tldr/linux/ip +++ b/tldr/linux/ip @@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git - List interfaces with brief network layer info: -`ip {{[-br a|-brief address]}}` +`ip {{[-br|-brief]}} {{[a|address]}}` - List interfaces with brief link layer info: -`ip {{[-br l|-brief link]}}` +`ip {{[-br|-brief]}} {{[l|link]}}` - Display the routing table: diff --git a/tldr/uv-build b/tldr/uv-build new file mode 100644 index 00000000..b0279b14 --- /dev/null +++ b/tldr/uv-build @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uv build + +> Build Python packages into source distributions and wheels. +> More information: . + +- Build a package in the current directory: + +`uv build` + +- Build a package from a specific directory: + +`uv build {{path/to/directory}}` + +- Build only a wheel (skip source distribution): + +`uv build --wheel` + +- Build only a source distribution (skip wheel): + +`uv build --sdist` + +- Build and output to a specific directory: + +`uv build {{[-o|--out-dir]}} {{path/to/output}}` + +- Build a specific package in a workspace: + +`uv build --package {{package_name}}` + +- Build all packages in the workspace: + +`uv build {{[--all|--all-packages]}}` + +- Build with a specific Python interpreter: + +`uv build {{[-p|--python]}} {{python3.11}}` diff --git a/tldr/uv-cache b/tldr/uv-cache new file mode 100644 index 00000000..39d03d2f --- /dev/null +++ b/tldr/uv-cache @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uv cache + +> Manage `uv`'s global cache directory. +> More information: . + +- Show the cache directory path: + +`uv cache dir` + +- Clean the entire cache (removes all cached packages and environments): + +`uv cache clean` + +- Clean the cache for specific packages: + +`uv cache clean {{package1 package2 ...}}` + +- Prune all unreachable objects from the cache: + +`uv cache prune` + +- Prune cache optimized for CI environments like GitHub Actions: + +`uv cache prune --ci` + +- Use a specific cache directory: + +`uv cache clean --cache-dir {{path/to/cache}}` + +- Clean cache with verbose output: + +`uv cache clean {{[-v|--verbose]}}` diff --git a/tldr/uv-export b/tldr/uv-export new file mode 100644 index 00000000..8fa7175c --- /dev/null +++ b/tldr/uv-export @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uv export + +> Export the project's lockfile to an alternate format. +> More information: . + +- Export dependencies to a `requirements.txt` file: + +`uv export --format requirements-txt {{[-o|--output-file]}} {{requirements.txt}}` + +- Export dependencies to `pylock.toml` format: + +`uv export --format pylock.toml` + +- Export only production dependencies (exclude dev dependencies): + +`uv export --no-dev` + +- Export including a specific optional dependency group: + +`uv export --extra {{group_name}}` + +- Export including all optional dependencies: + +`uv export --all-extras` + +- Export including a specific dependency group: + +`uv export --group {{group_name}}` + +- Export without hashes: + +`uv export --no-hashes` + +- Export dependencies for a specific package in the workspace: + +`uv export --package {{package_name}}` diff --git a/tldr/uv-publish b/tldr/uv-publish new file mode 100644 index 00000000..51bd67df --- /dev/null +++ b/tldr/uv-publish @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uv publish + +> Upload distributions to an index. +> More information: . + +- Publish packages from `dist/` directory (default behavior): + +`uv publish` + +- Publish to a specific repository URL: + +`uv publish --publish-url {{https://upload.pypi.org/legacy/}}` + +- Publish using a specific username and password: + +`uv publish {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}}` + +- Publish using an API token: + +`uv publish {{[-t|--token]}} {{your_api_token}}` + +- Publish specific distribution files: + +`uv publish {{path/to/dist/*.whl}} {{path/to/dist/*.tar.gz}}` + +- Publish to TestPyPI for testing: + +`uv publish --publish-url https://test.pypi.org/legacy/` diff --git a/tldr/uv-self b/tldr/uv-self new file mode 100644 index 00000000..e9f5b247 --- /dev/null +++ b/tldr/uv-self @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uv self + +> Manage the `uv` executable itself. +> More information: . + +- Update `uv` to the latest version: + +`uv self update` + +- Update `uv` to a specific version: + +`uv self update {{0.4.0}}` + +- Check for available `uv` updates without installing: + +`uv self update --dry-run` + +- Update `uv` with verbose output: + +`uv self update {{[-v|--verbose]}}` + +- Display the current `uv` version: + +`uv self version` + +- Display only the version number: + +`uv self version --short` + +- Display version information in JSON format: + +`uv self version --output-format json`