diff --git a/bin/ccind b/bin/ccind index ccf36b0..05b89e2 100755 --- a/bin/ccind +++ b/bin/ccind @@ -113,8 +113,13 @@ else --additional-features "$ADDITIONAL_FEATURES" fi +# Helper to check if claude is available (checks both PATH and ~/.local/bin) +claude_available() { + devcontainer exec --workspace-folder "$WORKSPACE" bash -c 'command -v claude || test -x "$HOME/.local/bin/claude"' &> /dev/null +} + # Check if claude is available in the container -if ! devcontainer exec --workspace-folder "$WORKSPACE" bash -c 'command -v claude' &> /dev/null; then +if ! claude_available; then if prompt_rebuild; then echo_info "Rebuilding container..." devcontainer up \ @@ -128,13 +133,14 @@ if ! devcontainer exec --workspace-folder "$WORKSPACE" bash -c 'command -v claud fi # Verify claude is available before launching -if ! devcontainer exec --workspace-folder "$WORKSPACE" bash -c 'command -v claude' &> /dev/null; then +if ! claude_available; then echo_error "Claude Code CLI still not found after rebuild. Please check for errors above." exit 1 fi # Launch Claude Code interactively +# Use PATH that includes ~/.local/bin since Claude installs there echo_info "Launching Claude Code..." exec devcontainer exec \ --workspace-folder "$WORKSPACE" \ - claude + bash -c 'PATH="$HOME/.local/bin:$PATH" claude' diff --git a/install.sh b/install.sh index 971a0c7..a53c779 100755 --- a/install.sh +++ b/install.sh @@ -25,8 +25,14 @@ for rc_file in ~/.bashrc ~/.zshrc; do fi done +# Add to fish shell (fish_user_paths is universal, doesn't require config.fish) +if command -v fish &> /dev/null; then + fish -c "set -Ua fish_user_paths '$CCIND_HOME/bin'" 2>/dev/null || true + echo "Added ccind to fish PATH (via fish_user_paths)" +fi + echo "" echo "Installation complete. Please restart your terminal or run:" -echo " source ~/.bashrc # or ~/.zshrc" +echo " source ~/.bashrc # or ~/.zshrc (fish users: path is set automatically)" echo "" echo "Then run 'ccind --help' to get started."