diff --git a/tldr/httpie b/tldr/httpie new file mode 100644 index 00000000..5a83512b --- /dev/null +++ b/tldr/httpie @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# httpie + +> A user friendly HTTP tool. +> More information: . + +- Send a GET request (default method with no request data): + +`http {{https://example.com}}` + +- Send a POST request (default method with request data): + +`http {{https://example.com}} {{hello=World}}` + +- Send a POST request with redirected input: + +`http {{https://example.com}} < {{file.json}}` + +- Send a PUT request with a given JSON body: + +`http PUT {{https://example.com/todos/7}} {{hello=world}}` + +- Send a DELETE request with a given request header: + +`http DELETE {{https://example.com/todos/7}} {{API-Key:foo}}` + +- Show the whole HTTP exchange (both request and response): + +`http -v {{https://example.com}}` + +- Download a file: + +`http --download {{https://example.com}}` + +- Follow redirects and show intermediary requests and responses: + +`http --follow --all {{https://example.com}}` diff --git a/tldr/https b/tldr/https new file mode 100644 index 00000000..3c090245 --- /dev/null +++ b/tldr/https @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# https + +> This command is an alias of `http`. + +- View documentation for the original command: + +`tldr http` diff --git a/tldr/linux/man b/tldr/linux/man index 66b0d767..db0afa0a 100644 --- a/tldr/linux/man +++ b/tldr/linux/man @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `man {{command}}` -- Open the man page for a command in a browser: +- Open the man page for a command in a browser (requires the `BROWSER` variable to be set): `man --html {{command}}` diff --git a/tldr/mv b/tldr/mv index 2c90520d..e3a494f5 100644 --- a/tldr/mv +++ b/tldr/mv @@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git `mv --verbose {{path/to/source}} {{path/to/target}}` -- Specify target directory (convenient in situations when the target directory has to be the first argument): +- Specify [t]arget directory so that you can use external tools to gather movable files: -`ls | {{parallel|xargs}} mv -t {{path/to/target_directory}}` +`{{find /var/log -type f -name '*.log' -print0}} | {{xargs -0}} mv --target-directory {{path/to/target_directory}}` diff --git a/tldr/uv b/tldr/uv new file mode 100644 index 00000000..10af4eca --- /dev/null +++ b/tldr/uv @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uv + +> A fast Python package and project manager. +> Some subcommands such as `uv tool` and `uv python` have their own usage documentation. +> More information: . + +- Create a new Python project in the current directory: + +`uv init` + +- Create a new Python project in a directory with the given name: + +`uv init {{project_name}}` + +- Add a new package to the project: + +`uv add {{package}}` + +- Remove a package from the project: + +`uv remove {{package}}` + +- Run a script in the project's environment: + +`uv run {{path/to/script.py}}` + +- Run a command in the project's environment: + +`uv run {{command}}` + +- Update a project's environment from `pyproject.toml`: + +`uv sync` + +- Create a lock file for the project's dependencies: + +`uv lock` diff --git a/tldr/uv-python b/tldr/uv-python new file mode 100644 index 00000000..2f7380b5 --- /dev/null +++ b/tldr/uv-python @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uv python + +> Manage Python versions and installations. +> More information: . + +- List all available Python installations: + +`uv python list` + +- Install a Python version: + +`uv python install {{version}}` + +- Uninstall a Python version: + +`uv python uninstall {{version}}` + +- Search for a Python installation: + +`uv python find {{version}}` + +- Pin the current project to use a specific Python version: + +`uv python pin {{version}}` + +- Show the `uv` Python installation directory: + +`uv python dir` diff --git a/tldr/uv-tool b/tldr/uv-tool new file mode 100644 index 00000000..37398c77 --- /dev/null +++ b/tldr/uv-tool @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uv tool + +> Install and run commands provided by Python packages. +> More information: . + +- Run a command from a package, without installing it: + +`uv tool run {{command}}` + +- Install a Python package system-wide: + +`uv tool install {{package}}` + +- Upgrade an installed Python package: + +`uv tool upgrade {{package}}` + +- Uninstall a Python package: + +`uv tool uninstall {{package}}` + +- List Python packages installed system-wide: + +`uv tool list`