Java Dev Assist is an expert AI assistant extension for the Gemini CLI, specializing in Java 17+, Quarkus, and Spring Boot development. It assists developers with code reviews, debugging stack traces, managing dependencies, and enforcing architectural boundaries.
- Stack Specialization: Optimized for Modern Java (17+), Quarkus, and Spring Boot.
- Context Awareness: Automatically detects build systems (Maven/Gradle) and project frameworks to provide relevant suggestions.
- Safety First: Prioritizes non-destructive analysis and asks for confirmation before making changes.
- Architectural Guardrails: Includes specific tools to enforce domain boundaries (e.g., keeping DTOs out of Service layers).
To install this extension from the repository:
gemini extensions install https://github.com/grzegorz-golowicz/java-dev-assist-extensionTo install locally for development:
gemini extensions install .To update the extension after making changes:
gemini extensions uninstall java-dev-assist-extension && gemini extensions install .Description: Displays the main help menu and index of available commands. Usage:
/javaDescription: Creates or updates README.md for the analyzed Java project using either README.guidelines.md (if present) or the built-in defaults. Usage:
/java:readmeNotes:
- Only AI-managed blocks wrapped by
<!-- AI:START -->and<!-- AI:END -->are updated; manual content stays untouched. - Output follows a neutral, technical tone and defaults to a conservative structure when no guidelines file exists.
Description: Lints the API contract for standards compliance and consistency. Supports OpenAPI (YAML/JSON) or Java controller/DTO analysis. Usage:
/java:api:lintOutput:
- Contract source and location.
- Standards violations (MUST-FIX/WARN).
- Consistency drift (Dominant conventions vs deviations).
- Recommended actions.
Description: Analyzes Java stack traces to identify root causes and propose concrete fixes. Usage:
/java:stacktrace <paste_your_stacktrace_here>Output:
- Root cause analysis.
- Most likely failing component.
- Recommended immediate checks and fixes.
Description: Smart code review assistant. Analyzes git diff for logical risks, security vulnerabilities, regressions, and missing tests. It avoids style nitpicks to focus on high-value feedback.
Usage:
# Review current unstaged changes
/java:review
# Review changes against the previous commit
/java:review HEAD~1Output:
- Risk assessment (High/Medium/Low).
- Evidence from the code.
- Recommended actions (Must-do, Should-do).
Description: Analyzes project dependencies (Maven/Gradle). Checks for version conflicts, outdated libraries, and known security vulnerabilities. Usage:
/java:depsDescription: Enforces architectural boundaries. Currently focuses on the rule that DTO types must not appear in Service method signatures. Why: This ensures business logic remains agnostic to the transport layer (REST, gRPC, etc.). Usage:
/java:boundaryOutput:
- Confirmed violations (Service methods accepting/returning DTOs).
- Suspected violations.
- Refactoring recommendations.
- Safety First: We verify before we act. Destructive commands require user confirmation.
- No "Magic": We explain why a change is suggested. We don't generate massive blocks of code without understanding the context.
- Context Aware: We read
pom.xmlorbuild.gradlefirst to tailor advice to your specific stack.
The java:readme command determines whether a README.guidelines.md file is available and applies its structure. If not, it falls back to a default order: Project Overview, Tech Stack, Build & Run, Project Structure, Configuration, and optional Limitations/Notes. Only the AI-managed block below is updated automatically; anything outside remains manual.
TODO: Summarize the analyzed Java project's purpose based on build configuration and visible source layout.
TODO: Note the detected build tool (Maven/Gradle), Java version, and frameworks (e.g., Spring Boot, Quarkus) inferred from dependencies.
TODO: Provide the exact build/run commands observed (e.g., ./mvnw spring-boot:run, ./gradlew quarkusDev). Leave TODO if not discoverable.
TODO: Outline key modules or directories in the repository using visible paths.
TODO: List main configuration files (e.g., application.properties, application.yml) and any notable settings surfaced in the codebase.
TODO: Capture known constraints or gaps; if unknown, keep TODO.
To verify that java:readme produced an English README with non-empty AI-managed content and markers, run:
./scripts/readme-validation.shGEMINI.md: System instructions and agent persona.gemini-extension.json: Extension manifest.commands/: TOML definitions for each command.