You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hatch caches data on behalf of the user. This idea came up when discussing environments created as part of hatch run <script>. I don't know if there is other cached data that could benefit from this command, but the following could be useful for managing script environments.
This list is a bit "off the top of my head" - I can think of use cases for all of these, but there may be other possibilities as well, or there may be better ways of structuring the subcommands.
hatch cache dir - print the location of the cache directory.
hatch cache prune - remove cached environments that relate to scripts that no longer exist on disk.
hatch cache purge - remove all cached environments, forcing them to be recreated when next needed.
hatch cache find <script> - print the location of the environment directory for <script>.
hatch cache list - list the contents of the cache (environment directory, associated script, disk space used).
This is modeled after the functionality provided by the uv cache and pip cache commands.
The text was updated successfully, but these errors were encountered:
I've been experimenting with environments - and specifically with not storing environments in the project directory (which is my normal preference). All of the commands proposed above would be equally useful for project environments, as well as for script environments.
Hatch caches data on behalf of the user. This idea came up when discussing environments created as part of
hatch run <script>
. I don't know if there is other cached data that could benefit from this command, but the following could be useful for managing script environments.This list is a bit "off the top of my head" - I can think of use cases for all of these, but there may be other possibilities as well, or there may be better ways of structuring the subcommands.
hatch cache dir
- print the location of the cache directory.hatch cache prune
- remove cached environments that relate to scripts that no longer exist on disk.hatch cache purge
- remove all cached environments, forcing them to be recreated when next needed.hatch cache find <script>
- print the location of the environment directory for <script>.hatch cache list
- list the contents of the cache (environment directory, associated script, disk space used).This is modeled after the functionality provided by the
uv cache
andpip cache
commands.The text was updated successfully, but these errors were encountered: