Starship in Toolboxes

I might have found a solution. It seems to work after a bit of testing. I take no credit as it was with the help of an LLM. I decided to keep the description as it explains it well for newbies like me!

On Silverblue the usual install path (/usr/local/bin) isn’t ideal for Toolbox because that directory isn’t shared with Toolbox containers. Instead, you can install Starship to a location within your home directory (for example, ~/.local/bin), which Toolbox mounts automatically. This way, Starship becomes available both on the host and inside Toolbox.

To do this, run:

curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin

After the installation, make sure that ~/.local/bin is in your PATH. You might add something like this to your shell configuration file (e.g. ~/.bashrc or ~/.zshrc):

export PATH="$HOME/.local/bin:$PATH"

This approach avoids the need to reinstall Starship in Toolbox since it’s installed in a shared location.