https://github.com/reapercanuk39/termux-kotlin-app
π Termux Android Terminal Emulator - Fully converted to Kotlin! A modern, type-safe fork of the official termux-app with 100% Kotlin codebase.
https://github.com/reapercanuk39/termux-kotlin-app
android android-app android-terminal bash kotlin kotlin-android linux shell terminal terminal-app terminal-emulator termux termux-app termux-kotlin
Last synced: 5 months ago
JSON representation
π Termux Android Terminal Emulator - Fully converted to Kotlin! A modern, type-safe fork of the official termux-app with 100% Kotlin codebase.
- Host: GitHub
- URL: https://github.com/reapercanuk39/termux-kotlin-app
- Owner: reapercanuk39
- License: other
- Created: 2026-01-13T02:41:58.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-16T16:22:42.000Z (5 months ago)
- Last Synced: 2026-01-16T17:20:19.512Z (5 months ago)
- Topics: android, android-app, android-terminal, bash, kotlin, kotlin-android, linux, shell, terminal, terminal-app, terminal-emulator, termux, termux-app, termux-kotlin
- Language: Kotlin
- Size: 112 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# π Termux Kotlin App
[](https://github.com/reapercanuk39/termux-kotlin-app/actions/workflows/ci.yml)
[](https://github.com/reapercanuk39/termux-kotlin-app/actions/workflows/release.yml)
[](https://github.com/reapercanuk39/termux-kotlin-app/releases)
[](https://github.com/reapercanuk39/termux-kotlin-app/releases/latest)
[](https://kotlinlang.org/)
[](https://www.android.com/)
[](LICENSE.md)
[](https://github.com/termux/termux-app)
**The official Termux Android terminal emulator, fully converted to Kotlin!**
[Features](#features) β’ [Installation](#installation) β’ [Building](#building) β’ [Contributing](#contributing) β’ [Original Project](#original-project)
---
## π± What is Termux?
**Termux** is a powerful **Android terminal emulator** and **Linux environment** app that works directly with no rooting or setup required. It provides a complete Linux environment on your Android device with access to:
- π§ **Linux shell** (bash, zsh, fish)
- π¦ **Package manager** (apt/pkg) with thousands of packages
- π **Programming languages** (Python, Node.js, Ruby, Go, Rust, C/C++)
- π§ **Development tools** (git, vim, nano, ssh, rsync)
- π **Networking utilities** (curl, wget, nmap, netcat)
## β¨ What is Termux Kotlin App?
This repository is a **complete Kotlin conversion** of the official [termux-app](https://github.com/termux/termux-app). Every Java file has been meticulously converted to idiomatic Kotlin while maintaining 100% compatibility with the original app.
### π― Why Kotlin?
| Feature | Benefit |
|---------|---------|
| **Null Safety** | Compile-time null checks prevent NullPointerExceptions |
| **Concise Syntax** | ~40% less boilerplate code |
| **Type Inference** | Cleaner, more readable code |
| **Extension Functions** | Enhanced API without inheritance |
| **Coroutines Ready** | Modern async programming support |
| **Interoperability** | Seamless Java library compatibility |
## π Conversion Statistics
| Component | Java Files Converted | Kotlin Files Created |
|-----------|---------------------|---------------------|
| **app** | 40+ | 40+ |
| **terminal-emulator** | 15+ | 15+ |
| **terminal-view** | 10+ | 10+ |
| **termux-shared** | 80+ | 80+ |
| **Total** | **145+** | **145+** |
## π Features
All original Termux features are preserved:
- β
**Full Linux terminal** with touch/keyboard support
- β
**Package management** via apt (pkg)
- β
**Session management** with multiple terminal tabs
- β
**Customizable** extra keys row
- β
**Styling support** via Termux:Styling
- β
**Plugin ecosystem** (Termux:API, Termux:Boot, Termux:Widget, etc.)
- β
**Hardware keyboard** support with shortcuts
- β
**Background execution** via Termux:Tasker
- β
**URL handling** and file sharing
### π Kotlin-Exclusive Features
New features only available in the Kotlin version:
| Feature | Description |
|---------|-------------|
| π¨ **Jetpack Compose UI** | Modern declarative UI for settings and dialogs |
| π **Command Palette** | VS Code-style fuzzy command search (Ctrl+Shift+P) |
| π **Split Terminal** | Side-by-side or top/bottom terminal panes |
| π **SSH Manager** | Save and manage SSH connection profiles |
| π **Command History** | Searchable command history with statistics |
| β‘ **Kotlin Coroutines** | Efficient async operations with Flow |
| π **Dependency Injection** | Hilt for clean architecture |
| πΎ **DataStore** | Modern preferences with reactive updates |
| π **Profile System** | Named profiles with theme, font, shell, and env vars |
| ποΈ **Theme Gallery** | 10+ built-in themes with live preview |
| πΎ **Package Backup** | Full backup/restore of packages, repos, and dotfiles |
| π©Ί **Package Doctor** | Health checks with auto-repair suggestions |
| π οΈ **termuxctl CLI** | Unified CLI for backup, doctor, and profile management |
| π± **Integrated Device API** | Built-in Termux:API - no separate APK needed |
### π± Integrated Device API (No Separate APK!)
Unlike standard Termux which requires installing the separate **Termux:API** APK, the Kotlin version has device APIs **built directly into the main app**:
```bash
# Battery status
termuxctl device battery
termuxctl device battery --json --extended
# List available APIs
termuxctl device list
# Coming soon: location, sensors, clipboard, camera, wifi, and more
termuxctl device location --provider gps
termuxctl device sensor --name accelerometer
```
**Features:**
- β
**Zero Setup** - APIs work immediately after install
- β
**Coroutine-Based** - Efficient async operations
- β
**Type-Safe** - Sealed Result types and error handling
- β
**Unified Permissions** - Integrated permission manager
See [ARCHITECTURE.md](ARCHITECTURE.md#-integrated-device-api) for the full API list and implementation details.
### ποΈ Modern Architecture
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Compose UI Layer β
β (Settings, Command Palette, SSH Manager, Dialogs) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β ViewModels + StateFlow β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Repositories β
β (Settings, Sessions, History, SSH Profiles, Permissions) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Core Modules β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββ β
β β core/api β β core/logging β β core/permissions β β
β β Sealed Types β βTermuxLogger β β PermissionManager β β
β β Result β β File Logging β β Activity Result API β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββ β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββ β
β βcore/terminal β β core/plugin β β core/deviceapi β β
β β EventBus β β Plugin API β β Battery, Location β β
β β Flow Events β β Versioning β β Sensors, Camera... β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β DataStore / Coroutines / Hilt DI β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### Core Modules
| Module | Description |
|--------|-------------|
| `core/api` | Type-safe `Result` and sealed error hierarchies |
| `core/logging` | Centralized logging with file output and Flow |
| `core/permissions` | Unified permission handling with coroutines |
| `core/terminal` | Flow-based event bus replacing callbacks |
| `core/plugin` | Stable plugin API with semantic versioning |
| `core/deviceapi` | Integrated device APIs (battery, location, sensors, etc.) |
| `ui/settings` | Material 3 Compose settings with DataStore |
| `pkg/backup` | Package backup/restore manager |
| `pkg/doctor` | Package health diagnostics and auto-repair |
### π¨ Built-in Themes
10 beautiful themes included out of the box:
| Theme | Author | Description |
|-------|--------|-------------|
| **Dark Steel** | Termux Kotlin | Signature dark theme with steel blue accents |
| **Molten Blue** | Termux Kotlin | GitHub-inspired dark theme |
| **Obsidian** | Termux Kotlin | VS Code-inspired dark theme |
| **Dracula** | Zeno Rocha | Popular dark theme |
| **Nord** | Arctic Ice Studio | Arctic north-bluish palette |
| **Solarized Dark** | Ethan Schoonover | Classic precision colors |
| **Solarized Light** | Ethan Schoonover | Light variant |
| **Gruvbox Dark** | morhetz | Retro groove palette |
| **Gruvbox Light** | morhetz | Light variant |
| **High Contrast** | Termux Kotlin | Maximum readability |
### πΎ Package Management
Advanced package management features that surpass standard Termux:
```bash
# Create a full backup
termuxctl backup create --type full
# Restore with dry-run preview
termuxctl backup restore backup.json --dry-run
# Run package health diagnostics
termuxctl pkg doctor
# Auto-repair issues
termuxctl pkg doctor --auto-repair
```
## π₯ Installation
### Download APK
Download the latest release APK from the [Releases](https://github.com/reapercanuk39/termux-kotlin-app/releases) page.
Choose the appropriate variant for your device:
- `arm64-v8a` - Modern 64-bit phones (most devices)
- `armeabi-v7a` - Older 32-bit phones
- `x86_64` - 64-bit emulators/ChromeOS
- `x86` - 32-bit emulators
- `universal` - Works on all (larger file size)
### Build from Source
See [Building](#building) section below.
## π¨ Building
### Prerequisites
- **JDK 17** or higher
- **Android SDK** with Build Tools
- **Android NDK** (for native components)
### Build Commands
```bash
# Clone the repository
git clone https://github.com/reapercanuk39/termux-kotlin-app.git
cd termux-kotlin-app
# Build debug APK
./gradlew assembleDebug
# Build release APK (requires signing)
./gradlew assembleRelease
# APKs will be in app/build/outputs/apk/
```
### Build Variants
| Variant | Description |
|---------|-------------|
| `debug` | Development build with debugging enabled |
| `release` | Production build (requires signing) |
## π Related Repositories
| Repository | Description |
|------------|-------------|
| [termux/termux-app](https://github.com/termux/termux-app) | π Original Termux app (Java) |
| [reapercanuk39/termux-app](https://github.com/reapercanuk39/termux-app) | π΄ My fork of official repo |
| [termux/termux-packages](https://github.com/termux/termux-packages) | π¦ Package build scripts |
| [termux/termux-api](https://github.com/termux/termux-api) | π Android API access plugin |
## π€ Contributing
Contributions are welcome! This project follows the same contribution guidelines as the original Termux project.
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit changes (`git commit -m 'Add amazing feature'`)
4. Push to branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
### Code Style
- Follow [Kotlin coding conventions](https://kotlinlang.org/docs/coding-conventions.html)
- Use meaningful variable/function names
- Add KDoc comments for public APIs
- Prefer immutable (`val`) over mutable (`var`)
## π Original Project
This is a Kotlin conversion of the official **Termux** project:
- **Original Repository**: [github.com/termux/termux-app](https://github.com/termux/termux-app)
- **Original Authors**: [Termux Developers](https://github.com/termux)
- **License**: [GPLv3](LICENSE.md)
All credit for the original implementation goes to the Termux team. This conversion aims to modernize the codebase while maintaining full compatibility.
## π License
```
Termux Kotlin App - Android terminal emulator (Kotlin version)
Copyright (C) 2024 Termux Developers & Contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
```
---
**Keywords**: `termux` `termux-app` `termux-kotlin` `android-terminal` `terminal-emulator` `linux-android` `kotlin-android` `android-app` `terminal` `shell` `bash` `linux` `android-terminal-emulator` `termux-android` `kotlin-conversion`
Made with β€οΈ by [reapercanuk39](https://github.com/reapercanuk39)
β **Star this repo** if you find it useful!