4 ms·
Has anyone tried this for command line applications? This could be a great way to develop some very specific/corner-case tools.
by flenserboy 1y ago
Has anyone tried this for command line applications? This could be a great way to develop some very specific/corner-case tools.
- simonw 1y agoI write CLI tools with LLMs all the time. I even have a custom Claude Project that teaches the LLM to use inline script dependencies with uv so I can "uv run script.py" without first having to install anything else: https://simonwillison.net/2024/Dec/19/one-shot-python-tools/ https://simonwillison.net/2024/Dec/19/one-shot-python-tools/ I have a collection of tools I've built in this way here: https://tools.simonwillison.net/python/ https://tools.simonwillison.net/python/
- flenserboy 1y agoVery cool! Thank you.
- kiitos 1y agoA CLI tool is a native binary that I can run directly via e.g. `/path/to/binary`. If I need to use `uv run ...` to execute something, then that thing isn't really a CLI tool, it's an interpreted script, which relies on an interpreter that needs to be available as a pre-requisite, and all of the numerous complications that follow from that...
- simonw 1y agoUse this as your shebang line: #!/usr/bin/env -S uv run --script https://treyhunner.com/2024/12/lazy-self-installing-python-scripts-with-uv/ https://treyhunner.com/2024/12/lazy-self-installing-python-s... I don't think requiring all CLI tools to be "native binaries" makes sense. Plenty of popular CLI tools are not compiled binaries. The Python and Node.js ecosystems run on those.
- kiitos 1y agoYou're describing scripts, which require interpreters like I guess uv or Node or Python. A CLI tool is a native binary.