### Install and Start Proxy with npm Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Install the proxy globally using npm and start the server. Alternatively, use npx to run it directly without installation. ```bash # Run directly with npx (no install needed) npx antigravity-claude-proxy@latest start # Or install globally npm install -g antigravity-claude-proxy@latest antigravity-claude-proxy start ``` -------------------------------- ### Backend-Only Development Setup Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/development.md Install only production dependencies to save space and time if you are not working on frontend styles. Then start the server. ```bash npm install --production # Skip devDependencies (saves ~20MB) npm start ``` -------------------------------- ### Clone Repository and Start Proxy Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Clone the proxy repository from GitHub, install dependencies, and start the server. ```bash git clone https://github.com/badri-s2001/antigravity-claude-proxy.git cd antigravity-claude-proxy npm install npm start ``` -------------------------------- ### Install Dependencies and Build CSS Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Installs project dependencies and builds CSS using a prepare hook. Run this before starting the server. ```bash npm install ``` -------------------------------- ### Start Proxy Server Commands Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Commands to start the proxy server depending on the installation method (global npm, npx, or local clone). The server runs as a background process. ```bash # If installed globally acc start # or: antigravity-claude-proxy start # If using npx npx antigravity-claude-proxy@latest start # If cloned locally npm start ``` -------------------------------- ### Clone and Install Project Dependencies Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/development.md Clone the repository and install project dependencies. The `npm install` command automatically builds CSS via the prepare hook. ```bash git clone https://github.com/badri-s2001/antigravity-claude-proxy.git cd antigravity-claude-proxy npm install # Automatically builds CSS via prepare hook npm start # Start server (no rebuild needed) ``` -------------------------------- ### Start Full Development Server Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Starts the development server, watching both server files and CSS files for changes. This provides a comprehensive development experience. ```bash npm run dev:full ``` -------------------------------- ### Start Server with Cache-Optimized Strategy Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Starts the server using a cache-optimized strategy for improved performance. This is the default strategy if not specified. ```bash npm start -- --strategy=sticky ``` -------------------------------- ### Start the Server Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Starts the Node.js server on port 8080. This is the default command to run the proxy. ```bash npm start ``` -------------------------------- ### Start Server with Load-Balanced Strategy Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Starts the server using a round-robin load-balanced strategy. Useful for distributing requests across multiple instances. ```bash npm start -- --strategy=round-robin ``` -------------------------------- ### Start Antigravity Claude Proxy Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/openclaw.md Run this command in a terminal to start the Antigravity Claude Proxy. By default, it binds to localhost only. ```bash antigravity-claude-proxy start ``` -------------------------------- ### Start Development Server with Watchers Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Starts the development server and watches for changes in server files. Use 'npm run dev:full' to also watch CSS files. ```bash npm run dev ``` -------------------------------- ### Configure Account Selection Strategy via CLI Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/load-balancing.md Set the account selection strategy using the 'start' command. Options include 'hybrid' (default), 'sticky', and 'round-robin'. ```bash antigravity-claude-proxy start --strategy=hybrid # Default: smart distribution ``` ```bash antigravity-claude-proxy start --strategy=sticky # Cache-optimized ``` ```bash antigravity-claude-proxy start --strategy=round-robin # Load-balanced ``` -------------------------------- ### Start Server and Run Tests Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/testing.md Use these commands to run the full test suite. Ensure the server is running in one terminal before executing tests in another. ```bash # Start server in one terminal npm start # Run tests in another terminal npm test ``` -------------------------------- ### Start Proxy on Custom Port Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Start the Antigravity Claude Proxy server on a custom port by setting the PORT environment variable. ```bash PORT=3001 antigravity-claude-proxy start ``` -------------------------------- ### Start OpenClaw Gateway Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/openclaw.md Run this command in a separate terminal to start the OpenClaw gateway after the proxy is running. ```bash openclaw gateway ``` -------------------------------- ### Start Server with Fallback on Quota Exhaustion Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Starts the server with a fallback mechanism to an alternate model when the primary model's quota is exhausted. ```bash npm start -- --fallback ``` -------------------------------- ### Start Antigravity Claude Proxy and OpenCode Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/opencode.md Starts the Antigravity Claude Proxy service in one terminal and opens OpenCode in another. OpenCode can be launched from any project folder. ```bash # Terminal 1: Start the proxy antigravity-claude-proxy start # Terminal 2: Open OpenCode from any project folder opencode ``` -------------------------------- ### Start Antigravity Proxy on Localhost Only (VPS) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/openclaw.md When running the proxy on a VPS, use this command to explicitly bind it to `127.0.0.1` for enhanced security, restricting access to the loopback interface only. ```bash HOST=127.0.0.1 antigravity-claude-proxy start ``` -------------------------------- ### Run Antigravity Claude Proxy and Claude Code Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md First, start the Antigravity proxy server. Then, in a separate terminal, run the Claude Code CLI. ```bash # Make sure the proxy is running first antigravity-claude-proxy start # In another terminal, run Claude Code claude ``` -------------------------------- ### Start Server in Development Mode Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Enables debug logging and development tools for easier debugging and development. '--debug' is a legacy alias for this flag. ```bash npm start -- --dev-mode ``` -------------------------------- ### Run Strategy Unit Tests Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Executes unit tests specifically for the different proxy strategies. No server setup is required for these tests. ```bash node tests/test-strategies.cjs ``` -------------------------------- ### GET /v1/models Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/api-endpoints.md Lists all available models that can be used with the API. ```APIDOC ## GET /v1/models ### Description Lists all available models that can be used with the API. ### Method GET ### Endpoint /v1/models ### Response #### Success Response (200) - **data** (array) - A list of available models. ``` -------------------------------- ### Proxy Management Commands Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Common commands for managing the Antigravity Claude Proxy, including starting, stopping, restarting, checking status, and accessing the UI. Use '--log' to run in the foreground with visible logs. ```bash acc start acc stop acc restart acc status acc ui acc start --log ``` -------------------------------- ### OpenCode Global Configuration for Antigravity Proxy Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/opencode.md This configuration file sets up OpenCode to use the Antigravity proxy as a custom provider. It specifies the base URL, API key environment variable, and maps various Claude and Gemini model IDs to user-friendly names. This setup allows for interactive model switching within OpenCode. ```bash mkdir -p ~/.config/opencode cat > ~/.config/opencode/opencode.json <<'EOF' { "$schema": "https://opencode.ai/config.json", "provider": { "antigravity": { "npm": "@ai-sdk/anthropic", "name": "Antigravity Local", "options": { "baseURL": "http://localhost:8080/v1", "apiKey": "{env:ANTHROPIC_API_KEY}" }, "models": { "claude-sonnet-4-6": { "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6" }, "claude-opus-4-6-thinking": { "id": "claude-opus-4-6-thinking", "name": "Claude Opus 4.6 Thinking" }, "gemini-2.5-pro": { "id": "gemini-2.5-pro", "name": "Gemini 2.5 Pro" }, "gemini-2.5-flash": { "id": "gemini-2.5-flash", "name": "Gemini 2.5 Flash" }, "gemini-2.5-flash-lite": { "id": "gemini-2.5-flash-lite", "name": "Gemini 2.5 Flash Lite" }, "gemini-2.5-flash-thinking": { "id": "gemini-2.5-flash-thinking", "name": "Gemini 2.5 Flash Thinking" }, "gemini-3-flash": { "id": "gemini-3-flash", "name": "Gemini 3 Flash" }, "gemini-3-flash-agent": { "id": "gemini-3-flash-agent", "name": "Gemini 3 Flash Agent" }, "gemini-pro-agent": { "id": "gemini-pro-agent", "name": "Gemini 3.1 Pro Agent" }, "gemini-3.1-pro-low": { "id": "gemini-3.1-pro-low", "name": "Gemini 3.1 Pro Low" }, "gemini-3.1-flash-lite": { "id": "gemini-3.1-flash-lite", "name": "Gemini 3.1 Flash Lite" }, "gemini-3.1-flash-image": { "id": "gemini-3.1-flash-image", "name": "Gemini 3.1 Flash Image" }, "gemini-3.5-flash-low": { "id": "gemini-3.5-flash-low", "name": "Gemini 3.5 Flash" } } } }, "model": "antigravity/claude-sonnet-4-6", "small_model": "antigravity/gemini-3.5-flash-low" } EOF ``` -------------------------------- ### Watch and Compile CSS Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Continuously watches the CSS source files and recompiles them as changes are detected. Requires 'npm install' first. ```bash npm run watch:css ``` -------------------------------- ### GET /account-limits Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/api-endpoints.md Retrieves account status and quota limits. Supports an optional query parameter for ASCII table formatting. ```APIDOC ## GET /account-limits ### Description Retrieves account status and quota limits. An optional `format=table` query parameter can be used to get the output as an ASCII table. ### Method GET ### Endpoint /account-limits #### Query Parameters - **format** (string) - Optional - If set to `table`, the response will be formatted as an ASCII table. ``` -------------------------------- ### GET /health Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/api-endpoints.md Performs a health check on the API service. ```APIDOC ## GET /health ### Description Health check endpoint to verify the API service is running. ### Method GET ### Endpoint /health ### Response #### Success Response (200) - **status** (string) - Indicates the health status of the service. ``` -------------------------------- ### Verify Proxy Health Check Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Perform a health check on the running proxy server by sending a GET request to the /health endpoint. ```bash curl http://localhost:8080/health ``` -------------------------------- ### List All Accounts via CLI Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/load-balancing.md Use the 'accounts list' command to display all configured accounts. ```bash antigravity-claude-proxy accounts list ``` -------------------------------- ### Add Account via CLI (Desktop) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Add an account to the proxy using the CLI on a desktop environment, which will open a browser for authorization. ```bash antigravity-claude-proxy accounts add ``` -------------------------------- ### Add Account via CLI (Headless) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Add an account to the proxy using the CLI on a headless server (e.g., Docker, SSH) without opening a browser. ```bash antigravity-claude-proxy accounts add --no-browser ``` -------------------------------- ### Build CSS Once Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/development.md Use this command to perform a single build of the CSS files. ```bash npm run build:css ``` -------------------------------- ### Load Proxy Settings to Command Prompt (Windows) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Execute these commands in the Windows Command Prompt to set proxy environment variables. Changes require a terminal restart. ```cmd setx ANTHROPIC_BASE_URL "http://localhost:8080" ``` ```cmd setx ANTHROPIC_AUTH_TOKEN "test" ``` -------------------------------- ### Load Proxy Settings to Shell Profile (macOS/Linux) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Add these commands to your shell profile (e.g., ~/.zshrc) to load proxy environment variables. Remember to source the profile after changes. ```bash echo 'export ANTHROPIC_BASE_URL="http://localhost:8080"' >> ~/.zshrc ``` ```bash echo 'export ANTHROPIC_AUTH_TOKEN="test"' >> ~/.zshrc ``` ```bash source ~/.zshrc ``` -------------------------------- ### Add New Account via CLI Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/public/index.html Use this command to add a new Google account for proxying Claude requests. This helps increase your API quota. ```bash npm run accounts:add ``` -------------------------------- ### Verify OpenClaw Models Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/openclaw.md Use this command to list available models in OpenClaw and confirm that models prefixed with `antigravity-proxy/` are recognized. ```bash openclaw models list ``` -------------------------------- ### Run All Tests Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Executes all tests in the project. Requires the server to be running on port 8080. ```bash npm test ``` -------------------------------- ### Monitor Account Limits via CLI Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/load-balancing.md Retrieve account limits and status in a table format using curl. This is useful for monitoring subscription tiers and quota progress. ```bash # Web UI: http://localhost:8080/ (Accounts tab - shows tier badges and quota progress) # CLI Table: curl "http://localhost:8080/account-limits?format=table" ``` -------------------------------- ### Run Individual Tests Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/testing.md Execute specific test suites for different functionalities like signatures, multi-turn interactions, streaming, and caching. ```bash npm run test:signatures # Thinking signatures ``` ```bash npm run test:multiturn # Multi-turn with tools ``` ```bash npm run test:streaming # Streaming SSE events ``` ```bash npm run test:interleaved # Interleaved thinking ``` ```bash npm run test:images # Image processing ``` ```bash npm run test:caching # Prompt caching ``` ```bash npm run test:strategies # Account selection strategies ``` ```bash npm run test:cache-control # Cache control field stripping ``` -------------------------------- ### Add Google Account Headless Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Adds a Google account without opening a browser, useful for headless environments or manual code input. ```bash npm run accounts:add -- --no-browser ``` -------------------------------- ### Verify Account Status and Quota Limits Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Check the status of linked accounts and their quota limits by querying the /account-limits endpoint. The 'format=table' option provides a tabular output. ```bash curl "http://localhost:8080/account-limits?format=table" ``` -------------------------------- ### Full Development Watch Mode Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/development.md Recommended for frontend development, this command watches both CSS files for changes and the server, enabling auto-rebuilds and restarts. ```bash npm run dev:full ``` -------------------------------- ### List Added Google Accounts Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Lists all Google accounts that have been added and configured for use with the proxy. ```bash npm run accounts:list ``` -------------------------------- ### Verify Account Health via CLI Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/load-balancing.md Run the 'accounts verify' command to check the health status of your accounts. ```bash antigravity-claude-proxy accounts verify ``` -------------------------------- ### Configure Shell Environment Variables Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/opencode.md Sets ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL environment variables in ~/.zshrc if they don't exist, then sources the file. The API key is not validated by the proxy. ```bash grep -q 'ANTHROPIC_API_KEY=' ~/.zshrc || echo 'export ANTHROPIC_API_KEY="dummy"' >> ~/.zshrc grep -q 'ANTHROPIC_BASE_URL=' ~/.zshrc || echo 'export ANTHROPIC_BASE_URL="http://localhost:8080/v1"' >> ~/.zshrc source ~/.zshrc ``` -------------------------------- ### Load Proxy Settings to PowerShell Profile (Windows) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Use these PowerShell commands to add proxy environment variables to your profile. The profile will be reloaded automatically. ```powershell Add-Content $PROFILE "`n`$env:ANTHROPIC_BASE_URL = 'http://localhost:8080'" ``` ```powershell Add-Content $PROFILE "`$env:ANTHROPIC_AUTH_TOKEN = 'test'" ``` ```powershell . $PROFILE ``` -------------------------------- ### Add a Google Account Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Adds a new Google account to the proxy using OAuth for authentication. This is required for the proxy to access Google Cloud services. ```bash npm run accounts:add ``` -------------------------------- ### Configure OpenClaw for Antigravity Proxy Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/openclaw.md Add this JSON configuration to your OpenClaw config file to integrate with the Antigravity Claude Proxy. Ensure the `baseUrl` uses `127.0.0.1` for loopback connections. ```json { "models": { "mode": "merge", "providers": { "antigravity-proxy": { "baseUrl": "http://127.0.0.1:8080", "apiKey": "test", "api": "anthropic-messages", "models": [ { "id": "gemini-3-flash", "name": "Gemini 3 Flash", "reasoning": true, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 1048576, "maxTokens": 65536 }, { "id": "gemini-3.1-pro-high", "name": "Gemini 3.1 Pro High", "reasoning": true, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 1048576, "maxTokens": 65536 }, { "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 200000, "maxTokens": 16384 }, { "id": "claude-sonnet-4-6-thinking", "name": "Claude Sonnet 4.6 Thinking", "reasoning": true, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 200000, "maxTokens": 16384 }, { "id": "claude-opus-4-6-thinking", "name": "Claude Opus 4.6 Thinking", "reasoning": true, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 200000, "maxTokens": 32000 } ] } } }, "agents": { "defaults": { "model": { "primary": "antigravity-proxy/gemini-3-flash", "fallbacks": ["antigravity-proxy/gemini-3.1-pro-high"] }, "models": { "antigravity-proxy/gemini-3-flash": {} } } } } ``` -------------------------------- ### Configure HTTP Proxy for Outbound Requests Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/configuration.md Route all outbound API requests through a specified proxy server. This is useful for corporate firewalls, VPNs, or debugging with tools like mitmproxy. Supports various proxy formats, including those with authentication. ```bash # Route through a local proxy (e.g., for debugging with mitmproxy) HTTP_PROXY=http://127.0.0.1:8888 npm start ``` ```bash # Route through a corporate proxy HTTP_PROXY=http://proxy.company.com:3128 npm start ``` ```bash # With authentication HTTP_PROXY=http://user:password@proxy.company.com:3128 npm start ``` -------------------------------- ### Verify Google Accounts Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Verifies the authentication status of the added Google accounts. This ensures they are correctly configured and accessible. ```bash npm run accounts:verify ``` -------------------------------- ### Configure Claude Code with Default Models Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Use this JSON configuration to set up Claude Code with default Anthropic models. Ensure ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL are correctly set. ```json { "env": { "ANTHROPIC_AUTH_TOKEN": "test", "ANTHROPIC_BASE_URL": "http://localhost:8080", "ANTHROPIC_MODEL": "claude-opus-4-6-thinking", "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6-thinking", "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6", "CLAUDE_CODE_SUBAGENT_MODEL": "claude-sonnet-4-6", "ENABLE_EXPERIMENTAL_MCP_CLI": "true" } } ``` -------------------------------- ### Manage Antigravity Claude Proxy Accounts Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/troubleshooting.md Command to manage accounts, including re-authentication for invalid or expired tokens. Access the WebUI for detailed account status and fixing verification issues. ```bash antigravity-claude-proxy accounts ``` -------------------------------- ### Configure systemd Service for Antigravity Proxy Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md This configuration snippet for a systemd service file specifies the environment variable CLAUDE_CONFIG_PATH to correctly locate Claude CLI settings when the proxy runs as a service. It also defines the execution command. ```ini # /etc/systemd/system/antigravity-proxy.service [Service] Environment=CLAUDE_CONFIG_PATH=/home/youruser/.claude ExecStart=/usr/bin/node /path/to/antigravity-claude-proxy/src/index.js ``` -------------------------------- ### Compile Tailwind CSS Once Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Compiles the Tailwind CSS source file once. Use 'npm run watch:css' for continuous compilation. ```bash npm run build:css ``` -------------------------------- ### Check Connection Status and Health Endpoint Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/opencode.md These commands help diagnose connection issues. 'acc status' checks the status of the OpenCode agent, and the cURL command verifies the health endpoint of the proxy. ```bash acc status ``` ```bash curl http://localhost:8080/health ``` -------------------------------- ### Set Custom OAuth Callback Port on Windows Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/troubleshooting.md Use this to set a custom OAuth callback port when the default port is reserved. This is the recommended solution for Windows OAuth port errors. ```powershell $env:OAUTH_CALLBACK_PORT = "3456" antigravity-claude-proxy start ``` ```cmd set OAUTH_CALLBACK_PORT=3456 antigravity-claude-proxy start ``` ```env OAUTH_CALLBACK_PORT=3456 ``` -------------------------------- ### Set Environment Variables Persistently (Windows Command Prompt) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/configuration.md Use the 'setx' command to set environment variables persistently in the Windows Command Prompt. Restart your terminal for the changes to take effect. ```cmd setx PORT 3000 setx HTTP_PROXY http://proxy:8080 ``` -------------------------------- ### Check Antigravity Proxy Health Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/openclaw.md Use this command to ensure the Antigravity Claude Proxy is running and accessible on the specified port. This is useful for troubleshooting connection issues. ```bash curl http://127.0.0.1:8080/health ``` -------------------------------- ### Check OpenClaw Gateway Status Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/openclaw.md This command verifies the operational status of the OpenClaw gateway. ```bash openclaw status ``` -------------------------------- ### Run Specific Tests with Filter Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/CLAUDE.md Runs tests that match the provided filter string. This is useful for isolating and debugging specific test cases. ```bash node tests/run-all.cjs ``` -------------------------------- ### Verify Messages Endpoint Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/opencode.md Use this cURL command to verify that the /v1/messages endpoint is accessible and returning expected responses. Ensure your baseURL is correctly configured. ```bash curl "http://localhost:8080/v1/messages" -H "content-type: application/json" -H "anthropic-version: 2023-06-01" -H "x-api-key: dummy" -d '{"model": "claude-sonnet-4-6", "max_tokens": 100, "messages": [{"role":"user","content":"say hi"}]}' ``` -------------------------------- ### Create Alias for Antigravity Claude Code (macOS/Linux) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Define an alias in your shell profile to run the Antigravity version of Claude Code distinctly from the official one. This sets specific environment variables for the alias. ```bash # Add to ~/.zshrc or ~/.bashrc alias claude-antigravity='CLAUDE_CONFIG_DIR=~/.claude-account-antigravity ANTHROPIC_BASE_URL="http://localhost:8080" ANTHROPIC_AUTH_TOKEN="test" command claude' ``` -------------------------------- ### View Excluded TCP Port Ranges on Windows Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/troubleshooting.md Check which TCP port ranges are excluded by the system, useful for identifying conflicts with the default OAuth port. ```powershell netsh interface ipv4 show excludedportrange protocol=tcp ``` -------------------------------- ### Configure Claude Code with Gemini Models Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md This JSON configuration allows Claude Code to use Gemini models. Update ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL as needed. ```json { "env": { "ANTHROPIC_AUTH_TOKEN": "test", "ANTHROPIC_BASE_URL": "http://localhost:8080", "ANTHROPIC_MODEL": "gemini-3.1-pro-low", "ANTHROPIC_DEFAULT_OPUS_MODEL": "gemini-3.1-pro-low", "ANTHROPIC_DEFAULT_SONNET_MODEL": "gemini-3.5-flash-low", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "gemini-3.5-flash-low", "CLAUDE_CODE_SUBAGENT_MODEL": "gemini-3.5-flash-low", "ENABLE_EXPERIMENTAL_MCP_CLI": "true" } } ``` -------------------------------- ### POST /refresh-token Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/api-endpoints.md Forces a refresh of the authentication token. ```APIDOC ## POST /refresh-token ### Description Forces a refresh of the authentication token. ### Method POST ### Endpoint /refresh-token ### Response #### Success Response (200) - **token** (string) - The new authentication token. ``` -------------------------------- ### Watch for CSS Changes Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/development.md This command will continuously watch for changes in the CSS source files and automatically rebuild them. ```bash npm run watch:css ``` -------------------------------- ### Set Environment Variables Inline Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/configuration.md Set environment variables for a single command execution. This method is compatible with macOS, Linux, and Windows (Git Bash/WSL). ```bash PORT=3000 HTTP_PROXY=http://proxy:8080 npm start ``` -------------------------------- ### Refresh Authentication Token Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/troubleshooting.md Use this cURL command to refresh the authentication token if you are experiencing 401 authentication errors. ```bash curl -X POST http://localhost:8080/refresh-token ``` -------------------------------- ### Set Environment Variables Persistently (macOS/Linux) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/configuration.md Add environment variables to your shell profile (e.g., ~/.zshrc or ~/.bashrc) for persistent settings on macOS and Linux. Remember to reload your shell profile after making changes. ```bash export PORT=3000 export HTTP_PROXY=http://proxy:8080 ``` -------------------------------- ### Create Function for Antigravity Claude Code (Windows PowerShell) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/README.md Define a PowerShell function in your profile to run the Antigravity version of Claude Code. This function sets specific environment variables before executing the 'claude' command. ```powershell # Add to $PROFILE function claude-antigravity { $env:CLAUDE_CONFIG_DIR = "$env:USERPROFILE\.claude-account-antigravity" $env:ANTHROPIC_BASE_URL = "http://localhost:8080" $env:ANTHROPIC_AUTH_TOKEN = "test" claude } ``` -------------------------------- ### Permanently Exclude a TCP Port Range on Windows Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/troubleshooting.md Reserve a specific TCP port range to prevent other services like Hyper-V from claiming it. Run as Administrator. ```powershell netsh int ipv4 add excludedportrange protocol=tcp startport=51121 numberofports=1 ``` -------------------------------- ### Reset Windows NAT Service Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/troubleshooting.md Run this command as Administrator to reset the Windows NAT service, which can resolve port conflicts. ```powershell net stop winnat net start winnat ``` -------------------------------- ### Set Environment Variables Persistently (Windows PowerShell) Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/configuration.md Use the [Environment]::SetEnvironmentVariable method in Windows PowerShell to set environment variables persistently for the current user. Restart your terminal for the changes to take effect. ```powershell [Environment]::SetEnvironmentVariable("PORT", "3000", "User") [Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://proxy:8080", "User") ``` -------------------------------- ### Switch Default Model in OpenClaw Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/openclaw.md Change the primary AI model used by OpenClaw by executing this command. Alternatively, edit the `model.primary` field in the configuration file. ```bash openclaw models set antigravity-proxy/claude-opus-4-6-thinking ``` -------------------------------- ### POST /v1/messages Source: https://github.com/badrisnarayanan/antigravity-claude-proxy/blob/main/docs/api-endpoints.md Handles requests to the Anthropic Messages API. ```APIDOC ## POST /v1/messages ### Description Endpoint for interacting with the Anthropic Messages API. ### Method POST ### Endpoint /v1/messages ### Request Body - **messages** (array) - Required - The messages to send to the model. - **model** (string) - Required - The model to use for generation. - **max_tokens** (integer) - Required - The maximum number of tokens to generate. - **system** (string) - Optional - System prompt for the model. ### Response #### Success Response (200) - **content** (array) - The response content from the model. - **stop_reason** (string) - The reason the model stopped generating text. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.