KRepo is a lightweight, high-performance artifact repository manager built with Kotlin and Spring Boot. Inspired by Reposilite, it provides a simple way to host your Maven artifacts using either local file storage or Amazon S3.
- Multi-Storage Support: Switch between Local File System and S3-compatible storage.
- Stateless Auth: Secure your deployments with JWT-based authentication.
- Deploy Tokens: Manage granular access for CI/CD pipelines (supports
tk_prefixes). - Console Interface: Manage users, tokens, and repositories directly from the terminal.
- Modern Stack: Built with Kotlin 2.3.0, Java 25, and Spring Data JPA.
- Java 25 or higher.
- PostgreSQL (for production) or H2 (for testing).
Clone the repository and build the project using Gradle:
./gradlew bootRunThe application will start on http://localhost:8080 by default.
KRepo includes an interactive console that starts with the application. Use it to set up your first user and tokens:
Admin user is created automatically with a random password.
- Generate a Deploy Token:
token-generate admin my-token READ WRITE - List Repositories:
repo-list
Once the application is running, you can manage everything via the terminal:
repo-list: List all managed repositories.repo-set-visibility <name> <PUBLIC|PRIVATE|HIDDEN>: Change who can see/access the repository.
user-list: List all registered users and their roles.user-create <username> <password> <ROLES...>: Create a new account (e.g.,ROLE_USER,ROLE_ADMIN).user-delete <username>: Remove a user account.user-promote <username>: Grant a user theROLE_ADMINrole.user-demote <username>: Remove theROLE_ADMINrole from a user.
token-generate <username> <token_name> <PERMS...>: Generate a deploy token (e.g.,READ,WRITE).token-reset <username> <token_name>: Revoke the old token and generate a new raw value.
help: Show all available commands.exit: Safely shutdown the application.
KRepo can be configured via src/main/resources/application.yml.
You can choose your preferred storage provider:
krepo:
storage:
provider: fs
fs:
root-path: ./data/repositorieskrepo:
storage:
provider: s3
s3:
bucket-name: my-krepo-bucket
region: us-east-1
access-key: ${S3_ACCESS_KEY}
secret-key: ${S3_SECRET_KEY}To use KRepo in your Gradle project, add the following to your build.gradle.kts:
repositories {
maven {
url = uri("http://your-domain.com/releases")
}
}publishing {
repositories {
maven {
url = uri("http://your-domain.com/releases")
credentials {
username = "admin"
password = "tk_your-deploy-token" // Tokens must start with tk_
}
}
}
}gg.aquatic.krepo.repository: Core logic for managing repository entities and resources.gg.aquatic.krepo.storage: Implementation of FS and S3 storage providers.gg.aquatic.krepo.security: JWT and Token-based authentication logic.gg.aquatic.krepo.ConsoleCommands: Interactive CLI management tool.
./gradlew testGot questions, need help, or want to showcase what you've built with KEvent? Join our community!
- Discord: Join the Aquatic Development Discord
- Issues: Open a ticket on GitHub for bugs or feature requests.