Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:50:19 +08:00
commit d08086ebc7
41 changed files with 4892 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
# API Connector - Gemini CLI Extension
Connect to REST APIs, manage authentication, and process responses.
## Features
- Make GET, POST, PUT, DELETE requests
- Automatic authentication header management
- JSON response parsing
- Rate limiting and retry logic
- Response caching
## Configuration
**Required:**
- `API_KEY`: Your API authentication key
**Optional:**
- `API_BASE_URL`: Base URL (default: https://api.example.com)
- `API_TIMEOUT`: Timeout in ms (default: 30000)
## Usage
```
"Get data from /users endpoint"
"POST this JSON to /api/create"
"Check the API status"
```
## Safety
This extension operates in read-only mode:
- Cannot execute bash commands
- Cannot edit local files
- Cannot write files to disk
Only makes HTTP requests to configured API endpoints.

View File

@@ -0,0 +1,40 @@
{
"name": "api-connector",
"version": "2.1.0",
"description": "Connect to REST APIs, manage authentication, and process responses. Use for API integration tasks.",
"contextFileName": "GEMINI.md",
"settings": [
{
"name": "API_BASE_URL",
"description": "Base URL for API requests",
"default": "https://api.example.com"
},
{
"name": "API_KEY",
"description": "API authentication key",
"secret": true,
"required": true
},
{
"name": "API_TIMEOUT",
"description": "Request timeout in milliseconds",
"default": "30000"
}
],
"mcpServers": {
"api-client": {
"command": "node",
"args": ["${extensionPath}/mcp-server/api-client.js"],
"env": {
"API_BASE_URL": "${API_BASE_URL}",
"API_KEY": "${API_KEY}",
"API_TIMEOUT": "${API_TIMEOUT}"
}
}
},
"excludeTools": [
"Bash",
"Edit",
"Write"
]
}