{"id":50439932,"url":"https://github.com/harryplusplus/poopgo","last_synced_at":"2026-05-31T18:31:11.612Z","repository":{"id":354528167,"uuid":"1224018847","full_name":"harryplusplus/poopgo","owner":"harryplusplus","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-29T00:28:16.000Z","size":56,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-29T00:29:31.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harryplusplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-28T22:07:40.000Z","updated_at":"2026-04-29T00:28:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/harryplusplus/poopgo","commit_stats":null,"previous_names":["harryplusplus/poopgo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/harryplusplus/poopgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryplusplus%2Fpoopgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryplusplus%2Fpoopgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryplusplus%2Fpoopgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryplusplus%2Fpoopgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harryplusplus","download_url":"https://codeload.github.com/harryplusplus/poopgo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryplusplus%2Fpoopgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33744444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-31T18:31:10.921Z","updated_at":"2026-05-31T18:31:11.606Z","avatar_url":"https://github.com/harryplusplus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💩 PoopGo — Hyper Minimal AI Agent Harness\n\nPoopGo is a terminal-based AI chat client built with [Bubble Tea v2](https://github.com/charmbracelet/bubbletea).\nIt streams responses from any OpenAI-compatible API right in your terminal.\n\n## Features\n\n- 🖥️ Full TUI with scrollable chat history (mouse wheel / touchpad, slash commands)\n- 🖱️ Native text selection — drag to select, Cmd+C to copy\n- ⚡ Streaming token-by-token responses (SSE) with animated spinner\n- 💭 Reasoning model support — `reasoning_content` rendered in italic, `POOPGO_REASONING_EFFORT` config\n- 🔌 Works with OpenAI, local LLMs (Ollama, LM Studio), or any `/chat/completions` endpoint\n- ⌨️ Slash command palette (`/help`, `/scroll-top`, `/scroll-bottom`)\n- 🧪 Fake provider for UI testing without API calls\n\n## Quick Start\n\n### 1. Set your API key\n\n```bash\nexport POOPGO_API_KEY=\"sk-your-key-here\"\n```\n\nIf `POOPGO_API_KEY` is not set (and `POOPGO_PROVIDER` is not `fake`),\nPoopGo prints an error to stderr and exits immediately.\n\n### 2. Run\n\n```bash\ngo run ./cmd/poopgo\n```\n\n### 3. (Optional) Build a binary\n\n```bash\ngo build -o poopgo ./cmd/poopgo\n./poopgo\n```\n\n## Configuration\n\n| Variable           | Default                        | Description                          |\n|--------------------|--------------------------------|--------------------------------------|\n| `POOPGO_API_KEY`   | *(required, except fake)*      | Your API key                         |\n| `POOPGO_BASE_URL`  | `https://api.openai.com/v1`    | Base URL of the chat completions API |\n| `POOPGO_MODEL`     | `gpt-4o`                       | Model name                           |\n| `POOPGO_PROVIDER`  | *(empty → real API)*           | `\"fake\"` for fake provider (no API)  |\n| `POOPGO_REASONING_EFFORT` | *(empty → disabled)*  | Reasoning depth: `\"low\"`, `\"medium\"`, `\"high\"`, `\"xhigh\"`, `\"max\"` (for reasoning models like o1/o3) |\n| `POOPGO_TEMPERATURE` | *(empty → API default)* | Sampling temperature `0.0`–`2.0` (e.g., `\"0.7\"`) |\n| `POOPGO_TOOLS`       | *(empty → disabled)*   | JSON array of tool function definitions (function calling) |\n\nAll can be set via environment variables or a `.env` file:\n\n```bash\n# Option A: export individually\nexport POOPGO_API_KEY=\"sk-...\"\n\n# Option B: load from .env file (bash/zsh)\nset -a; . ./.env; set +a\n```\n\n### Examples\n\n**OpenAI:**\n```bash\nexport POOPGO_API_KEY=\"sk-...\"\ngo run ./cmd/poopgo\n```\n\n**Ollama (local):**\n```bash\nexport POOPGO_API_KEY=\"ollama\"\nexport POOPGO_BASE_URL=\"http://localhost:11434/v1\"\nexport POOPGO_MODEL=\"llama3\"\ngo run ./cmd/poopgo\n```\n\n**LM Studio (local):**\n```bash\nexport POOPGO_API_KEY=\"lm-studio\"\nexport POOPGO_BASE_URL=\"http://localhost:1234/v1\"\ngo run ./cmd/poopgo\n```\n\n**DeepSeek (reasoning):**\n```bash\nexport POOPGO_API_KEY=\"sk-...\"\nexport POOPGO_BASE_URL=\"https://api.deepseek.com\"\nexport POOPGO_MODEL=\"deepseek-reasoner\"\nexport POOPGO_REASONING_EFFORT=\"max\"\ngo run ./cmd/poopgo\n```\n\n**Fake provider (no API, no key):**\n```bash\nexport POOPGO_PROVIDER=\"fake\"\ngo run ./cmd/poopgo\n```\n\n**Reasoning model with fake provider:**\n```bash\nexport POOPGO_PROVIDER=\"fake\"\nexport POOPGO_REASONING_EFFORT=\"high\"\ngo run ./cmd/poopgo\n```\n\n**With custom temperature:**\n```bash\nexport POOPGO_API_KEY=\"sk-...\"\nexport POOPGO_TEMPERATURE=\"0.7\"\ngo run ./cmd/poopgo\n```\n\n## Keybindings\n\n| Key              | Action                       |\n|------------------|------------------------------|\n| `Enter`          | Send message                 |\n| `Shift+Enter`    | Insert newline               |\n| `Ctrl+C`         | Quit                         |\n| `Esc`            | Cancel stream (streaming) / close palette (command mode) / no-op (normal mode) |\n| `/`              | Open command palette         |\n| `↑`/`↓` in palette | Navigate commands          |\n| Mouse wheel / touchpad | Scroll (terminal-native) |\n| Mouse drag       | Select text (terminal-native → Cmd+C) |\n\n### Slash Commands\n\nType `/` at the start of a message to open the command palette:\n\n| Command           | Description         |\n|-------------------|---------------------|\n| `/help`           | Show all commands   |\n| `/scroll-top`     | Scroll to top       |\n| `/scroll-bottom`  | Scroll to bottom    |\n\nUse `↑`/`↓` to navigate, `Enter` to select, `Esc` to close.\n\n## Testing\n\n```bash\n# Run all tests\ngo test ./internal/...\n\n# Verbose output\ngo test ./internal/... -v\n\n# With race detector\ngo test ./internal/... -race\n```\n\n### Test methodology\n\n- **Unit tests** (`internal/app/model_test.go`): Model state transitions — keyboard input, message flow, streaming, command palette, viewport rendering.\n- **API tests** (`internal/app/api_test.go`): SSE parsing, JSON serialization/deserialization.\n- Use `POOPGO_PROVIDER=fake` for interactive testing without API calls.\n\nAll tests are self-contained; no network or external dependencies required.\n\n## Project Structure\n\n```\ncmd/poopgo/main.go          Entry point — provider selection, Bubble Tea Program\ninternal/app/model.go       Main Model (viewport, textarea, messages, command palette, spinner)\ninternal/app/model_test.go  Model unit tests — keyboard, messages, streaming, command palette\ninternal/app/api.go         Types (Message, chatRequest) + SSE stream parsing\ninternal/app/api_test.go    SSE parsing + JSON serialization tests\ninternal/app/provider.go    StreamProvider interface + RealProvider + FakeProvider\n```\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryplusplus%2Fpoopgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharryplusplus%2Fpoopgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryplusplus%2Fpoopgo/lists"}