Closed simonw closed 1 year ago
I don't want to add trogon
as a default dependency because it's a little heavy - it pulls in all of Rich and Textual as well. People who use sqlite-utils
just for its Python API won't benefit from this - it's a CLI feature only.
But I have a sqlite-utils install ...
command for helping people to install packages into the same virtual environment as sqlite-utils
no matter how they installed that tool: https://sqlite-utils.datasette.io/en/stable/cli.html#cli-install
So I can treat Trogon as an optional dependency and add the sqlite-utils tui
command only if that package is also installed.
OK, this works!
To try it out, install that branch from GitHub:
pip install https://github.com/simonw/sqlite-utils/archive/refs/heads/trogon.zip
Then run this:
sqlite-utils install trogon
And this:
sqlite-utils tui
Opened a feature request for customizing the help and command name:
It looks like nargs=-1
on a positional argument isn't yet supported - opened an issue here:
Draft documentation: https://sqlite-utils--549.org.readthedocs.build/en/549/cli.html#cli-tui
https://github.com/Textualize/trogon