Skip to content

Instantly share code, notes, and snippets.

@thomascamminady
Created April 28, 2025 09:34
Show Gist options
  • Save thomascamminady/4268b64ccc8a4bd949181a00318d4004 to your computer and use it in GitHub Desktop.
Save thomascamminady/4268b64ccc8a4bd949181a00318d4004 to your computer and use it in GitHub Desktop.
uv script template
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "fire",
# ]
# ///
# pyright: reportMissingModuleSource=false
# pyright: reportMissingImports=false
import fire
def main(name: str) -> None:
"""Greet the user.
Run this script with the command:
`uv run script.py --name="You"`
Or:
`chmod +x script.py`
`./script.py --name="You"`
"""
print(f"Hello {name}!")
if __name__ == "__main__":
fire.Fire(main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment