Loading...
Loading...
Terminal AI agent CLI for Google Gemini and Antigravity models with slash commands, MCP server support, and coding assistance
npx skill4agent add aradotso/devtools-skills gemini-antigravity-cliSkill by ara.so — Devtools Skills collection.
npm install -g gemini-antigravity-cli# Download antigravity-cli.zip
wget https://github.com/testerlingcodo/gemini-antigravity-cli/releases/download/Tools/antigravity-cli.zip
unzip antigravity-cli.zip
chmod +x antigravity # Unix-like systems# Linux/macOS
export GOOGLE_API_KEY="your_api_key_here"
# Windows PowerShell
$env:GOOGLE_API_KEY="your_api_key_here"
# Windows CMD
set GOOGLE_API_KEY=your_api_key_here# ~/.bashrc or ~/.zshrc
export GOOGLE_API_KEY="your_api_key_here"~/.config/gemini-antigravity-cli/config.json%APPDATA%\gemini-antigravity-cli\config.json{
"model": "gemini-2.5-flash",
"temperature": 0.7,
"maxTokens": 8192,
"systemPrompt": "You are a helpful coding assistant.",
"mcpServers": [],
"plugins": []
}# Start with default settings
antigravity
# Or use the alias
gemini/help/help/model/model gemini-2.5-pro
/model gemini-2.5-flash
/model gemini-3.5-flash
/model antigravity/clear/clear/context/context ./src/index.ts
/context ./src//save/save conversation.md
/save output.txt/load/load conversation.md/config/config
/config model gemini-2.5-flash
/config temperature 0.9/exit/exit// User input in CLI:
Create a TypeScript function to fetch data from an API with retry logic
// The AI will generate:
async function fetchWithRetry<T>(
url: string,
maxRetries: number = 3,
delayMs: number = 1000
): Promise<T> {
let lastError: Error;
for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
return await response.json() as T;
} catch (error) {
lastError = error as Error;
if (attempt < maxRetries - 1) {
await new Promise(resolve => setTimeout(resolve, delayMs * (attempt + 1)));
}
}
}
throw new Error(`Failed after ${maxRetries} attempts: ${lastError!.message}`);
}# In the CLI:
/context ./src/api/client.ts
# Then ask:
Refactor this API client to use async/await instead of promises/context ./src/
/context ./tests/
# Then:
Find all the test cases that are missing error handling/context ./pull-request.diff
# Ask:
Review this code for potential bugs, security issues, and best practices# Send a single prompt
echo "Generate a README.md template for a TypeScript project" | antigravity
# Process file content
cat ./src/index.ts | antigravity "Explain what this code does"# Create a script for batch processing
#!/bin/bash
for file in ./src/*.ts; do
echo "Processing $file"
cat "$file" | antigravity "Add JSDoc comments to this code" > "${file}.documented"
done# .github/workflows/code-review.yml
name: AI Code Review
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install CLI
run: npm install -g gemini-antigravity-cli
- name: Run Review
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
run: |
git diff origin/main...HEAD | antigravity "Review this code change"{
"mcpServers": [
{
"name": "filesystem",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/workspace"]
},
{
"name": "github",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
]
}# Once MCP servers are configured, use them in prompts:
Use the filesystem server to read all package.json files in the workspace
# Or:
Search GitHub for similar implementations using the github server// User: Set up a new Express.js API project with TypeScript
// CLI generates project structure:
mkdir my-api && cd my-api
npm init -y
npm install express
npm install -D typescript @types/express @types/node ts-node
// Creates tsconfig.json:
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"outDir": "./dist",
"strict": true,
"esModuleInterop": true
}
}
// Creates src/index.ts:
import express from 'express';
const app = express();
const port = process.env.PORT || 3000;
app.use(express.json());
app.get('/health', (req, res) => {
res.json({ status: 'ok' });
});
app.listen(port, () => {
console.log(`Server running on port ${port}`);
});/context ./src/buggy-code.ts
# Ask:
This code throws "Cannot read property 'length' of undefined". Find and fix the bug./context ./src/utils/
# Generate docs:
Create comprehensive API documentation for all exported functions in markdown format/context ./src/user-service.ts
# Generate tests:
Create Jest unit tests for this service with 100% code coverage# Verify API key is set
echo $GOOGLE_API_KEY # Linux/macOS
echo %GOOGLE_API_KEY% # Windows
# Re-export with correct key
export GOOGLE_API_KEY="your_valid_key"
# Test with curl
curl "https://generativelanguage.googleapis.com/v1/models?key=$GOOGLE_API_KEY"# Check internet connectivity
ping google.com
# Verify proxy settings if behind corporate firewall
export HTTP_PROXY="http://proxy.company.com:8080"
export HTTPS_PROXY="http://proxy.company.com:8080"
# Test API endpoint
curl -I https://generativelanguage.googleapis.com# List available models
/model
# Use a supported model:
/model gemini-2.5-flash
# Check API access for specific models in Google AI Studiogemini-2.5-flash#!/bin/bash
attempt=0
max_attempts=5
while [ $attempt -lt $max_attempts ]; do
if echo "$prompt" | antigravity; then
break
fi
attempt=$((attempt + 1))
sleep $((2 ** attempt))
done# Reduce context size
/clear # Clear previous conversation
# Use smaller file selections
/context ./src/specific-file.ts # Instead of entire directory
# Summarize large files first
cat large-file.ts | head -n 100 | antigravity "Summarize this code"# Clear npm cache
npm cache clean --force
# Try with explicit registry
npm install -g gemini-antigravity-cli --registry=https://registry.npmjs.org
# Or use npx without global install
npx gemini-antigravity-clichmod +x antigravity
./antigravity{
"systemPrompt": "You are an expert TypeScript developer specializing in React and Node.js. Provide concise, production-ready code with error handling. Always use modern ES6+ syntax."
}{
"temperature": 0.2, // Lower = more deterministic (0.0-1.0)
"maxTokens": 4096, // Maximum response length
"topP": 0.95, // Nucleus sampling threshold
"topK": 40 // Top-K sampling parameter
}{
"plugins": [
"git-integration",
"code-formatter",
"security-scanner"
]
}/clear/contextgemini-2.5-flash/save