๐Ÿ“š Introduction

ktroid is a minimalistic CLI tool for Native Android development without Android Studio. Build, test, and deploy Android apps using just your terminal and favorite text editor.

โœจ Perfect For: Developers with low-spec hardware, terminal enthusiasts, and anyone who wants a distraction-free Android development workflow.

โš™๏ธ Installation

Download

wget https://github.com/yourusername/ktroid/releases/download/v1.4.0/ktroid.py

Make Executable

chmod +x ktroid.py && mv ktroid.py /usr/local/bin/ktroid

Verify Installation

ktroid --version

๐Ÿš€ Quick Start

Get your first Android app running in under 2 minutes:

Step 1: Setup Android SDK

ktroid setup

Step 2: Create Project

ktroid init MyFirstApp

Step 3: Build & Run

cd MyFirstApp && ktroid run
๐ŸŽ‰ Done! Your app is now running on the emulator or connected device.

๐Ÿ”ง setup - Android SDK Setup

Downloads and configures Android SDK, Command Line Tools, and essential build tools for your system.

Syntax

ktroid setup

What It Does

  • Downloads Android Command Line Tools
  • Installs latest Android SDK Platform
  • Sets up build tools and platform tools
  • Configures environment variables
  • Installs Gradle wrapper
โš ๏ธ First Time Setup: This downloads ~500MB. Make sure you have a stable internet connection.

๐Ÿ“ฆ create/init - Create New Project

Initialize a new Android project with Kotlin, Jetpack Compose, and Material 3 design.

Syntax

ktroid create ProjectName

Examples

ktroid init TodoApp

Project Structure

Creates a complete Android project with:

  • app/src/main/ - Main source directory
  • MainActivity.kt - Entry point with Jetpack Compose
  • AndroidManifest.xml - App configuration
  • build.gradle - Build configuration
  • res/ - Resources (colors, strings, themes)

๐Ÿ”จ build - Build Application

Compile your Android project into an APK file.

Syntax

ktroid build [debug|release]

Examples

ktroid build
ktroid build release

Output: APK file in app/build/outputs/apk/

โ–ถ๏ธ run - Build & Launch

Builds the app, installs on connected device/emulator, and launches it.

Syntax

ktroid run
๐Ÿ’ก One Command Magic: This is your go-to command for quick iterations. Changes code โ†’ ktroid run โ†’ see results!

๐Ÿ“ฑ emulator - AVD Management

List, start, and create Android Virtual Devices (emulators).

List Available Emulators

ktroid emulator list

Start Emulator

ktroid emulator start

Create New Emulator

ktroid emulator create Pixel_7

๐Ÿ“ฆ dep - Add Dependencies

Quickly add libraries from MavenCentral with smart search.

Syntax

ktroid dep [library-name]

Popular Examples

ktroid dep retrofit
ktroid dep coil
ktroid dep room

๐Ÿงช test - Run Tests

Execute unit tests, instrumented tests, or all tests.

Run All Tests

ktroid test

Unit Tests Only

ktroid test unit

Instrumented Tests

ktroid test instrumented

๐Ÿ“ˆ bump - Version Management

Increment app version automatically.

Bump Minor Version

ktroid bump minor

Bump Major Version

ktroid bump major

Example: 1.0.0 โ†’ 1.1.0 (minor) or 2.0.0 (major)

๐Ÿ“– More Commands: Use ktroid --help to see all 24 commands with detailed descriptions.