@snipkode/apkit
v0.3.0
Published
Standalone CLI for SaaS APK Builder - Build Android apps with ease
Maintainers
Readme
Apkit CLI
Standalone CLI for SaaS APK Builder - Build Android apps with ease.
🚀 Installation
# Install globally
npm install -g @snipkode/apkit
# Or use via npx
npx @snipkode/apkit <command>📦 Usage
Create New Project
# Create from default template
apkit create my-app
# Create from custom template
apkit create my-app --template [email protected]:user/template.git
# Create using HTTPS
apkit create my-app --httpsInitialize in Existing Project
# Navigate to your Android project
cd my-android-project
# Initialize Apkit
apkit init
# Start developing
./dev.shCommands
| Command | Description |
|---------|-------------|
| apkit create | Create new project from template |
| apkit init | Initialize Apkit in current directory |
| apkit dev | Run development mode with hot reload |
| apkit build | Build debug APK |
| apkit build:release | Build release APK with signing |
| apkit build:aab | Build AAB for Google Play Store |
| apkit doctor | Check environment setup |
| apkit keystore | Create/manage signing keystore |
| apkit clean | Clean build artifacts |
| apkit install | Install APK to connected device |
| apkit serve | Serve IDE UI (coming soon) |
Examples
# Development mode with hot reload
apkit dev
# Build debug APK
apkit build
# Build release APK (signed)
apkit build:release
# Build AAB for Play Store
apkit build:aab
# Check environment
apkit doctor
# Create keystore
apkit keystore --create
# Clean build
apkit clean --all📁 Structure
packages/cli/
├── bin/
│ └── apkit.js # CLI entry point
├── src/
│ └── scripts/ # Embedded shell scripts
│ ├── build.sh
│ ├── dev.sh
│ ├── keystore.sh
│ ├── setup-check.sh
│ ├── install-apk.sh
│ └── clean.sh
├── package.json
└── README.md🔧 Development
# Navigate to CLI package
cd packages/cli
# Install dependencies
npm install
# Link globally for testing
npm link
# Test CLI
apkit --help
apkit init🎯 How It Works
apkit initcopies embedded scripts to your project'sscripts/directory- Wrapper scripts in project root call the scripts in
scripts/ - All build logic is in the shell scripts - CLI is just an orchestrator
- Scripts are self-contained and can run independently
📝 Script Options
build.sh
--debug, -d- Build debug APK (default)--release, -r- Build release APK--aab, -a- Build AAB bundle--no-sign- Skip signing--install, -i- Auto-install after build
dev.sh
--no-inotify- Use polling instead of inotify--interval <sec>- Polling interval--package <pkg>- App package name
keystore.sh
--create, -c- Create new keystore--info, -i- View keystore info--check, -t- Check signing tools--sign, -s- Sign APK manually
📋 Requirements
- Java 17+
- ADB (Android Debug Bridge)
- Gradle wrapper (included in Android projects)
- Optional:
inotify-toolsfor instant file watching
Install on Termux:
pkg install openjdk-17 git android-tools inotify-tools apksigner🔮 Future Features
apkit create <name>- Create new project from templateapkit serve- Serve IDE UI for web-based development- Custom templates - Support for project templates
- Plugin system - Extend CLI with custom commands
📄 License
MIT
