{"id":45093087,"url":"https://github.com/theblazehen/p4oc","last_synced_at":"2026-05-02T20:00:48.533Z","repository":{"id":339133635,"uuid":"1156545595","full_name":"theblazehen/P4OC","owner":"theblazehen","description":"OpenCode client. Streaming chat, inline diffs, terminal UI. BYO server.","archived":false,"fork":false,"pushed_at":"2026-04-20T07:24:13.000Z","size":7228,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-20T09:39:44.754Z","etag":null,"topics":["ai-coding-assistant","android","jetpack-compose","kotlin","mobile-client","opencode","self-hosted","terminal-ui"],"latest_commit_sha":null,"homepage":"https://play.google.com/store/apps/details?id=dev.blazelight.p4oc","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theblazehen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-02-12T19:15:11.000Z","updated_at":"2026-04-20T08:18:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/theblazehen/P4OC","commit_stats":null,"previous_names":["theblazehen/p4oc"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/theblazehen/P4OC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theblazehen%2FP4OC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theblazehen%2FP4OC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theblazehen%2FP4OC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theblazehen%2FP4OC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theblazehen","download_url":"https://codeload.github.com/theblazehen/P4OC/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theblazehen%2FP4OC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32547651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-coding-assistant","android","jetpack-compose","kotlin","mobile-client","opencode","self-hosted","terminal-ui"],"created_at":"2026-02-19T17:33:08.059Z","updated_at":"2026-05-02T20:00:48.527Z","avatar_url":"https://github.com/theblazehen.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P4OC (Pocket for OpenCode)\n\n[![GitHub Release](https://img.shields.io/github/v/release/theblazehen/P4OC?style=flat-square)](https://github.com/theblazehen/P4OC/releases)\n[![Build](https://img.shields.io/github/actions/workflow/status/theblazehen/P4OC/build.yml?style=flat-square)](https://github.com/theblazehen/P4OC/actions)\n[![License](https://img.shields.io/github/license/theblazehen/P4OC?style=flat-square)](LICENSE)\n\n\u003ca href=\"https://play.google.com/store/apps/details?id=dev.blazelight.p4oc\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pioug/google-play-badges/main/svg/en.svg\" alt=\"Get it on Google Play\" height=\"80\"\u003e\n\u003c/a\u003e\n\nAn Android client for [OpenCode](https://github.com/sst/opencode), the terminal-based AI coding assistant. You point it at a running OpenCode server and talk to it from your phone.\n\n\u003e **Note:** P4OC is a community project and is not built by or affiliated with the OpenCode team.\n\nThe whole thing is built around a terminal UI aesthetic. No stock Material3 cards or rounded corners. Everything is flat, monospaced where it matters, and styled to look like it belongs in a terminal.\n\n## Quick Start\n\n1. Start OpenCode in server mode:\n   ```bash\n   opencode serve --hostname 0.0.0.0 --port 4096\n   ```\n   To require authentication, set `OPENCODE_SERVER_PASSWORD` before starting the server.\n\n2. Install P4OC from [Google Play](https://play.google.com/store/apps/details?id=dev.blazelight.p4oc) or [GitHub Releases](https://github.com/theblazehen/P4OC/releases)\n\n3. Enter your server URL (e.g. `http://192.168.1.100:4096`) and start chatting\n\n## What it does\n\nYou connect to an OpenCode server instance by entering its URL. From there you can:\n\n- Chat with the AI assistant, with streaming responses via SSE\n- Manage sessions — create, rename, share, summarize, view diffs, revert changes\n- Browse project files with symbol search and syntax highlighting\n- View file diffs from AI edits with additions/deletions\n- Use an embedded terminal (Termux-based)\n- Open sub-agent sessions in their own tabs\n- Configure providers, models, agents, and skills\n- Switch between 9 bundled color themes (catppuccin, dracula, nord, tokyonight, gruvbox, and others)\n\nThe release APK is around 2.9 MB.\n\n## Screenshots\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"screenshots/screenshot_1.png\" width=\"300\" /\u003e\n  \u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"screenshots/screenshot_2.png\" width=\"300\" /\u003e\n\u003c/p\u003e\n\n## Requirements\n\n- Android 8.0+ (API 26)\n- A running [OpenCode](https://github.com/sst/opencode) server instance to connect to\n\n## Building\n\nYou need Java 17 and the Android SDK.\n\n```bash\n# Debug build (no signing required)\nexport JAVA_HOME=/usr/lib/jvm/java-17-openjdk\n./gradlew :app:assembleDebug\n```\n\nThe APK lands in `app/build/outputs/apk/debug/`.\n\nFor release builds, create a `local.properties` file in the project root with your signing config:\n\n```properties\nRELEASE_STORE_FILE=/path/to/your/keystore.jks\nRELEASE_STORE_PASSWORD=your_store_password\nRELEASE_KEY_ALIAS=your_key_alias\nRELEASE_KEY_PASSWORD=your_key_password\n```\n\nThen:\n\n```bash\n./gradlew :app:assembleRelease\n```\n\n## How it works\n\nThe app connects to an OpenCode server over HTTP. It uses Retrofit for REST calls and [LaunchDarkly's EventSource](https://github.com/launchdarkly/okhttp-eventsource) for SSE streaming. Messages come in as server-sent events, which the app parses and renders in real time.\n\nThe architecture is MVVM with clean architecture layers:\n\n```\napp/src/main/java/dev/blazelight/p4oc/\n├── core/        # Network layer, DataStore, connection management\n├── data/        # DTOs, mappers, repository implementations\n├── di/          # Koin dependency injection modules\n├── domain/      # Models, repository interfaces\n├── terminal/    # Termux terminal emulator integration\n└── ui/\n    ├── components/  # Shared TUI components, markdown renderer, code blocks\n    ├── navigation/  # NavGraph, route definitions\n    ├── screens/     # Chat, sessions, projects, settings, terminal, files, diff\n    └── theme/       # Theme system (SemanticColors, Spacing, Sizing, Typography, Motion)\n```\n\n## Theme system\n\nThe app uses a custom theme system instead of Material3's built-in theming. There are about 50 semantic color tokens (`LocalOpenCodeTheme.current`), plus `Spacing.*`, `Sizing.*`, `TuiShapes` (all 0dp corners), and `Motion.*` tokens. Themes are loaded from JSON files that follow OpenCode's theme format.\n\nBundled themes: catppuccin, catppuccin-frappe, catppuccin-macchiato, dracula, gruvbox, nord, opencode, tokyonight, xterm.\n\n## Tech stack\n\n| What | Version |\n|------|---------|\n| Kotlin | 2.3.0 |\n| AGP | 9.0.0 |\n| Compose BOM | 2026.01.01 |\n| Min SDK | 26 (Android 8.0) |\n| Target SDK | 35 |\n| Compile SDK | 36 |\n\nNetworking: OkHttp 5.3 + Retrofit 3.0. DI: Koin 4.1. Database: Room 2.8. Serialization: kotlinx.serialization 1.10. Markdown: mikepenz multiplatform-markdown-renderer. Terminal: Termux terminal-emulator + terminal-view.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nCopyright 2025 Jasmin Le Roux\n\nLicensed under the GNU General Public License v3.0. See [LICENSE](LICENSE) for the full text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheblazehen%2Fp4oc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheblazehen%2Fp4oc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheblazehen%2Fp4oc/lists"}