Scaffold development projects from your terminal โ no IDE required.
Grimoire is a lightweight CLI tool that generates production-ready projects in seconds.
Inspired by flutter create and ng new, it supports both a fully flag-based non-interactive
mode and an interactive TUI wizard with consistent, branded styling.
Supported targets: Android, Spring Boot (Gradle/Maven)
grimoire new MyApp --package com.example.myapp --lang kotlin --provider android- Multi-provider architecture โ pluggable scaffolding targets (
android,springboot) - Android: Kotlin & Java, full template support (basic, compose, empty)
- Spring Boot: Java 17+, Gradle or Maven, multiple templates
- Gradle wrapper โ reproducible builds included by default; optional system gradle fallback
- Beautiful TUI โ interactive wizard with consistent purple/violet branding
- Config persistence โ saved defaults in
~/.grimoire/config.json - Opinionated defaults โ AndroidManifest, VSCode config,
.gitignore, themes, strings - Validation built-in โ enforces valid package names and app names before writing files
- Environment checks โ
grimoire doctordetects missing tools - CI-friendly โ fully scriptable, non-interactive mode for automation
| Tool | Version | Notes |
|---|---|---|
| Go | 1.22+ | To build from source |
| Java JDK | 11+ (Android), 17+ (Spring Boot) | java must be on PATH |
| Gradle CLI | any | Optional; used to generate wrapper if present |
| Android SDK | โ | Required only to run builds locally |
| Git | โ | Optional; used for git init during creation |
git clone https://github.com/backsofangels/grimoire
cd grimoire
go build -o grimoire.exe .Scoop distribution available in v1.0.0 release.
grimoire newStep through a beautiful colored TUI to configure your project:
- App name (e.g., MyApp)
- Package name (e.g., com.example.myapp)
- Output directory
- Language (Kotlin/Java)
- Minimum SDK (Android)
- Template (basic/compose/empty)
- Gradle wrapper (use gradlew or system gradle)
- Initialize git?
- Generate VSCode config?
- Confirm and create
# Create Kotlin Android project
grimoire new MyApp \
--package com.example.myapp \
--lang kotlin \
--template basic \
--provider android
# Create Java Spring Boot project with Maven
grimoire new MyJavaApp \
--package com.example.javaapp \
--provider springboot \
--build-system maven
# Skip Gradle wrapper
grimoire new MyApp --package com.example.myapp --wrapper=falsecd MyApp
./gradlew assembleDebug # If wrapper enabled
# or
gradle assembleDebug # If using system gradle# Add Activity with Hilt DI and ViewModel
grimoire add activity --name MyScreen --di hilt --viewmodel --nav
# Add Fragment with Koin
grimoire add fragment --name MyFragment --di koin --viewmodel --nav
# Add only a ViewModel
grimoire add viewmodel --name MyViewModelSupports:
--di none | hilt | koinโ dependency injection wiring--viewmodelโ generate accompanying ViewModel--navโ add navigation graph entry--overrideโ replace existing files
grimoire doctor --fixValidates JDK, Gradle, Android SDK, and can auto-configure JAVA_HOME on Windows.
| Name | Description |
|---|---|
basic |
Activity + layout XML + ViewModel, standard project structure |
empty |
Bare MainActivity, no layout directory |
compose |
Jetpack Compose UI (Kotlin only), Compose-ready Gradle config |
| Name | Description |
|---|---|
springboot |
Spring Boot application with starter dependencies |
plain |
Plain Java application |
Generated projects follow standard Android conventions and open immediately in VSCode or Android Studio:
MyApp/
โโโ app/
โ โโโ src/main/
โ โ โโโ java/com/example/myapp/
โ โ โ โโโ MainActivity.kt
โ โ โโโ res/
โ โ โ โโโ layout/activity_main.xml
โ โ โ โโโ values/strings.xml
โ โ โ โโโ values/themes.xml
โ โ โโโ AndroidManifest.xml
โ โโโ build.gradle
โโโ build.gradle
โโโ settings.gradle
โโโ gradle.properties
โโโ .vscode/
โ โโโ settings.json
โ โโโ extensions.json
โโโ .gitignore
- Run unit and fast tests:
go test ./...- Integration tests (resource-heavy):
- Integration tests are under the
cmd/package and exercise the interactive TUI and end-to-end generator flow. - These tests are skipped automatically in CI: the test code checks the
CIenvironment variable and callst.Skip()when it is set. Most CI providers (GitHub Actions, GitLab CI, etc.) setCI=trueby default, so heavy tests won't run in CI pipelines. - To run integration tests locally (they require Java and Gradle for smoke builds):
- Integration tests are under the
# Run a specific integration test by name
go test ./cmd -run TestNewIntegrationCLI -v
go test ./cmd -run TestCtrlCCancelFlow -v
# Or run all tests in the cmd package (including integration tests)
go test ./cmd -v- Notes:
- Ensure
java(JDK) andgradleare on yourPATHbefore running integration tests that build generated projects. - Integration tests create temporary directories and clean up after themselves; they're intended for local verification only.
- Ensure
Format code:
gofmt -w .Templates are in internal/providers/android/templates/ and use Go's text/template.
The provider interface lives in internal/providers/provider.go โ implement it to add new targets.
- Android provider โ Kotlin & Java
- Gradle wrapper generation
- Smoke-tested end-to-end (
assembleDebug) -
grimoire doctorโ environment preflight checks (JDK, Gradle, Android SDK) -
grimoire newinteractive wizard (TUI) -
grimoire add activity|fragment|viewmodel - Jetpack Compose template
- Spring Boot provider
- Scoop distribution (v1.0.0)
- Fork the repo and create a feature branch
- Follow Go 1.22+ conventions โ run
gofmt -w .before committing - Add tests for new functionality and verify with
go test ./... - Open a pull request with a clear description
Apache 2.0 โ see LICENSE