{"id":14969494,"url":"https://github.com/revxrsal/lamp","last_synced_at":"2026-02-06T08:18:32.911Z","repository":{"id":38215633,"uuid":"407667490","full_name":"Revxrsal/Lamp","owner":"Revxrsal","description":"A modern annotations-driven commands framework for Java and Kotlin ","archived":false,"fork":false,"pushed_at":"2025-05-03T12:43:34.000Z","size":3293,"stargazers_count":271,"open_issues_count":3,"forks_count":48,"subscribers_count":6,"default_branch":"v4","last_synced_at":"2025-05-16T10:04:27.293Z","etag":null,"topics":["annotations","bukkit","bungeecord","cli","command-line","commands","fabricmc-library","java","jda","jda-command-handler","kotlin","library","minecraft","minestom-library","spigot","sponge","velocity"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Revxrsal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Revxrsal","ko_fi":"revxrsal"}},"created_at":"2021-09-17T20:10:10.000Z","updated_at":"2025-05-12T16:09:38.000Z","dependencies_parsed_at":"2023-11-10T14:20:01.652Z","dependency_job_id":"e1508091-5537-4104-926e-40f5b9afc0a7","html_url":"https://github.com/Revxrsal/Lamp","commit_stats":{"total_commits":784,"total_committers":16,"mean_commits":49.0,"dds":"0.10459183673469385","last_synced_commit":"a0d0f6ebfe989f0c74be7057ec665227e7d364c7"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Revxrsal%2FLamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Revxrsal%2FLamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Revxrsal%2FLamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Revxrsal%2FLamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Revxrsal","download_url":"https://codeload.github.com/Revxrsal/Lamp/tar.gz/refs/heads/v4","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509477,"owners_count":22082891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotations","bukkit","bungeecord","cli","command-line","commands","fabricmc-library","java","jda","jda-command-handler","kotlin","library","minecraft","minestom-library","spigot","sponge","velocity"],"created_at":"2024-09-24T13:41:56.530Z","updated_at":"2025-10-24T15:31:43.022Z","avatar_url":"https://github.com/Revxrsal.png","language":"Java","funding_links":["https://github.com/sponsors/Revxrsal","https://ko-fi.com/revxrsal","https://www.paypal.me/Recxrsion"],"categories":[],"sub_categories":[],"readme":"# Lamp\n\n[![Discord](https://discord.com/api/guilds/939962855476846614/widget.png)](https://discord.gg/pEGGF785zp)\n[![Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/io/github/revxrsal/lamp.common/maven-metadata.xml.svg?label=maven%20central\u0026colorB=brightgreen)](https://search.maven.org/artifact/io.github.revxrsal/lamp.common)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build](https://github.com/Revxrsal/Lamp/actions/workflows/build.yml/badge.svg)](https://github.com/Revxrsal/Lamp/actions/workflows/build.yml)\n[![CodeFactor](https://www.codefactor.io/repository/github/revxrsal/lamp/badge)](https://www.codefactor.io/repository/github/revxrsal/lamp)\n\n[**Documentation**](https://foxhut.gitbook.io/lamp-docs)\n\nWelcome to Lamp, the versatile and powerful command framework designed for modern Java and Kotlin applications. Whether\nyou're building plugins for Minecraft servers, integrating with Discord, or creating command-line tools, Lamp provides a\nrobust solution with a clean, idiomatic API.\n\n## Core Features\n\n- **Multi-Platform Support**: Easily integrate with various platforms including Bukkit, BungeeCord, Sponge, Velocity,\n  JDA, Minestom, and more.\n- **Command Management**:\n    - Define commands using simple annotations and manage them effortlessly.\n    - Use spaces to define subcommands easily\n    - Have multiple variants of the same command\n    - Define parameters that come in the middle of the command\n- **Advanced Parameter Handling**: Support for context-based parameters, custom parameter types, and multiple parameter\n  variants.\n- **Optional parameters**: Define optional parameters and default values easily with `@Optional` and `@Default`\n- **Flags and switches**:\n  - Define Unix-style switches (`--switch` and `-s`) and flags (`--value \u003cvalue\u003e` or `-v \u003cvalue\u003e`)\n  - Use shorthand-syntax `-s -p -r` as `-spr` \n- **Response Handling**: Configure how command responses are processed with flexible `ResponseHandlers`.\n- **Dependency Injection**: Inject dependencies directly into command classes using a simple builder pattern.\n- **Context Resolving**: Use context resolvers to handle complex command input scenarios.\n- **Command Permissions**: Use built-in platform permissions, or define your own permission implementation with custom annotations.\n- **Modular Design with Visitors**: Extend Lamp’s functionality through modular visitors for dynamic feature additions.\n- **Custom annotation support**: Lamp allows you to create custom annotations and customize their behaviors.\n- **Fool-proof**: Lamp has been designed to reduce user error as much as possible. It uses idiomatic APIs, immutability,\n  and builders, to ensure you never run into bugs. Combined with extensive compiler annotations that will help you catch\n  any problems at compile-time\n\n## Command Examples\n\n```java\n@Command(\"greet user\")\n@Description(\"Sends a greeting message\")\npublic void greet(CommandActor actor, @Default(\"World\") String name) {\n    actor.reply(\"Hello, \" + name + \"!\");\n}\n```\n\n### Multiple variants of the same command\n\n```java\n@Command(\"teleport \u003ctarget\u003e here\")\npublic void teleportHere(Player sender, EntitySelector\u003cLivingEntity\u003e target) {\n    for (LivingEntity entity : target)\n        entity.teleport(sender);\n}\n\n@Command(\"teleport\")\npublic void teleport(Player sender, double x, double y, double z) {\n    sender.teleport(new Location(sender.getWorld(), x, y, z));\n}\n```\n\n### Easily create aliases of commands\n\n```java\n@Command({\"gamemode creative\", \"gmc\"})\npublic void creative(@Default(\"me\") Player sender) {\n    sender.setGameMode(GameMode.CREATIVE);\n}\n\n@Command({\"gamemode adventure\", \"gma\"})\npublic void adventure(@Default(\"me\") Player sender) {\n    sender.setGameMode(GameMode.ADVENTURE);\n}\n```\n\n### Support for Kotlin's default arguments\n\n```kotlin\n@Command(\"world\")\nfun teleportToWorld(\n    sender: Player,\n    @Optional target: Player = sender,\n    @Optional world: World = sender.world\n) {\n}\n```\n\n### Integration with Brigadier\n\n![Brigadier integration](https://github.com/Revxrsal/lamp-docs/blob/main/.gitbook/assets/image%20(4).png?raw=true)\n\n### Custom parameter types\n\n```kt\n@CommandPermission(\"quests.command\")\n@Command(\"quest\")\nclass QuestCommands {\n\n  @Dependency\n  private lateinit var questManager: QuestManager\n\n  @Subcommand(\"create\")\n  fun createQuest(sender: CommandSender, name: String, description: String) {\n  }\n\n  @Subcommand(\"\u003cquest\u003e delete\")\n  fun deleteQuest(sender: CommandSender, quest: Quest) {\n  }\n\n  @Subcommand(\"\u003cquest\u003e start\")\n  fun startQuest(sender: Player, quest: Quest) {\n  }\n\n  @Subcommand(\"clear\")\n  fun clearQuests(sender: CommandSender) {\n  }\n}\n```\n\n### Custom permission annotations\n```java\n@RequiresGroup(\"admin\")\n@Command(\"admin command\")\npublic void adminCommand(BukkitCommandActor actor) {\n    actor.reply(\"You are authorized to use this command!\")\n}\n```\n\n### Supports Discord slash commands\n\n```java\n@Command(\"ban\")\n@Description(\"Bans the given user\")\n@CommandPermission(Permission.BAN_MEMBERS)\npublic void ban(\n        SlashCommandActor actor,\n        Member target,\n        @Range(min = 1) int days\n) {\n    actor.replyToInteraction(\"User **\" + target.getEffectiveName() + \"** has been banned!\").queue();\n}\n```\n\n![JDA slash commands](https://github.com/Revxrsal/lamp-docs/blob/main/.gitbook/assets/image%20(3).png?raw=true)\n\n### Multi-platform support\n\nLamp supports the following platforms out of the box:\n\n- Bukkit / Spigot / Paper\n- Brigadier\n- BungeeCord\n- Velocity\n- Sponge\n- Minestom\n- Fabric\n- JDA slash commands\n- Command-line applications\n\n## Getting Started\n\nTo get started with Lamp, follow the instructions in our [setup guide](https://foxhut.gitbook.io/lamp-docs). Whether\nyou're using Gradle or\nMaven, integrating Lamp into your project is straightforward.\n\nFor more detailed documentation on each feature, please refer to our **[detailed book](https://foxhut.gitbook.io/lamp-docs)** that outlines all features and APIs in Lamp\n\nHappy coding with Lamp! 🚀\n\n## Sponsors\n\nIf Lamp has made your life significantly easier or you're feeling particularly generous, consider sponsoring the\nproject! It's a great way to support the many hours I've spent maintaining this library and keeps me motivated. Please\ndon't sponsor if you can't afford it.\n\n[Donate with PayPal](https://www.paypal.me/Recxrsion)\n\nHuge thanks to those who donated! 😄\n\n*If I missed you, or you would like to remain anonymous, feel free to shoot me a DM on Discord)*\n\n- Demeng ($50)\n- creatorfromhell ($10)\n- Azoraqua ($10)\n- SuperMax_8 ($8)\n- Bed-dev ($6)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevxrsal%2Flamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevxrsal%2Flamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevxrsal%2Flamp/lists"}