Skip to content

Instantly share code, notes, and snippets.

@jcausey-astate
Last active January 24, 2025 16:55
Show Gist options
  • Save jcausey-astate/80a38b9c997695c654a9636fb6e77070 to your computer and use it in GitHub Desktop.
Save jcausey-astate/80a38b9c997695c654a9636fb6e77070 to your computer and use it in GitHub Desktop.
uvi is a Bash function to quickly initialize a Python `uv` project without workspace or hello world script. Add it to .bashrc or .profile, or similar.
# Quick `uv init` without src directory, "README.md", or "hello.py".
# Project name is optional (default to directory if not provided).
function uvi() {
if [ ! -z "$1" ] ; then
NAME="--name=$1"
fi
uv init --app --no-readme --no-workspace ${NAME} && rm hello.py
}
export -f uvi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment