Fabric
Fabric copied to clipboard
[Feature request]: Install with `pipx`
What do you need?
The very nature of pipx is designed to handle some of the less friendly parts of the installer, like aliases with the full poetry virtual environment in the path. This would also support installing the helpers as first-class citizens/binaries/callables. There would need to be a few dependencies added for the helpers via poetry shell and the helpers directory would need to be installed via the pyproject.toml, but I think it would give a really clean result.
I can work on this feature, but wanted buy-in before formalizing the work and submitting a PR.
Caveat: no access to Windows for testing, but have worked this out for macOS/Linux.
Example:
$ which fabric
fabric not found
$ cd fabric && pipx install .
installed package fabric 0.2.0, installed using Python 3.12.2
These apps are now globally available
- fabric
- fabric-api
- fabric-webui
- save
- ts
- yt
done! ✨ 🌟 ✨
$ which fabric
/Users/swalsh/.local/bin/fabric
$ yt https://youtu.be/K9mhIUc_hRk | fabric -p extract_wisdom | save fabric-context -t context -t markdown
## SUMMARY
The content features ... snipped for brevity
$ pipx uninstall fabric
uninstalled fabric! ✨ 🌟 ✨
$ fabric -h
zsh: command not found: fabric
Hey, thanks for the suggestion! Your pipx trick worked for me over here on Windows 10 as well! Actually I had fabric working over on my WSL installation & just ended up using the same fabric. Everything went smoothly possibly partially because I already pipx installed.
Anyway, here are the general steps I took, (post-git clone):
- In a VS Code powershell terminal,
cd fabric - I think I did run
pipx install .once before getting into the shell but was getting pyperclip errors so I did apoetry shell. - From the poetry shell,
pipx install .and everything went smoothly there. fabric --setup(etc.)yt https://youtu.be/K9mhIUc_hRk | fabric -p extract_wisdomwhich ran successfully- BONUS: Windows Ollama also seemed to be working with it (though openhermes wasn't great at extracting the wisdom)..
Now I'm assuming everytime I want to run fabric, I'll need to start poetry shell from its dir.
(Maybe not though, I'm new to poetry.)
@invisiblethreat Looks like this has been released if you want to test. I had some issues getting it to work, but I'll caulk that up to removing the older version and/or installing pipx and getting it working properly. I'm curious how it goes for you!
Does this mean we no longer need to use $> poetry shell?
I didn't need to use that, but I can't say my system is a clean state as far as globally installed python modules go. The whole premise of using pipx however is to create separate virtual environments for each pipx install you do. My understanding is that pipx looks for files like poetrys' pyproject.toml when installing.
Pipx added!