Content
# Tool List
> Apache Answer Q&A community's command-line tool — TUI browsing, CLI operations, AI conversations, MCP integration, all in the terminal.
[English](README.en.md) |




## Features
- **TUI Browsing Mode** — Start with no arguments to enter Bubbletea terminal UI, search, browse question details and answers, Markdown rendering
- **CLI Commands** — Query and write operations for questions, answers, comments, tags, and notifications
- **AI Conversations** — Tool calling based on API search, LLM automatically retrieves community content and generates answers
- **MCP Server** — Stdio mode, allowing AI clients like Claude Desktop and Cherry Studio to directly operate community data
- **Multi-format Output** — Pretty / JSON / JSONL, global switching with `--format`
- **Multi AI Providers** — OpenAI, Ollama, Zhipu, and other OpenAI compatible APIs
## Installation
```bash
git clone https://github.com/cicbyte/answer-cli.git
cd answer-cli
go build -o answer-cli .
```
Cross-compilation (requires Python 3, optional UPX):
```bash
python scripts/build.py --local # Current platform
python scripts/build.py # All platforms (Windows/Linux/macOS)
```
**Requirements:** Go >= 1.24, Apache Answer instance
## Quick Start
```bash
answer-cli config set server.base_url https://your-answer-site.com
answer-cli auth login
answer-cli # TUI browsing mode
answer-cli search "golang concurrency" # Search
answer-cli chat "How to handle goroutine leak?" # AI conversation
```
## Command List
| Command | Description |
|------|------|
| `auth login` / `logout` / `status` | Authentication management |
| `config list` / `get` / `set` | Configuration management |
| `question list` / `get` / `create` / `update` / `delete` / `close` / `reopen` | Question management |
| `answer list` / `get` / `create` / `update` / `delete` | Answer management |
| `comment list` / `get` / `add` / `update` / `delete` | Comment management |
| `tag list` / `get` / `create` / `update` / `delete` | Tag management |
| `notification list` | Notification list |
| `search <query>` | Full-text search |
| `chat [question]` | AI conversation |
| `mcp` | Start MCP Server |
### Questions

```bash
answer-cli question list # List questions
answer-cli question list --order hot # Sort by hot
answer-cli question list --tag go # Filter by tag
answer-cli question get <id> # View details (including answers, Markdown rendering)
answer-cli question create -t "Title" -c "Content" --tags=go
answer-cli question delete <id> --yes
```
### Answers / Comments / Tags
```bash
answer-cli answer list <question-id> # List answers
answer-cli answer get <id> # View answer details
answer-cli comment list <object-id> # List comments
answer-cli comment add --object-id <id> -c "Comment content"
answer-cli tag list # List tags
```
### AI Conversations
```bash
answer-cli chat "Question" # Single-turn conversation
answer-cli chat -i # Multi-turn interactive conversation
```


AI Agent uses 5 function tools to retrieve community content (search questions, get details, list answers, search tags, search users), automatically selects retrieval strategies and generates answers.
### Global Options
```bash
answer-cli question list --format json # JSON indented output
answer-cli question list --format jsonl # JSONL line-by-line output
```
## TUI Browsing Mode
Start with no arguments to enter Bubbletea terminal UI:
```bash
answer-cli
```

| Key | Function |
|------|------|
| `↑↓` / `j/k` | Move cursor / scroll |
| `Enter` | Enter details |
| `/` | Search |
| `Tab` | Switch sorting (newest/active/hot/popular/score) |
| `n` / `p` | Page up/down |
| `Home` / `End` | Jump to top/bottom |
| `Esc` | Back |
| `q` | Quit |
## Configuration
Config file: `~/.cicbyte/answer-cli/config/config.yaml` (automatically created on first run)
```yaml
server:
base_url: https://your-answer-site.com
token: your-access-token
ai:
provider: openai # openai / ollama / zhipu
base_url: https://api.openai.com/v1
api_key: sk-xxx
model: gpt-4o
```
```bash
answer-cli config set server.base_url https://your-answer-site.com
answer-cli config list
```
## MCP Server
`answer-cli mcp` runs MCP Server in stdio mode, registering 10 tools:
| Tool | Description |
|------|------|
| `question_search` | Search questions |
| `question_get` | Get question details |
| `question_create` | Create questions |
| `question_update` | Update questions |
| `answer_list` | List answers to a question |
| `answer_create` | Create answers |
| `answer_update` | Update answers |
| `comment_add` | Add comments |
| `tag_search` | Search tags |
**Claude Desktop:**
```json
{
"mcpServers": {
"answer": {
"command": "answer-cli",
"args": ["mcp"]
}
}
}
```
**Cherry Studio:** Settings → MCP Server, command `answer-cli`, parameter `mcp`; or in Settings → Skills, install answer-cli skill

## Tech Stack
- Go 1.24
- [Bubbletea](https://github.com/charmbracelet/bubbletea) + [Bubbles](https://github.com/charmbracelet/bubbles) + [Lipgloss](https://github.com/charmbracelet/lipgloss) + [Glamour](https://github.com/charmbracelet/glamour) — TUI
- [Cobra](https://github.com/spf13/cobra) — CLI framework
- [mcp-go](https://github.com/mark3labs/mcp-go) — MCP Server
- [go-openai](https://github.com/sashabaranov/go-openai) — OpenAI compatible API
- [Resty](https://github.com/go-resty/resty) — HTTP client
- [go-pretty](https://github.com/jedib0t/go-pretty) — Terminal tables
## License
[MIT](LICENSE) © 2026 cicbyte
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds