| Crates.io | kopi |
| lib.rs | kopi |
| version | 0.2.3 |
| created_at | 2025-07-30 07:23:51.913923+00 |
| updated_at | 2025-10-29 14:08:49.226844+00 |
| description | Kopi is a JDK version management tool |
| homepage | |
| repository | https://github.com/kopi-vm/kopi |
| max_upload_size | |
| id | 1773207 |
| size | 4,551,735 |
Kopi is a JDK version management tool written in Rust that integrates with your shell to seamlessly switch between different Java Development Kit versions.
Full documentation at https://kopi-vm.github.io/
brew install kopi-vm/tap/kopi
# Import GPG key
curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get\&search=0xD2AC04A5A34E9BE3A8B32784F507C6D3DB058848 | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/kopi-archive-keyring.gpg > /dev/null
# Add repository
echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/kopi-archive-keyring.gpg] \
https://kopi-vm.github.io/ppa-kopi $(lsb_release -cs) main" | \
sudo tee /etc/apt/sources.list.d/kopi.list > /dev/null
# Install
sudo apt update && sudo apt install kopi
winget install kopi
scoop bucket add kopi https://github.com/kopi-vm/scoop-kopi
scoop install kopi
cargo install kopi
# Initial setup
kopi setup
# Add to PATH (in ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish)
export PATH="$HOME/.kopi/shims:$PATH"
# Install JDKs
kopi install 21 # Latest JDK 21 (Eclipse Temurin by default)
kopi install temurin@17 # Specific distribution and version
kopi install corretto@11.0.21 # Exact version
# List installed JDKs
kopi list
# Set versions
kopi global 21 # Set global default
kopi local 17 # Set project version (creates .kopi-version)
kopi shell 11 # Temporary shell override
# Show current JDK
kopi current
kopi which java # Path to java executable
# Search available JDKs
kopi search 21 # Search for JDK 21 variants
kopi search corretto # List all Corretto versions
# Uninstall JDKs
kopi uninstall temurin@21
# Create version file for project
cd my-project
kopi local 17 # Creates .kopi-version
# Kopi automatically switches when entering directories with version files
cd my-java-21-project # Automatically switches to Java 21
cd my-java-17-project # Automatically switches to Java 17
cargo install sccachegit clone https://github.com/kopi-vm/kopi.git
cd kopi
# Development build
cargo build
# Run tests
cargo test
# Release build
cargo build --release
When completing any coding task:
cargo fmt to format codecargo clippy --all-targets -- -D warnings to check for improvementscargo test --lib --quiet to run unit testsAll commands must pass without errors before considering work complete.
We welcome contributions! Please see our Contributing Guidelines for details.
Kopi is licensed under the Apache License 2.0. See LICENSE for details.
Built with ❤️ by the Kopi team