Skip to content

How to use pier with uv? #99

@dhalucario

Description

@dhalucario

I read online uv can run Python scripts and automatically install dependencies by using the following shebang line:
#!/usr/bin/env -S uv run.

So I tried to create a small test script to see if it would work with pier, but it seems to get hang while running. My config looks as follows:

[scripts.fakename]
command = '''
#!/usr/bin/env -S uv run
# /// script
# requires-python = ">=3.11"
# dependencies = [
#     "faker"
# ]
# ///
from faker import Faker

print(Faker().name())
'''

[default]

Running pier --verbose fakename returns the following:

Starting script "fakename"
-------------------------

After that it just hangs, but still responds to CTRL+C. Is there something I am doing wrong or missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions