mirror of
https://github.com/humanlayer/humanlayer.git
synced 2025-08-20 19:01:22 +03:00
Add documentation for using uv scripts in hack directory
This commit is contained in:
17
hack/CLAUDE.md
Normal file
17
hack/CLAUDE.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Hack Directory Guidelines
|
||||
|
||||
## Using UV Scripts for One-Off Tools
|
||||
|
||||
When creating standalone Python scripts in this directory, use uv's inline script dependencies:
|
||||
|
||||
```python
|
||||
#!/usr/bin/env -S uv run
|
||||
# /// script
|
||||
# dependencies = [
|
||||
# "pillow",
|
||||
# "requests",
|
||||
# ]
|
||||
# ///
|
||||
```
|
||||
|
||||
This allows scripts to be self-contained with their dependencies and run with `uv run script.py` without manual environment setup. UV will automatically create an isolated environment and install the required packages on first run.
|
||||
Reference in New Issue
Block a user