A command-line interface tool written in Kotlin to quickly create and bootstrap new Android projects utilizing the DevBricksX libraries and architectural components.
- Project Generation: Scaffold a multi-module Android project ready for development using DevBricksX.
- Template-Based: Bundles the official DevBricksX Android template inside the CLI distribution.
- Developer-Friendly Template: The template project inside
template/is an actual, testable Android project aligned with the rootdevbricksx-androidproject configuration (Gradle wrapper 9.7, AGP 9.3, Kotlin 2.3.10, SDK 37, JDK 21). You can open and test it directly in Android Studio. - Flexible UI Targets:
compose(default): Jetpack Compose only (app-composeandcore).views: Android Views (XML) only (appandcore).all: Scaffolds both Android Views (XML) and Jetpack Compose app modules.
- Modular Components:
- Optional
ndkextra module (core-nativemodule with CMake and JNI glue).
- Optional
- Theme & Branding:
- Customize application theme primary color (
--theme-color). - Automatic package renaming and source code alignment.
- Customize application theme primary color (
- Full Icon Generation (SVG & PNG):
- SVG Icons: Automatically converts SVG files to Android Vector Drawables (
ic_launcher_foreground.xml) centered and scaled in 108dp canvas, renders crisp 512x512 composites for Play Store, and generates all legacy/round mipmap PNG assets. - PNG Icons: Supports transparent PNG logos (composited over the theme background) and opaque icons, generating adaptive foregrounds, Play Store 512x512 icons, and all mipmap densities.
- Fully self-contained without external dependencies (
magick,rsvg-convert, etc.).
- SVG Icons: Automatically converts SVG files to Android Vector Drawables (
Run the installer script from the root repository or inside devbricksx-cli:
# From root repository:
./install-cli.sh
# Or from devbricksx-cli directory:
cd devbricksx-cli
./install.shThe installer will:
- Check Java Environment: DevBricksX CLI requires Java 21 or higher. The installer checks your local Java runtime (
JAVA_HOMEorPATH). - Download Dedicated JRE If Needed: If no compatible Java 21+ is found on your PC, the installer automatically downloads Eclipse Adoptium Temurin JRE 21 for your OS and architecture into
~/.devbricksx/jre, ensuring the CLI always has its required JRE. You can also force a dedicated JRE with--download-jre. - Install Binary & Libraries: Deploys
devbricksxbinary into~/.devbricksx/binand libraries into~/.devbricksx/lib. - Configure Shell Auto-Completion: Automatically configures tab auto-completion for your shell (
zsh,bash,fish) and adds~/.devbricksx/binto yourPATHin~/.zshrc/~/.bashrc.
./install.sh [options]
Options:
-d, --prefix <dir> Installation target directory (default: ~/.devbricksx)
--download-jre Force download and bundle a dedicated Java 21 JRE
--no-completion Skip modifying shell profile for auto-completion
-s, --shell <shell> Specify target shell for completions (zsh, bash, fish)
-h, --help Show installer options
--uninstall Remove DevBricksX CLI from ~/.devbricksxIf you prefer manual shell completion configuration:
- Zsh:
# In ~/.zshrc export PATH="$HOME/.devbricksx/bin:$PATH" source <(devbricksx completion zsh)
- Bash:
# In ~/.bashrc export PATH="$HOME/.devbricksx/bin:$PATH" source <(devbricksx completion bash)
- Fish:
devbricksx completion fish > ~/.config/fish/completions/devbricksx.fish
cd devbricksx-cli
./gradlew installDistThe executable binary will be generated at build/install/devbricksx/bin/devbricksx.
./gradlew run --args="--help"devbricksx --helpOutput:
Usage: devbricksx [<options>] <command> [<args>]...
DevBricksX CLI - Command-line tool for creating and managing Android projects
with DevBricksX.
Options:
--version Show the version and exit
-h, --help Show this message and exit
Commands:
create Create a new Android project using DevBricksX template.
devbricksx create --helpOptions:
-n,--name <text>: Application name (e.g."My Application"). Required.-p,--package <text>: Android package name (e.g."com.example.myapp"). Required.-o,--output <text>: Output directory for the generated project (default:./<appName>).-u,--ui <text>: UI target:compose,views,all(default:compose).-e,--extra-modules <text>: Extra modules to include, comma-separated (e.g.ndk).-t,--theme-color <text>: Primary theme color hex (e.g.#008577or#3F51B5).-i,--icon <text>: Path to custom app icon file (.svgor.png).--icon-fg-color <text>: Color tint for icon foreground (hex, e.g.#FFFFFF, ornoneto preserve original colors). Defaults to#FFFFFFfor SVG icons.--icon-scale <int>: Foreground scale percentage in icon composition (1-100, default:70).-h,--help: Show command help.
- Create project with SVG icon:
devbricksx create \
-n "My App" \
-p "com.example.myapp" \
-o ./MyApp \
-u compose \
-t "#008577" \
-i /path/to/icon.svg- Create full project with PNG icon and NDK module:
devbricksx create \
-n "My App" \
-p "com.example.myapp" \
-o ./MyApp \
-u all \
-e ndk \
-t "#3F51B5" \
-i /path/to/icon.png- Create Views (XML)-only project:
devbricksx create -n "Views App" -p "com.example.viewsapp" -u viewsThe template project is located in template/. You can open and test it independently:
cd devbricksx-cli/template
./gradlew assembleDebugWhen building the CLI, the packageTemplate task packages the clean template project into a resource ZIP (template.zip) which is bundled into the CLI binary.