File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# SessionStart hook for Claude Code online environment
33# This script sets up the Python development environment using pixi
44
5- set -e
5+ set -eo pipefail
66
77echo " 🚀 Setting up Python Template environment..."
88
@@ -15,6 +15,7 @@ if ! command -v pixi &> /dev/null; then
1515 export PATH=" $HOME /.pixi/bin:$PATH "
1616
1717 # Source bashrc to get pixi in PATH (if bashrc was updated)
18+ # shellcheck disable=SC1091
1819 [ -f " $HOME /.bashrc" ] && source " $HOME /.bashrc"
1920
2021 echo " ✅ Pixi installed successfully"
Original file line number Diff line number Diff line change 1- #! /bin/sh
2- set -eu
1+ #! /bin/bash
2+ set -euo pipefail
33
44# Claude Code CLI Local Feature Install Script
55# Installs Claude Code via pixi and sets up configuration directories
@@ -83,6 +83,7 @@ install_claude_code() {
8383
8484 # Add pixi bin path to user's profile if not already there
8585 local profile=" $TARGET_HOME /.profile"
86+ # shellcheck disable=SC2016
8687 local pixi_path_line=' export PATH="$HOME/.pixi/bin:$PATH"'
8788 if [ -f " $profile " ] && ! grep -q ' \.pixi/bin' " $profile " ; then
8889 echo " $pixi_path_line " >> " $profile "
@@ -93,6 +94,7 @@ install_claude_code() {
9394
9495 # Workaround: pixi trampoline fails for bash scripts, so add env bin directly
9596 # This conditionally adds the path only if the env exists
97+ # shellcheck disable=SC2016
9698 local env_path_line=' [ -d "$HOME/.pixi/envs/claude-shim/bin" ] && export PATH="$HOME/.pixi/envs/claude-shim/bin:$PATH"'
9799 if [ -f " $profile " ] && ! grep -q ' pixi/envs/claude-shim' " $profile " ; then
98100 echo " # Workaround: pixi trampoline fails for bash scripts" >> " $profile "
Original file line number Diff line number Diff line change 1212
1313 "features" : {
1414 "./claude-code" : {},
15- "ghcr.io/devcontainers/features/docker-in-docker:2" : {},
16- "ghcr.io/devcontainers/features/common-utils:2" : {}
15+ // "ghcr.io/devcontainers/features/docker-in-docker:2": {},
16+ // "ghcr.io/devcontainers/features/common-utils:2": {}
1717 },
1818
1919 "initializeCommand" : " .devcontainer/claude-code/init-host.sh" ,
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ repos:
4848 # Run the formatter.
4949 - id : ruff-format
5050 types_or : [ python, pyi ]
51+ # Shell script linter
52+ - repo : https://github.com/koalaman/shellcheck-precommit
53+ rev : v0.11.0
54+ hooks :
55+ - id : shellcheck
56+
5157 # Checks for spelling mistakes
5258 - repo : https://github.com/codespell-project/codespell
5359 rev : v2.3.0
Original file line number Diff line number Diff line change 11#! /bin/bash
2- set -e
2+ set -eo pipefail
33
44export COMPOSE_DOCKER_CLI_BUILD=1
55export DOCKER_BUILDKIT=1
@@ -25,14 +25,16 @@ if [ ! -d "$VENV_DIR" ]; then
2525 echo " Creating virtual environment in $VENV_DIR ..."
2626 python3 -m venv " $VENV_DIR "
2727 echo " Activating the virtual environment..."
28- source $VENV_DIR /bin/activate
28+ # shellcheck disable=SC1091
29+ source " $VENV_DIR /bin/activate"
2930 echo " Installing deps rocker..."
3031 pip install deps-rocker pixi-rocker rockervsc
3132 echo " Virtual environment setup and deps rocker installation complete."
3233else
3334 echo " Virtual environment already exists in $VENV_DIR ."
3435 echo " Activating the existing virtual environment..."
35- source $VENV_DIR /bin/activate
36+ # shellcheck disable=SC1091
37+ source " $VENV_DIR /bin/activate"
3638fi
3739
3840rockervsc
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -eo pipefail
23
34# Escape characters special in sed replacement strings (\, &, /)
45escape_sed () { printf ' %s\n' " $1 " | sed ' s/[\\&/]/\\&/g' ; }
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -eo pipefail
23
34# Sets up docker, nvidia docker git-lfs and rocker which are used to clone and setup docker containers
45
56# COPIED FROM OFFICIAL DOCKER INSTALL INSTRUCTIONS
67# https://docs.docker.com/engine/install/ubuntu/
78
89# remove incorrect docker
9- for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg ; done
10+ for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove " $pkg " ; done
1011
1112# Add Docker's official GPG key:
1213sudo apt update
@@ -16,6 +17,7 @@ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyring
1617sudo chmod a+r /etc/apt/keyrings/docker.asc
1718
1819# Add the repository to Apt sources:
20+ # shellcheck disable=SC1091
1921echo \
2022 " deb [arch=$( dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
2123 $( . /etc/os-release && echo " $VERSION_CODENAME " ) stable" | \
@@ -52,11 +54,12 @@ echo "you may need to restart your machine"
5254
5355# INSTALL PIXI
5456curl -fsSL https://pixi.sh/install.sh | bash
57+ # shellcheck disable=SC2016
5558echo ' eval "$(pixi completion --shell bash)"' >> ~ /.bashrc
5659
5760# INSTALL UV
5861curl -LsSf https://astral.sh/uv/install.sh | sh
5962
6063sudo groupadd docker
61- sudo usermod -aG docker $USER
64+ sudo usermod -aG docker " $USER "
6265newgrp docker || true
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -eo pipefail
23
34git config --global pull.rebase false
45git remote add template https://github.com/blooop/python_template.git
You can’t perform that action at this time.
0 commit comments