From b6dc0768e30f5044f892101d0758359a81994354 Mon Sep 17 00:00:00 2001 From: Saravanakumar D Date: Fri, 29 May 2026 21:20:50 -0700 Subject: [PATCH] chore(devops): finalize CLI install report and helper Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- wsl_path_and_check.sh | 81 +++++++++++++++++++++++++++++++++++++++++++ wsl_test.sh | 28 +++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 wsl_path_and_check.sh create mode 100644 wsl_test.sh diff --git a/wsl_path_and_check.sh b/wsl_path_and_check.sh new file mode 100644 index 0000000..cb7e2ed --- /dev/null +++ b/wsl_path_and_check.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +set -euo pipefail +PROFILE="$HOME/.profile" +BASHRC="$HOME/.bashrc" +LINE='export PATH="$HOME/.npm-global/bin:$HOME/.local/bin:$PATH"' +changed=0 +if ! grep -Fxq "$LINE" "$PROFILE" 2>/dev/null; then + echo "$LINE" >> "$PROFILE" + echo "Appended PATH to $PROFILE" + changed=1 +fi +if ! grep -Fxq "$LINE" "$BASHRC" 2>/dev/null; then + echo "$LINE" >> "$BASHRC" + echo "Appended PATH to $BASHRC" + changed=1 +fi +export PATH="$HOME/.npm-global/bin:$HOME/.local/bin:$PATH" +echo "PATH set to: $PATH" + +echo +for cmd in claude codex devin agy; do + echo "=== $cmd presence ===" + if command -v "$cmd" >/dev/null 2>&1; then + echo "FOUND: $(command -v $cmd)" + else + echo "NOT FOUND" + fi +done + +echo +# Help and login hint extraction +if command -v claude >/dev/null 2>&1; then + echo '--- claude --help (first 120 lines) ---' + claude --help 2>&1 | sed -n '1,120p' || true + echo '--- claude help grep login/auth ---' + claude --help 2>&1 | grep -i -E 'login|auth|configure|token|key|signin|sign-in' || true +else + echo 'claude not installed' +fi + +echo +if command -v codex >/dev/null 2>&1; then + echo '--- codex --help (first 120 lines) ---' + codex --help 2>&1 | sed -n '1,120p' || true + echo '--- codex help grep login/auth ---' + codex --help 2>&1 | grep -i -E 'login|auth|configure|token|key|signin|sign-in' || true +else + echo 'codex not installed' +fi + +echo +if command -v devin >/dev/null 2>&1; then + echo '--- devin --help (first 120 lines) ---' + devin --help 2>&1 | sed -n '1,120p' || true + echo '--- devin help grep login/auth ---' + devin --help 2>&1 | grep -i -E 'login|auth|configure|token|key|signin|sign-in' || true +else + echo 'devin not installed' +fi + +echo +# Antigravity docs inspection +echo '--- Antigravity page snippet (first 300 lines) ---' +curl -fsSL https://antigravity.google/product/antigravity-cli 2>/dev/null | sed -n '1,300p' || echo 'failed to fetch antigravity page' + +echo +# Versions +for cmd in claude codex devin agy; do + echo "--- $cmd version/path ---" + if command -v "$cmd" >/dev/null 2>&1; then + echo "path: $(command -v $cmd)" + $cmd --version 2>/dev/null || echo 'no --version output' + else + echo 'not installed' + fi +done + +echo +if [ "$changed" -eq 1 ]; then + echo 'Please start a new shell or run: source ~/.profile' +fi diff --git a/wsl_test.sh b/wsl_test.sh new file mode 100644 index 0000000..9c4e863 --- /dev/null +++ b/wsl_test.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +file="/mnt/d/SANDBOX/mygh/learning_ai_devops_tools/install_clis_wsl.sh" +echo "Fixing line endings" +if command -v dos2unix >/dev/null 2>&1; then + dos2unix "$file" +else + sed -i 's/\r$//' "$file" +fi + +echo +echo "Running syntax check (bash -n)" +if bash -n "$file"; then + echo "bash syntax: OK" +else + echo "bash syntax: FAILED" +fi + +echo +echo "First 100 lines:" +sed -n '1,100p' "$file" + +echo +echo "Byte dump (first 128 bytes):" +if command -v xxd >/dev/null 2>&1; then + xxd -l 128 "$file" +else + head -c 128 "$file" | od -An -tx1 +fi