Guide for running inline Python scripts with uv. Use this when the user requests "use inline python." It explains the special script header format (for example, # /// script), how to declare PyPI dependencies using a dependencies array, and how to set a minimum Python version with requires-python (assume Python 3.12+). Example usage demonstrates piping a heredoc into uv run --no-project -q --script - to execute code without creating a project. Use cases include quick API calls, prototyping snippets, CI helper tasks, or testing small utilities without making a full project. Core advantages are fast, isolated execution, explicit dependency declaration for third-party packages, and simple invocation. Important warning: never list standard library modules (json, os, re, etc.) in dependencies or the script will fail.
uv run --no-project -q --script - < <(cat <<'EOF'
# /// script
# # ONLY add dependencies array if you need PyPi packages
# dependencies = [
# "httpx"
# ]
# requires-python = ">=3.12"
# ///
import httpx
print(httpx.get("https://api.github.com/zen").text)
EOF
)
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer