chore(devops): finalize CLI install report and helper

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Saravanakumar D 2026-05-29 21:20:50 -07:00
parent 9e28d85a64
commit b6dc0768e3
2 changed files with 109 additions and 0 deletions

81
wsl_path_and_check.sh Normal file
View File

@ -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

28
wsl_test.sh Normal file
View File

@ -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