Installation
Keep Silk Code isolated in ~/SilkCode/.venv while exposing one convenient command to your shell.
Requirements
- Python 3.10 or newer
- git
- zsh for the alias commands below
Install or update Silk Code
if [ -d "$HOME/SilkCode/.git" ]; then
git -C "$HOME/SilkCode" pull
else
git clone https://github.com/RupertCloud/SilkCode.git "$HOME/SilkCode"
fi
cd "$HOME/SilkCode"
[ -d .venv ] || python3 -m venv .venv
.venv/bin/python -m pip install -e .
grep -q 'alias silkcode=' ~/.zshrc 2>/dev/null || \
echo 'alias silkcode="$HOME/SilkCode/.venv/bin/silkcode"' >> ~/.zshrc
source ~/.zshrc
silkcode --help
What the installer does
- Clones Silk Code on the first run and pulls updates on later runs.
- Creates the virtual environment only when it does not exist.
- Installs or refreshes the editable package with that environment’s Python.
- Adds the zsh alias once, without duplicating it when the block is rerun.
You do not need to activate .venv to use Silk Code after the alias is loaded.
Verify
which silkcode
silkcode --help
silkcode models