jar-cart is a no-build Java dependency manager designed to fetch, cache, and run JAR artifacts instantly. It eliminates the need for Maven or Gradle while providing a fast, efficient way to manage Java dependencies with minimal setup.
Key Features:
Lightning-Fast Performance: Leverages Content Addressable Storage (CAS) and Hard-Linking to deliver near-instant dependency reuse without duplicating disk usage.
Optimized Deployment: Supports compression and stripping of debug and native code through declarative configuration in jar-cart.json or jar-cart.xml.
Isolated Runtimes: Manages project-specific JDK versions, ensuring each project runs with the exact Java version it requires.
Target Audience and Benefits:
Ideal for developers and DevOps teams managing Java dependencies. It provides a fast, efficient alternative to traditional build systems, reducing friction in dependency management while maintaining high performance and flexibility.
jar-cart is available via the Windows Package Manager (winget). Install using winget install Sudhanshu-Ambastha.jar-cart to quickly deploy this powerful dependency manager for Java projects.
README
jar-cart
A fast, cross-platform CLI tool written in Go to fetch, cache, and execute Java artifacts using an enterprise-grade dependency pipeline.
🛒 Overview
jar-cart is a modern, zero-configuration package manager and runner for the Java ecosystem.
By leveraging native filesystem Hard Links, a Content Addressable Storage (CAS) cache, and Isolated Runtime Provisioning, jar-cart eliminates the friction of traditional build systems while providing near-instant dependency reuse and project-specific Java runtimes.
Note: This is version of the manager. See the CHANGELOG for recent updates.
🚀 Key Features
⚡ Performance & Efficiency
Content Addressable Storage (CAS): Artifacts are downloaded once and shared across all projects.
Hard-Linking: Dependencies are linked instantly into projects without duplicating disk usage.
Minimal Runtime Packaging: Automatically generate lightweight custom Java runtimes with jlink, reducing standard 290MB+ JDK distributions to compact standalone runtimes (~12MB, depending on included modules).
One-Command Deployment: Build optimized applications and runtime images using a unified optimization workflow.
Project-Level Version Locking: Pin a specific JDK version per project. jar-cart automatically provisions and manages isolated runtimes so every project runs with the exact Java version it was built against.
Automatic Runtime Discovery: Detects and uses the correct project manifest (jar-cart.json or jar-cart.xml) for consistent JDK resolution.
🏗️ Multi-Module Workspaces
Monorepo & Enterprise Scale: Group multiple independent modules using jar-cart.workspace.json.
Topological Ordering: Automatically resolves module dependencies and compiles projects in correct order.
Workspace-Wide Operations: Synchronize dependencies, audit vulnerabilities, and run builds across all modules with single commands (jc sync, jc audit, jc build).
🛠 Reverse Engineering & Patching
Integrated Decompilation: Automatically provisions and manages Vineflower, CFR, and Procyon.
Decompiler-to-Build Workflow: Modify decompiled applications and rebuild them into executable JARs using the native jar-cart toolchain.
🧠 Intelligent CLI Experience
Automatic Entry Point Detection: Automatically discovers the application's main() class.
Flexible Target Resolution: Intelligently resolves source files, directories, class names, or JAR files for execution.
NPM-Style Argument Forwarding: Use -- to pass arguments directly to your application without CLI conflicts.
Non-Intrusive Update Notifications: Deferred update checks display clean notifications after command execution without interrupting output.
Efficient Update Checks: Uses ETag-based caching with a 30-minute cache window to minimize network usage and improve rate-limit compliance.
jar-cart run src -- --server
jar-cart optimize dist/app.jar dist/my-runtime
📜 Custom Script Runner
Lifecycle Scripts: Define reusable commands such as build, test, or lint in your manifest. jar-cart automatically executes pre- and post- lifecycle hooks.
Use the official install scripts or package managers to get started instantly:
Windows (WinGet):
winget install Sudhanshu-Ambastha.jar-cart
Linux / macOS (Homebrew):
If you use Homebrew, you can install jar-cart using your personal tap:
Add the tap
brew tap Sudhanshu-Ambastha/tap
Trust the tap (one-time security requirement)
brew trust Sudhanshu-Ambastha/tap
Install the latest version
brew install jar-cart
> Note: If you need to pin to a specific minor release line (e.g., v0.4.x), you can install the versioned formula: brew install jar-cart@0.4.
Initialize a Project
jar-cart init my-app
cd my-app
📋 Commands
Command
Description
init
Creates an interactive project layout with JDK locking.
ls-java
Lists all managed JDK runtimes.
cache list/ls
Displays cached artifacts and storage usage.
cache remove/rm
Removes cached JARs and JDKs using fuzzy matching.
cache-clear
Clears all cached artifacts and registry data.
search
Searches Maven Central for packages.
sync
Synchronizes dependencies and provisions project runtimes.
add
Adds a dependency to the project manifest.
remove
Removes a dependency from the project manifest.
audit
Checks project dependencies for known vulnerabilities.
convert
Converts manifests between supported formats (json/xml).
run [-- args...]
Compiles and runs a project, forwarding application arguments.
run-jar [-- args...]
Runs a JAR, forwarding application arguments.
decompile
Decompiles JARs using Vineflower, CFR, or Procyon.
watch [-- args...]
Watches, recompiles, and restarts while preserving application arguments.
build
Packages the project into a portable Fat JAR.
optimize
Creates a custom, manifest-configured standalone runtime.
self-update [version]
Updates jar-cart or switches to a specific release.
help
Displays this documentation.
🏗 Architecture
Isolated Java Runtimes
jar-cart bypasses the system's global PATH and JAVA_HOME. By locking your project to a specific JDK version in your jar-cart.json, the tool manages a local, immutable toolchain for each project, guaranteeing identical behavior across all environments.
Content Addressable Storage (CAS)
Every artifact is stored in ~/.jar-cart/cache, enabling efficient reuse across multiple projects.
Hard-Linking
jar-cart creates hard links from the global cache into the project's lib/ directory, providing near O(1) dependency resolution without duplicating disk usage.
🎯 Philosophy
jar-cart is designed for developers who value:
Speed: Instant builds and execution.
Reproducibility: Projects run the same way on every machine.
Simplicity: No global environment variables required.
Minimalism: Low disk usage and zero unnecessary complexity.
License
jar-cart is licensed under the .
Built with ⚡ in Go.
Designed for developers who value performance and simplicity. 🏎️💨✨