standalone-script

Generate standalone Python scripts with embedded dependencies and a Typer CLI via PEP 723.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/gordonwatts/skill-test --skill standalone-script
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: standalone-script
Source: https://github.com/gordonwatts/skill-test/tree/main/.codex/skills/standalone-script
Command: npx skills add https://github.com/gordonwatts/skill-test --skill standalone-script

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Generate standalone Python scripts that run without packaging, embedding dependencies and a Typer-based CLI via a PEP 723 block.

Core Features & Use Cases

  • One-file executable Python scripts with a Typer CLI
  • Inline dependency declarations using a PEP 723 block
  • No package layout or pyproject; simple, distributable as a single .py file
  • Use Case: create quick automation tools or runnable utilities without a project scaffold

Quick Start

Create a portable one-file Python script that runs with uv run --script and declares dependencies inline.

Frequently Asked Questions about standalone-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a standalone Python script with inline dependencies?▼

To create a standalone Python script, you use a PEP 723 block to embed dependencies and a Typer-based CLI directly in the file. This allows the script to run without needing a formal package layout or pyproject file.

Do I need uv to run a standalone Python script with inline metadata?▼

Yes, you need uv and Python 3.13+ to run a standalone script with inline metadata. The script relies on the uv run --script command to automatically install the declared dependencies and execute the file in a single workflow.

What is the best way to distribute a one-file Python automation tool?▼

The best way to distribute a one-file Python automation tool is using a PEP 723 block for inline dependencies. This approach creates a simple, portable .py file with a Typer CLI that recipients can run directly without packaging.

When should I use a standalone script instead of a Python project package?▼

You should use a standalone script for quick automation tasks or one-off utilities that do not need a project scaffold. It embeds dependencies inline via a PEP 723 block, making it ideal for simple, distributable runnable scripts.

Can I add a command line interface to a single-file Python script?▼

Yes, you can add a command line interface to a single-file Python script using Typer. The script generator embeds a Typer-based CLI alongside your inline dependencies within the PEP 723 block for complete executable functionality.

What are the limitations of using PEP 723 for Python scripting?▼

Limitations of using PEP 723 for Python scripting include requiring Python 3.13+ and the uv runner. It is specifically designed for single-file workflows, meaning it is not suitable for scripts that eventually need to scale into a packaged project layout.