mirror of
https://github.com/github/awesome-copilot.git
synced 2026-04-11 10:45:56 +00:00
Add complete Java cookbook matching the pattern of existing .NET, Go, Node.js, and Python cookbooks. All 7 recipes included: - Ralph Loop: Autonomous AI task loops with JBang - Error Handling: try-with-resources, ExecutionException, timeouts - Multiple Sessions: Parallel sessions with CompletableFuture - Managing Local Files: AI-powered file organization - PR Visualization: Interactive PR age charts - Persisting Sessions: Save/resume with custom IDs - Accessibility Report: WCAG reports via Playwright MCP Each recipe includes both markdown documentation and a standalone JBang-runnable Java file in recipe/.
Runnable Recipe Examples
This folder contains standalone, executable Java examples for each cookbook recipe. Each file can be run directly with JBang — no project setup required.
Prerequisites
- Java 17 or later
- JBang installed:
# macOS (using Homebrew)
brew install jbangdev/tap/jbang
# Linux/macOS (using curl)
curl -Ls https://sh.jbang.dev | bash -s - app setup
# Windows (using Scoop)
scoop install jbang
For other installation methods, see the JBang installation guide.
Running Examples
Each .java file is a complete, runnable program. Simply use:
jbang <FileName>.java
Available Recipes
| Recipe | Command | Description |
|---|---|---|
| Error Handling | jbang ErrorHandling.java |
Demonstrates error handling patterns |
| Multiple Sessions | jbang MultipleSessions.java |
Manages multiple independent conversations |
| Managing Local Files | jbang ManagingLocalFiles.java |
Organizes files using AI grouping |
| PR Visualization | jbang PRVisualization.java |
Generates PR age charts |
| Persisting Sessions | jbang PersistingSessions.java |
Save and resume sessions across restarts |
| Ralph Loop | jbang RalphLoop.java |
Autonomous AI task loop |
| Accessibility Report | jbang AccessibilityReport.java |
WCAG accessibility report generator |
Examples with Arguments
PR Visualization with specific repo:
jbang PRVisualization.java github/copilot-sdk
Managing Local Files with specific folder:
jbang ManagingLocalFiles.java /path/to/your/folder
Ralph Loop in planning mode:
jbang RalphLoop.java plan 5
Why JBang?
JBang lets you run Java files as scripts — no pom.xml, no build.gradle, no project scaffolding. Dependencies are declared inline with //DEPS comments and resolved automatically.