doc: add stdin to guide (#6531)

<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->
Document in guide stdin usage

alllll the easter eggs can do as well, but declined to keep consistent
with the other examples 😆

Additions to https://github.com/astral-sh/uv/pull/6481

```bash
$ uv run - <<EOF               
import antigravity
EOF
```

## Test Plan

<!-- How was it tested? -->


https://github.com/astral-sh/uv/pull/6519#issuecomment-2307371063 new PR
This commit is contained in:
Billy Doyle 2024-08-23 12:18:49 -04:00 committed by GitHub
parent 4cdca06db2
commit 3f147eeb06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,14 @@ $ uv run example.py hello world!
hello world!
```
Additionally, your script can be read directly from stdin:
```bash
uv run - <<EOF
print("hello world!")
EOF
```
Note that if you use `uv run` in a _project_, i.e. a directory with a `pyproject.toml`, it will
install the current project before running the script. If your script does not depend on the
project, use the `--no-project` flag to skip this: