SwiftSlate
System-wide AI text assistant for Android — powered by Gemini and custom providers
Type a trigger like ?fix at the end of any text, in any app, and watch it get replaced with AI-enhanced content — 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).
📋 Table of Contents
- Quick Demo
- Features
- Built-in Commands
- Getting Started
- How It Works
- Custom Commands
- API Key Management
- App Screens
- Privacy & Security
- Tech Stack
- Building from Source
- Known Limitations
- Contributing
- License
⚡ Quick Demo
📝 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?"
✨ Features
🌐 Works Almost EverywhereIntegrates 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). ⚡ Instant Inline ReplacementType, trigger, done. The AI response replaces your text directly in the same field — no copy-pasting, no app switching. A spinner ( 🔑 Multi-Key RotationAdd multiple API keys for automatic round-robin rotation. If one key hits a rate limit, SwiftSlate seamlessly switches to the next. 🌙 AMOLED Dark ThemePure black ( |
🤖 Powered by Gemini & Custom ProvidersShips with Google's Gemini API ( 🎨 Custom CommandsCreate your own trigger → prompt pairs. Define 🔒 Encrypted Key StorageAPI keys are encrypted with AES-256-GCM using the Android Keystore. Your keys never leave your device unencrypted. 🛡️ Privacy-FirstNo analytics. No telemetry. No intermediary servers. Text is sent directly to the configured provider's API and only when a trigger is detected. |
🧩 Built-in Commands
SwiftSlate ships with 9 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 language code recognized by Google Translate works.
🚀 Getting Started
Prerequisites
| Requirement | Details |
|---|---|
| Android Device | Android 6.0+ (API 23 or higher) |
| API Key | Free Gemini key at aistudio.google.com, or a key from any OpenAI-compatible provider |
Installation
[!TIP] The APK is only ~1.3 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
Setup in 3 Steps
|
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 |
⚙️ How It Works
flowchart TD
A["📝 You type: 'Hello wrld, how r u ?fix'"] --> B{"🔍 Accessibility Service\ndetects trigger"}
B --> C["✂️ Extracts text before trigger:\n'Hello wrld, how r u'"]
C --> D["🔑 Selects next available\nAPI key (round-robin)"]
D --> E["🤖 Sends text + prompt\nto AI provider"]
E --> F["⏳ Shows inline spinner\n◐ ◓ ◑ ◒"]
F --> G["✅ Replaces text in-place:\n'Hello world, how are you?'"]
style A fill:#1a1a2e,stroke:#e94560,color:#fff
style B fill:#1a1a2e,stroke:#0f3460,color:#fff
style C fill:#1a1a2e,stroke:#0f3460,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 - 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
- Text Extraction — The text before the trigger is extracted and paired with the command's prompt
- 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 response, a spinner animation (
◐ ◓ ◑ ◒) replaces the text to provide visual feedback - Text Replacement — The AI 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 paste approach
🎨 Custom Commands
Go beyond the built-ins — create your own trigger → prompt pairs in the Commands tab.
How to Create One
- Open the Commands screen
- Enter a Trigger (e.g.,
?poem) - Enter a Prompt — the instruction sent to the AI
- Tap "Add Command"
Example Ideas
| 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.
🔑 API Key Management
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 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 |
[!TIP] Adding 2–3 API keys helps avoid rate limits during heavy use. Each API key has its own quota.
🖥️ App Screens
SwiftSlate has four screens accessible via the bottom navigation bar:
📊 Dashboard
|
🔑 Keys
|
📝 Commands
|
⚙️ Settings
|
🔒 Privacy & Security
[!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. |
| 📡 | Data Transmission | Text is sent only to the configured AI provider (Google Gemini or your custom endpoint). No other servers are ever contacted. |
| 🔐 | Key Storage | API keys are encrypted with AES-256-GCM using the Android Keystore system before being saved locally. |
| 📊 | 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. |
🏗️ Tech Stack
| Language | Kotlin 2.1 |
| UI | Jetpack Compose · Material 3 |
| Navigation | Navigation Compose |
| 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.
🔨 Building from Source
Prerequisites
- Android Studio (latest stable)
- JDK 17
- Android SDK with API level 36
Build
# 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.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
⚠️ Known Limitations
- 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.
🤝 Contributing
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
Ideas for Contributions
- 🧩 New built-in commands
- 🤖 Additional AI provider integrations
- 🎨 UI improvements and new themes
- 🌍 Localization / translations
- 📖 Documentation improvements
📄 License
This project is licensed under the MIT License — see the LICENSE file for details.
