Loading...
Loading...
Compare original and translation side by side
Skill by ara.so — Devtools Skills collection.
由ara.so开发的Skill工具——属于Devtools Skills集合。
npm install -g gemini-antigravity-clinpm install -g gemini-antigravity-cliundefinedundefinedundefinedundefinedundefinedundefined
Add to your shell profile for persistence:
```bash
将密钥添加到shell配置文件中以永久生效:
```bashundefinedundefined~/.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": []
}~/.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": []
}undefinedundefinedundefinedundefined/help/help/help/help/model/model/model gemini-2.5-pro
/model gemini-2.5-flash
/model gemini-3.5-flash
/model antigravity/model gemini-2.5-pro
/model gemini-2.5-flash
/model gemini-3.5-flash
/model antigravity/clear/clear/clear/clear/context/context/context ./src/index.ts
/context ./src//context ./src/index.ts
/context ./src//save/save/save conversation.md
/save output.txt/save conversation.md
/save output.txt/load/load/load conversation.md/load conversation.md/config/config/config
/config model gemini-2.5-flash
/config temperature 0.9/config
/config model gemini-2.5-flash
/config temperature 0.9/exit/exit/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}`);
}// CLI中的用户输入:
创建一个带有重试逻辑的TypeScript API数据获取函数
// AI将生成:
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}`);
}undefinedundefinedundefinedundefined/context ./src/
/context ./tests//context ./src/
/context ./tests/undefinedundefined/context ./pull-request.diff/context ./pull-request.diffundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefined{
"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}"
}
}
]
}{
"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}"
}
}
]
}undefinedundefinedundefinedundefined// 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}`);
});// 用户:搭建一个新的Express.js API项目并使用TypeScript
// CLI生成项目结构:
mkdir my-api && cd my-api
npm init -y
npm install express
npm install -D typescript @types/express @types/node ts-node
// 创建tsconfig.json:
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"outDir": "./dist",
"strict": true,
"esModuleInterop": true
}
}
// 创建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/context ./src/buggy-code.tsundefinedundefined/context ./src/utils//context ./src/utils/undefinedundefined/context ./src/user-service.ts/context ./src/user-service.tsundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedgemini-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))
donegemini-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))
doneundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedchmod +x antigravity
./antigravitychmod +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."
}{
"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
}{
"temperature": 0.2, // 数值越低,输出越确定(范围0.0-1.0)
"maxTokens": 4096, // 最大响应长度
"topP": 0.95, // 核采样阈值
"topK": 40 // Top-K采样参数
}{
"plugins": [
"git-integration",
"code-formatter",
"security-scanner"
]
}{
"plugins": [
"git-integration",
"code-formatter",
"security-scanner"
]
}/clear/contextgemini-2.5-flash/save/clear/contextgemini-2.5-flash/save