#CLIscript #Java #Javascripting #JBang #PicoCLI #script
https://foojay.io/today/java-for-scripting/
AI agents behave much more like terminal users than API clients.
So itโs not surprising that CLI tools often outperform MCP integrations for many workflows.
For Java developers this opens an interesting path:
JBang + small CLI tools as agent capabilities.
I wrote a deep dive here:
https://www.the-main-thread.com/p/ai-agents-cli-tools-jbang-java-architects
Most Java CLI tools stop at mvn compile exec:java.
That works locally. It doesnโt scale.
In this guide I show how to:
- build a fat JAR
- automate GitHub releases
- publish a JBang catalog
- install with one command
No cloning. No Maven required.
Full tutorial:
https://www.the-main-thread.com/p/ship-java-cli-jreleaser-jbang-github-release
RE: https://mastodon.social/@borkdude/116115371711348205
"Cream can run .java source files directly, compiling and caching them automatically. This makes it a fast alternative to #JBang."
Java still feels โtoo heavyโ for quick learning? @igfasouza shows how #Java25 + #JEP512, #JBang & notebooks make experimentation fastโthen connects it to real hardware via #RaspberryPi + #GraalPy.
Try the stack: https://javapro.io/2026/01/15/java-25-jep-512-jbang-notebooks-graallpy-and-raspberry-pi-for-interactive-learning/
#Agent #skills help ๐ฎ๐๐๐ผ๐บ๐ฎ๐๐ฒ ๐ฟ๐ฒ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐๐ฎ๐๐ธ๐.
Recently I used #GeminiCLI to easily create #MCP servers in #Java with #jbang & #LangChain4j
I extracted that ๐ธ๐ป๐ผ๐๐น๐ฒ๐ฑ๐ด๐ฒ into a ๐ฟ๐ฒ๐๐๐ฎ๐ฏ๐น๐ฒ SKILL.md to create more servers!
๐ช Zero Boilerplate #Java STDIO #MCP Servers with #LangChain4j and #jbang
You just need a single Java file.
JBang installed.
No build! No project structure. Nothing else.
Then configure your custom MCP server to use with your favorite #AI #Agent harness, like #geminicli & friends!
The #langchain4j project recently added a simple #MCP STDIO server.
So you don't need the big guns like
@quarkusio @micronaut & friends for simple MCP servers.
For years we accepted a trade-off: Python for scripts, Java for systems.
With JBang and Java 21, that trade-off is gone.
You can now write single-file Java scripts with near-zero friction and promote them to production without a rewrite.
Hands-on examples: HTTP servers, CLIs, async clients, matrix math.
https://www.the-main-thread.com/p/java-is-the-new-python-jbang-java-21
#Java #JBang #Java21 #DevExperience #SoftwareEngineering #JVM