Skip to content

Instantly share code, notes, and snippets.

@alerma-sumo
alerma-sumo / sumologic-claude.sh
Created March 10, 2026 02:43
Claude Code + Sumo Logic MCP — full auth flow (service account → OAuth client → HTTP + stdio)
#!/usr/bin/env bash
set -euo pipefail
# ── required environment variables ─────────────────────────────────────────────
if [[ -z "${SUMOLOGIC_ACCESS_ID}" ]]; then
echo "Error: SUMOLOGIC_ACCESS_ID is not set" >&2
exit 1
fi
@alerma-sumo
alerma-sumo / sumologic-claude-stdio.sh
Created March 10, 2026 02:40
Claude Code + Sumo Logic MCP — stdio transport (mcp-proxy)
#!/usr/bin/env bash
set -euo pipefail
export SUMOLOGIC_BASE_URL="${SUMOLOGIC_BASE_URL:-"https://mcp.sumologic.com"}"
export SUMOLOGIC_OAUTH_CLIENT_ID="${SUMOLOGIC_OAUTH_CLIENT_ID:-"your-client-id-here"}"
export SUMOLOGIC_OAUTH_CLIENT_SECRET="${SUMOLOGIC_OAUTH_CLIENT_SECRET:-"your-client-secret-here"}"
export SUMOLOGIC_OAUTH_TOKEN_URL="${SUMOLOGIC_OAUTH_TOKEN_URL:-"https://service.sumologic.com/oauth2/token"}"
export SUMOLOGIC_CLAUDE_MCP_SCOPE="${SUMOLOGIC_CLAUDE_MCP_SCOPE:-"user"}"
export MCP_PROXY_PYTHON_VERSION="${MCP_PROXY_PYTHON_VERSION:-"3.14.0"}"
@alerma-sumo
alerma-sumo / sumologic-claude-http.sh
Created March 10, 2026 02:40
Claude Code + Sumo Logic MCP — HTTP transport
#!/usr/bin/env bash
set -euo pipefail
get_sumologic_oauth_access_token() {
curl -s -X POST "${SUMOLOGIC_OAUTH_TOKEN_URL}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${SUMOLOGIC_OAUTH_CLIENT_ID}&client_secret=${SUMOLOGIC_OAUTH_CLIENT_SECRET}" \
| jq -rc '.access_token'
}
@alerma-sumo
alerma-sumo / install.sh
Last active April 15, 2026 08:00
Universal Claude Code + LiteLLM Installer - Self-contained, works with any environment via LITELLM_PROXY_URL
#!/usr/bin/env bash
set -euo pipefail
setup_path() {
echo "Setting up PATH for bun and claude..."
if ! grep -q 'export BUN_INSTALL="$HOME/.bun"' ~/.zshrc; then
echo '' >> ~/.zshrc
echo '# bun' >> ~/.zshrc
@alerma-sumo
alerma-sumo / get-litellm-key.ts
Last active September 4, 2025 23:48
LiteLLM Claude Code Installation Script with hardcoded TypeScript source
#!/usr/bin/env bun
import { mkdir } from "node:fs/promises";
import { parseArgs } from "node:util";
import { chromium } from "playwright";
// Centralized logging function for JSON output - ALL OUTPUT GOES TO STDERR
async function log(data: Record<string, unknown>, isError = false) {
const logEntry = { type: "log", ...data };
const output = `${JSON.stringify(logEntry)}\n`;
await Bun.stderr.write(output);
@alerma-sumo
alerma-sumo / README.md
Last active September 16, 2025 00:49
LiteLLM Claude Code Installation with Bun TypeScript compilation

LiteLLM Claude Code Integration

A Bun-based TypeScript package for integrating Claude Code with LiteLLM proxy authentication.

Features

  • 🚀 Bun-native: Built specifically for Bun runtime with native APIs
  • 🔐 OIDC Authentication: Automated browser-based authentication flow
  • 💾 Session Caching: Intelligent session management with validation
  • Compiled Executable: Single binary deployment via bun build --compile