System-wide AI text assistant for Android โ powered by Gemini, Groq, and any OpenAI-compatible endpoint
Type a trigger like ?fix at the end of any text, in any app, and watch it get replaced โ instantly.
Note
SwiftSlate works in most apps โ WhatsApp, Gmail, Twitter/X, Messages, Notes, and more. No copy-pasting. No app switching. Just type and go. Some apps with custom input fields may not be supported (see limitations).
- Quick Demo
- Features
- Built-in Commands
- Text Replacer Commands
- Supported AI Providers
- Getting Started
- How It Works
- Custom Commands
- API Key Management
- Backup & Restore
- App Screens
- Screenshots
- Localization
- Privacy & Security
- Tech Stack
- Architecture
- Building from Source
- Contributing
- Sponsors
- Support the Project
- License
- Star History
๐ You type โ "i dont no whats hapening ?fix"
โณ SwiftSlate โ โ โ โ โ (processing...)
โ
Result โ "I don't know what's happening."
๐ You type โ "hey can u send me that file ?formal"
โณ SwiftSlate โ โ โ โ โ (processing...)
โ
Result โ "Could you please share the file at your earliest convenience?"
๐ You type โ "Hello, how are you? ?translate:es"
โณ SwiftSlate โ โ โ โ โ (processing...)
โ
Result โ "Hola, ยฟcรณmo estรกs?"
|
Integrates at the system level via Android's Accessibility Service. Works in most apps โ messaging, email, social media, notes, browsers, and more. Some apps with custom input fields may not be supported (see limitations). Type, trigger, done. The AI response replaces your text directly in the same field โ no copy-pasting, no app switching. A spinner ( Add multiple API keys for automatic round-robin rotation. If one key hits a rate limit, SwiftSlate seamlessly switches to the next. Pure black ( |
Ships with Google Gemini, Groq, or connect any OpenAI-compatible endpoint โ cloud providers, or local LLMs like Ollama, LM Studio, and others running on your network. AI commands send text to your provider for intelligent transformation. Text replacer commands run entirely offline for instant local text manipulation โ no API key needed. API keys are encrypted with AES-256-GCM using the Android Keystore. Your keys never leave your device unencrypted. App UI available in English, French, German, Spanish, Portuguese (BR), Hindi, and Simplified Chinese. |
SwiftSlate ships with 9 AI-powered commands plus dynamic translation โ ready to use out of the box:
| Trigger | Action | Example |
|---|---|---|
?fix |
Fix grammar, spelling & punctuation | i dont no whats hapening โ I don't know what's happening. |
?improve |
Improve clarity and readability | The thing is not working good โ The feature isn't functioning properly. |
?shorten |
Shorten while keeping meaning | I wanted to let you know that I will not be able to attend the meeting tomorrow โ I can't attend tomorrow's meeting. |
?expand |
Expand with more detail | Meeting postponed โ The meeting has been postponed to a later date. We will share the updated schedule soon. |
?formal |
Rewrite in professional tone | hey can u send me that file โ Could you please share the file at your earliest convenience? |
?casual |
Rewrite in friendly tone | Please confirm your attendance at the event โ Hey, you coming to the event? Let me know! |
?emoji |
Add relevant emojis | I love this new feature โ I love this new feature! ๐โค๏ธโจ |
?reply |
Generate a contextual reply | Do you want to grab lunch tomorrow? โ Sure, I'd love to! What time works for you? |
?undo |
Restore text from before the last replacement | Reverts to your original text before AI modified it |
?translate:XX |
Translate to any language | Hello, how are you? ?translate:es โ Hola, ยฟcรณmo estรกs? |
๐ Supported language codes for translation
Use any standard language code with ?translate:XX:
| Code | Language | Code | Language | Code | Language |
|---|---|---|---|---|---|
es |
Spanish | fr |
French | de |
German |
ja |
Japanese | ko |
Korean | zh |
Chinese |
hi |
Hindi | ar |
Arabic | pt |
Portuguese |
it |
Italian | ru |
Russian | nl |
Dutch |
tr |
Turkish | pl |
Polish | sv |
Swedish |
โฆand many more. Any ISO 639 language code works โ the AI model handles it.
Beyond AI, you can create text replacer commands that run entirely offline โ no API key, no network, instant execution:
| Use Case | Trigger | Replacement | Result |
|---|---|---|---|
| Signatures | ?sig |
โ John Doe, CEO |
Appends your signature |
| Canned responses | ?ty |
Thank you for reaching out! I'll get back to you shortly. |
Instant reply template |
| Snippets | ?addr |
123 Main St, Springfield, IL 62701 |
Quick address insertion |
| Shortcuts | ?email |
contact@example.com |
Fast email insertion |
Tip
Text replacer commands execute instantly with zero latency โ no spinner, no network call. Create them in the Commands tab by selecting the "Text Replacer" type.
| Provider | Models | Notes |
|---|---|---|
| Google Gemini (default) | gemini-2.5-flash-lite, gemini-3-flash-preview, gemini-3.1-flash-lite-preview |
Free tier available at aistudio.google.com |
| Groq | llama-3.3-70b-versatile, llama-3.1-8b-instant, openai/gpt-oss-120b, openai/gpt-oss-20b, meta-llama/llama-4-scout-17b-16e-instruct |
Free tier at console.groq.com |
| Custom (OpenAI-compatible) | Any model your endpoint supports | Works with Ollama, LM Studio, vLLM, any /v1/chat/completions endpoint |
Tip
For local LLMs, set the endpoint to your machine's local address (e.g., http://localhost:11434/v1 for Ollama). HTTP is allowed for localhost, 127.0.0.1, and 10.0.2.2.
| Requirement | Details |
|---|---|
| Android Device | Android 6.0+ (API 23 or higher) |
| API Key | Free Gemini key at aistudio.google.com, or a key from Groq / any OpenAI-compatible provider. Not required for text replacer commands. |
Tip
The APK is only ~1.2 MB โ lightweight with zero external dependencies for networking or JSON.
1. Download the latest APK from the Releases page
2. Install the APK on your device (allow installation from unknown sources if prompted)
3. Open SwiftSlate and follow the setup below
|
Step 1 ๐ Add API Key Open the Keys tab, enter your API key. It's validated before saving. Add multiple keys for rotation. |
Step 2 โฟ Enable Service On the Dashboard, tap "Enable" โ find "SwiftSlate Assistant" in Accessibility Settings โ toggle it on. |
Step 3 โ๏ธ Start Typing! Open any app, type your text, add a trigger like |
flowchart TD
A["๐ You type: 'Hello wrld, how r u ?fix'"] --> B{"๐ Accessibility Service\ndetects trigger"}
B -- "Text Replacer" --> C["โก Instant local replacement\n(no network call)"]
B -- "AI Command" --> D["๐ Selects next API key\n(round-robin)"]
D --> E["๐ค Sends text + prompt\nto AI provider"]
E --> F["โณ Shows inline spinner\nโ โ โ โ"]
F --> G["โ
Replaces text in-place"]
C --> G
style A fill:#1a1a2e,stroke:#e94560,color:#fff
style B fill:#1a1a2e,stroke:#0f3460,color:#fff
style C fill:#1a1a2e,stroke:#00b894,color:#fff
style D fill:#1a1a2e,stroke:#0f3460,color:#fff
style E fill:#1a1a2e,stroke:#0f3460,color:#fff
style F fill:#1a1a2e,stroke:#e94560,color:#fff
style G fill:#16213e,stroke:#00b894,color:#fff
๐ง Technical deep-dive
- Event Listening โ SwiftSlate registers an Accessibility Service that listens for
TYPE_VIEW_TEXT_CHANGEDevents across all apps (ignoring its own UI and password fields) - Fast Exit Optimization โ For performance, it first checks if the last character of typed text matches any known trigger's last character before doing a full scan
- Longest Match โ When a potential match is found, it searches for the longest matching trigger at the end of the text
- Command Routing โ Text replacer commands execute immediately on-device. AI commands proceed to the API call path
- API Call โ The text + prompt is sent to the configured AI provider using the next available key in the round-robin rotation
- Inline Spinner โ While waiting for the AI response, a spinner animation (
โ โ โ โ) replaces the text to provide visual feedback - Watchdog Timer โ A 120-second safety timer auto-cancels stuck processing jobs to prevent the service from becoming unresponsive
- Text Replacement โ The response replaces the original text using
ACTION_SET_TEXT - Fallback Strategy โ If
ACTION_SET_TEXTfails (some apps don't support it), SwiftSlate falls back to a clipboard-based select-all + paste approach - Post-Replace Verification โ A delayed check ensures the IME didn't clobber the replacement, re-applying if needed
- Bounded Responses โ API responses are capped at 1 MB to prevent memory issues from malformed responses
Create, edit, and manage your own commands in the Commands tab.
| Type | How It Works | Needs API Key? | Latency |
|---|---|---|---|
| AI | Sends text to your AI provider with your custom prompt | Yes | ~1โ3 seconds |
| Text Replacer | Replaces the trigger with a fixed string, entirely offline | No | Instant |
| Trigger | Prompt | Use Case |
|---|---|---|
?eli5 |
Explain this like I'm five years old. |
Simplify complex topics |
?bullet |
Convert this text into bullet points. |
Quick formatting |
?headline |
Rewrite this as a catchy headline. |
Social media posts |
?code |
Convert this description into pseudocode. |
Developer shorthand |
?tldr |
Summarize this text in one sentence. |
Quick summaries |
Tip
Just describe the transformation you want โ SwiftSlate's system instruction automatically ensures the AI returns only the transformed text without extra commentary.
SwiftSlate supports multiple API keys with intelligent rotation:
| Feature | Details |
|---|---|
| Round-Robin Rotation | Keys are used in turn to spread usage evenly across all configured keys |
| Rate-Limit Handling | If a key gets rate-limited (HTTP 429), SwiftSlate tracks the cooldown and skips it automatically |
| Invalid Key Detection | Keys returning 401/403 errors are marked invalid and excluded from rotation |
| Encrypted Storage | All keys encrypted with AES-256-GCM via Android Keystore before being saved locally |
| Live Validation | Keys are validated against the provider's API before being saved |
Tip
Adding 2โ3 API keys from different accounts helps avoid rate limits during heavy use. On the free tier, all keys under the same account share a single quota โ so rotation only helps with keys from separate accounts.
Export and import your custom commands as JSON files โ useful for migrating to a new device or sharing command sets.
- Export โ Saves all custom commands to a
.jsonfile via Android's file picker - Import โ Loads commands from a
.jsonfile (validates format, trigger prefix, and size limits before importing)
Find both options in the Settings tab under Backup & Restore.
Note
Imported commands must use the same trigger prefix currently configured in the app. API keys are not included in backups for security.
SwiftSlate has four screens accessible via the bottom navigation bar:
|
|
|
|
SwiftSlate's UI is available in 7 languages:
| Language | Code |
|---|---|
| ๐บ๐ธ English | en |
| ๐ซ๐ท French | fr |
| ๐ฉ๐ช German | de |
| ๐ช๐ธ Spanish | es |
| ๐ง๐ท Portuguese (Brazil) | pt-rBR |
| ๐ฎ๐ณ Hindi | hi |
| ๐จ๐ณ Simplified Chinese | zh-rCN |
The app automatically uses your device's language. Contributions for additional translations are welcome!
Note
SwiftSlate is built with privacy as a core architectural principle, not an afterthought.
| Concern | How SwiftSlate Handles It | |
|---|---|---|
| ๐๏ธ | Text Monitoring | Only processes text when a trigger command is detected at the end. All other typing is completely ignored. Password fields are always skipped. |
| ๐ก | Data Transmission | Text is sent only to the configured AI provider (Google Gemini, Groq, or your custom endpoint). No other servers are ever contacted. Text replacer commands never leave your device. |
| ๐ | Key Storage | API keys are encrypted with AES-256-GCM using the Android Keystore system. Encryption failures throw rather than falling back to plaintext. |
| ๐ | Analytics | None. Zero telemetry, zero tracking, zero crash reporting. |
| ๐ | Open Source | The entire codebase is open for inspection under the MIT License. |
| ๐ | Permissions | Only requires the Accessibility Service permission โ nothing else. |
| ๐พ | Backups | API keys and settings are excluded from Android cloud backups and device transfers. |
| Language | Kotlin 2.1 |
| UI | Jetpack Compose ยท Material 3 |
| Async | Kotlin Coroutines |
| HTTP | HttpURLConnection (zero external dependencies) |
| JSON | org.json (Android built-in) |
| Storage | SharedPreferences (encrypted via Android Keystore) |
| Core Service | Android Accessibility Service |
| Build System | Gradle with Kotlin DSL |
| Java Target | JDK 17 |
| Min SDK | API 23 (Android 6.0) |
| Target SDK | API 36 |
Zero third-party dependencies for networking or JSON parsing โ SwiftSlate uses only Android's built-in APIs.
com.musheer360.swiftslate/
โโโ service/
โ โโโ AssistantService.kt # Core accessibility service โ event listening,
โ # trigger detection, text replacement, inline spinner
โโโ api/
โ โโโ GeminiClient.kt # Google Gemini API client
โ โโโ OpenAICompatibleClient.kt # Unified client for Groq + any OpenAI-compatible endpoint
โ โโโ ApiClientUtils.kt # Shared utilities โ response parsing, error handling,
โ # structured output extraction, system prompt
โโโ manager/
โ โโโ KeyManager.kt # AES-256-GCM encrypted key storage, round-robin rotation,
โ โ # rate-limit tracking, invalid key detection
โ โโโ CommandManager.kt # Command CRUD, trigger matching (longest-match),
โ # prefix migration, import/export
โโโ model/
โ โโโ Command.kt # Command data class (AI or Text Replacer)
โ โโโ ProviderType.kt # Provider constants (gemini, groq, custom)
โโโ ui/
โ โโโ DashboardScreen.kt # Service status, key count, quick-start guide
โ โโโ KeysScreen.kt # API key management with live validation
โ โโโ CommandsScreen.kt # Command list, add/edit/delete with collapsible form
โ โโโ SettingsScreen.kt # Provider, model, prefix, backup/restore
โ โโโ components/ # Reusable UI components (cards, text fields, dividers)
โ โโโ theme/Theme.kt # AMOLED dark + light Material 3 color schemes
โโโ MainActivity.kt # AnimatedContent tab navigation (4 tabs)
โโโ SwiftSlateViewModel.kt # Shared ViewModel exposing managers + prefs
โโโ SwiftSlateApp.kt # Application class โ SharedPreferences pre-warming
- Android Studio (latest stable)
- JDK 17+
- Android SDK with API level 36
# Clone the repository
git clone https://github.com/Musheer360/SwiftSlate.git
cd SwiftSlate
# Build debug APK
./gradlew assembleDebug
# Output: app/build/outputs/apk/debug/app-debug.apkadb install app/build/outputs/apk/debug/app-debug.apk๐ฆ Signed release build
export KEYSTORE_FILE=/path/to/your/keystore.jks
export KEYSTORE_PASSWORD=your_keystore_password
export KEY_ALIAS=your_key_alias
export KEY_PASSWORD=your_key_password
./gradlew assembleRelease- Some apps use custom input fields that don't support Android's standard text replacement APIs. SwiftSlate includes a clipboard-based fallback, but apps like WeChat and Chrome's address bar may still not work. Most standard text fields (messaging apps, email composers, notes, etc.) work fine.
- Some OEMs restrict accessibility services. Certain manufacturers (e.g., OnePlus, Xiaomi) may hide or block third-party accessibility services in their settings UI. If SwiftSlate doesn't appear in your accessibility settings, check for a "Downloaded apps" or "Installed services" section, or try searching for it.
Contributions are welcome! Here's how to get involved:
# 1. Fork the repository, then:
git clone https://github.com/YOUR_USERNAME/SwiftSlate.git
cd SwiftSlate
# 2. Create a feature branch
git checkout -b feature/amazing-feature
# 3. Make your changes and commit
git commit -m "Add amazing feature"
# 4. Push and open a Pull Request
git push origin feature/amazing-feature- ๐งฉ New built-in commands
- ๐ค Additional AI provider integrations
- ๐จ UI improvements and new themes
- ๐ Translations for more languages
- ๐ Documentation improvements
SwiftSlate is made possible by the generous support of its sponsors. Thank you!
![]() @lifearien |
Want to see your name here? Become a sponsor โ
SwiftSlate is free, open source, and built in my spare time. If it's useful to you, consider supporting its development:
- โญ Star this repo โ it helps others discover SwiftSlate
- ๐ Sponsor on GitHub โ even a small contribution keeps the project going
This project is licensed under the MIT License โ see the LICENSE file for details.
Made with โค๏ธ by Musheer Alam
If SwiftSlate makes your typing life easier, consider giving it a โญ








