OpenChat is a high-performance, native Android application built with Jetpack Compose, designed to provide a pixel-perfect AI interaction experience with full workspace and agentic capabilities.
- Blazing Fast Streaming: Tokens appear instantly with minimal latency.
- Agentic Workspace: AI can read, create, and edit files in your local workspace.
- Multimodal Support: Attach images and documents for rich context.
- Artifacts System: Render HTML/JS/CSS snippets in a live preview.
- Local Persistence: Full session history and workspace files stored via Room and internal storage.
- Voice Integration: Speech-to-Text and Text-to-Speech support for hands-free interaction.
- Pro Design: Minimal, dark/light theme (inspired by Claude Android).
- UI: Jetpack Compose (Material 3)
- Architecture: MVVM + Clean Architecture + Repository Pattern
- Dependency Injection: Dagger Hilt
- Database: Room (SQLite)
- Networking: Retrofit + OkHttp (SSE support)
- Local Storage: DataStore (Preferences)
- Formatting: Markwon (Markdown) + Prism.js (Syntax Highlighting)
git clone https://github.com/yourusername/openchat.git
cd openchatOpenChat supports multi-provider integration. You don't need to hardcode keys:
- Open the app on your device.
- Navigate to History (Sidebar) > API Config.
- Add your OpenAI, Anthropic, or custom provider keys.
Ensure you have Android Studio Hedgehog+ and JDK 17 installed.
./gradlew assembleDebugThe APK will be located at app/build/outputs/apk/debug/app-debug.apk.
The repository is configured with GitHub Actions to automate builds:
- Debug Builds: Every push to
maingenerates a debug APK in the "Actions" tab. - Release Builds: Pushing a tag (e.g.,
v1.0.0) triggers a signed release APK and a GitHub Release.
If you are using Termux to push these changes to GitHub, follow these exact steps to ensure the build fixes are applied:
-
Navigate to the project folder:
cd /path/to/your/project -
Fix the local Gradle wrapper and Permissions (IMPORTANT): Run these commands to ensure the correct files are present and executable:
mkdir -p gradle/wrapper curl -L https://github.com/gradle/gradle/raw/v8.7.0/gradle/wrapper/gradle-wrapper.jar -o gradle/wrapper/gradle-wrapper.jar chmod +x gradlew # Tell Git to track the executable bit (CRITICAL for GitHub Actions) git update-index --chmod=+x gradlew -
Stage and Push:
git add . git add -f gradle/wrapper/gradle-wrapper.jar git add -f app/src/main/res/drawable/ic_launcher_background.xml git add -f app/src/main/res/drawable/ic_launcher_foreground.xml git add -f app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml git add -f app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml git commit -m "Fix: Add missing icons and ensure gradlew executable bit" git push origin main
Once pushed, check the Actions tab. I have updated the workflow to be more robust, and it should now successfully build the APK.
This means the gradle-wrapper.jar file is missing or corrupted in your repository.
Solution:
I have switched the GitHub Action to use the official Setup Gradle action which is much more reliable. If you see this error locally, simply run the curl command in Step 6 above to download a fresh jar.
If you see this error in Android Studio or terminal:
- Ensure you are opening the root folder (the one containing
settings.gradle.kts). - Make sure
gradle/wrapper/gradle-wrapper.propertieshasdistributionUrl=...gradle-8.7-bin.zip. - In Android Studio, go to File > Settings > Build, Execution, Deployment > Gradle and set "Gradle JDK" to JDK 17.
- If building from terminal, always use
./gradlew assembleDebug(Linux/Mac) orgradlew.bat assembleDebug(Windows) to ensure the correct version is used.
This happens if Android Studio doesn't recognize the project as a Gradle project.
- Click File > Sync Project with Gradle Files.
- If the option is missing, click File > Close Project and then Open the root folder again.
Add these secrets to your GitHub repository (Settings > Secrets and variables > Actions):
- KEYSTORE_BASE64: Generate a keystore, then encode it:
keytool -genkey -v -keystore openchat.jks -keyalg RSA -keysize 2048 -validity 10000 -alias openchat base64 -w 0 openchat.jks > encoded.txt # Copy content of encoded.txt to GitHub Secret
- KEYSTORE_PASSWORD: The password for your keystore.
- KEY_ALIAS:
openchat(or your chosen alias). - KEY_PASSWORD: Your key password.
git tag v1.0.0
git push origin v1.0.0MIT License. See LICENSE for details.