{"id":26839040,"url":"https://github.com/BuildCLI/BuildCLI","last_synced_at":"2025-03-30T17:05:03.098Z","repository":{"id":276881380,"uuid":"878743356","full_name":"BuildCLI/BuildCLI","owner":"BuildCLI","description":"BuildCLI is a command-line interface (CLI) tool for managing and automating common tasks in Java project development.","archived":false,"fork":false,"pushed_at":"2025-03-24T10:15:07.000Z","size":777,"stargazers_count":102,"open_issues_count":176,"forks_count":54,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T11:28:29.238Z","etag":null,"topics":["ai","buildcli","cli","cli-app","command","commandline","java","java-application"],"latest_commit_sha":null,"homepage":"https://buildcli.dev","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/BuildCLI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"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}},"created_at":"2024-10-26T02:03:03.000Z","updated_at":"2025-03-24T10:25:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8055534-11fc-4573-8773-ee685c8433aa","html_url":"https://github.com/BuildCLI/BuildCLI","commit_stats":null,"previous_names":["buildcli/buildcli"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuildCLI%2FBuildCLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuildCLI%2FBuildCLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuildCLI%2FBuildCLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuildCLI%2FBuildCLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BuildCLI","download_url":"https://codeload.github.com/BuildCLI/BuildCLI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246351018,"owners_count":20763231,"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":["ai","buildcli","cli","cli-app","command","commandline","java","java-application"],"created_at":"2025-03-30T17:01:52.581Z","updated_at":"2025-03-30T17:05:03.082Z","avatar_url":"https://github.com/BuildCLI.png","language":"Java","readme":"```\n,-----.          ,--.,--.   ,--. ,-----.,--.   ,--.\n|  |) /_ ,--.,--.`--'|  | ,-|  |'  .--./|  |   |  |\n|  .-.  \\|  ||  |,--.|  |' .-. ||  |    |  |   |  |       Built by the community, for the community\n|  '--' /'  ''  '|  ||  |\\ `-' |'  '--'\\|  '--.|  |\n`------'  `----' `--'`--' `---'  `-----'`-----'`--'\n\nWelcome to BuildCLI - Java Project Management!\n```\n\n# BuildCLI\n\n**BuildCLI** is a command-line interface (CLI) tool for managing and automating common tasks in Java project development. It allows you to create, compile, manage dependencies, and run Java projects directly from the terminal, simplifying the development process.\n\n- **Repository:** [https://github.com/BuildCLI/BuildCLI](https://github.com/BuildCLI/BuildCLI)\n- **License:** [MIT](https://opensource.org/licenses/MIT)\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Contribution](#contribution)\n- [License](#license)\n\n---\n\n## Features\n\n- **Initialize Project**: Creates the basic structure of directories and files for a Java project.\n- **Compile Project**: Compiles the project source code using Maven.\n- **Add Dependency**: Adds new dependencies to the `pom.xml`.\n- **Remove Dependency**: Remove dependencies from `pom.xml`.\n- **Document Code**: [Beta] Generates documentation for a Java file using AI.\n- **Manage Configuration Profiles**: Creates specific configuration files for profiles (`application-dev.properties`, `application-test.properties`, etc.).\n- **Run Project**: Starts the project directly from the CLI using Spring Boot.\n- **Dockerize Project**: Generates a Dockerfile for the project, allowing easy containerization.\n- **Build and Run Docker Container**: Builds and runs the Docker container using the generated Dockerfile.\n- **CI/CD Integration**: Automatically generates configuration files por CI/CD tools (e.g., Jenkins, GitHub Actions) and triggers pipelines based on project changes.\n- **Changelog Generation**: Automatically generates a structured changelog by analyzing the Git commit history, facilitating the understanding of changes between releases.\n---\n\n## Installation\n\n1. **Script Installation**:\nJust download the .sh or .bat file and execute.\n\n     - On a Unix-like system (Linux, macOS), simply give execution permission to `install.sh` and run it:  \n\n     ```bash\n     sudo chmod +x install.sh  \n     ./install.sh  \n     ```\n\n     - On Windows: Run `install.bat` by double-clicking it or executing the following command in the Command Prompt (cmd):  \n\n     ```cmd\n     install.bat\n     ```\n\nNow `BuildCLI` is ready to use. Test the `buildcli` command in the terminal.\n\n---\n\n## Usage\n\nWe made a major refactor of the `BuildCLI` architecture. Please use the `buildcli help` command to see all available options. Also, refer to issue [#89](https://github.com/wheslleyrimar/BuildCLI/issues/89) and pull request [#79](https://github.com/wheslleyrimar/BuildCLI/pull/79) for more details.\n\n---\n\n## Examples\n\n### 1. Initialize a New Project\n\nCreates the basic Java project structure, including `src/main/java`, `pom.xml`, and `README.md`.\nYou can specify a project name to dynamically set the package structure and project artifact.\n\n#### Example Commands\n\n- To initialize a project with a specific name:\n\n```bash\nbuildcli project init MyProject\n```\n\nThis will create the project structure with `MyProject` as the base package name, resulting in a directory like `src/main/java/org/myproject`.\n\n- To initialize a project without specifying a name:\n\n```bash\nbuildcli project init\n```\n\nThis will create the project structure with `buildcli` as the base package name, resulting in a directory like `src/main/java/org/buildcli`.\n\n### 2. Compile the Project\n\nCompiles the Java project using Maven:\n\n```bash\nbuildcli project build --compile\n```\n\n### 3. Add a Dependency to `pom.xml`\n\nAdds a dependency to the project in the `groupId:artifactId` format. You can also specify a version using the format `groupId:artifactId:version`. If no version is specified, the dependency will default to the latest version available.\n\n#### Example Commands\n\n- To add a dependency with the latest version:\n\n```bash\n  buildcli project add dependency org.springframework:spring-core\n```\n\n- To add a dependency with a specified version:\n\n```bash\n  buildcli p a d org.springframework:spring-core:5.3.21\n```\n\nAfter executing these commands, the dependency will be appended to your pom.xml file under the `\u003cdependencies\u003e` section.\n\n### 4. Create a Configuration Profile\n\nCreates a configuration file with the specified profile, for example, `application-dev.properties`:\n\n```bash\nbuildcli project add profile dev\n```\n\n### 5. Run the Project\n\nRuns the Java project using Spring Boot:\n\n```bash\nbuildcli project run\n```\n\n### 6. Generate Documentation for Java Code\n\nAutomatically generates inline documentation for a Java file using AI:\n\n```bash\n# File or directory\nbuildcli ai code document File.java \n```\n\nThis command sends the specified Java file to the local Ollama server, which generates documentation and comments directly within the code. The modified file with documentation will be saved back to the same location.\n\n### 7. Set Active Environment Profile\n\nSets the active environment profile, saving it to the `environment.config` file. The profile is referenced during project execution, ensuring that the correct configuration is loaded.\n\n```bash\nbuildcli p set env dev\n```\n\nAfter running this command, the active profile is set to dev, and the `environment.config` file is updated accordingly.\n\n#### Active Profile Display During Project Execution\n\nWith the `--set-environment` functionality, you can set the active environment profile. When running the project with `buildcli --run`, the active profile will be displayed in the terminal.\n\n### 8. Dockerize Command\n\nThis command generates a `Dockerfile` for your Java project, making it easier to containerize your application.\n\n```bash\nbuildcli p add dockerfile\n```\n\n### 9. Docker Build Command\n\nThis command automatically builds and runs the Docker container for you. After running the command, the Docker image will be created, and your project will run inside the container.\n\n```bash\nbuildcli project run docker\n```\n\n### 10. Set Up CI/CD Integration\n\nGenerates configuration files for CI/CD tools and prepares the project for automated pipelines. Supports Jenkins, Gitlab and GitHub Actions.\n\n```bash\nbuildcli project add pipeline github\n```\n\n```bash\nbuildcli project add pipeline gitlab\n```\n\n```bash\nbuildcli project add pipeline jenkins\n```\n\n---\n\n## Prerequisites\n\n### Local Ollama API\n\nEnsure you have the Ollama server running locally, as the `docs` functionality relies on an AI model accessible via a local API.\n\n- [Download Ollama](https://ollama.com/download)\n\nYou can start the Ollama server by running:\n\n```bash\nollama run llama3.2\n```\n\n### Prerequisites for CI/CD Integration\n\n- **Jenkins**: Ensure Jenkins is installed and accessible in your environment.\n- **GitHub Actions**: Ensure your repository is hosted on GitHub with Actions enabled.\n\n---\n\n## Changelog Generation\n\nBuildCLI now includes an automatic changelog generation feature that analyzes your Git commit history and produces a structured changelog.\nThis helps developers and end-users easily track changes between releases.\n\n### Usage Instructions\n\nTo generate a changelog, run:\n   ```bash\n   buildcli changelog [OPTIONS]\n   ```\nOr use the alias:\n```bash\n   buildcli cl [OPTIONS]\n   ```\n### Options:\n\n- `--version, -v \u003cversion\u003e:`\n  Specify the release version for the changelog. If omitted, BuildCLI attempts to detect the latest Git tag. If no tag is found, it defaults to \"Unreleased\".\n\n- `--format, -f \u003cformat\u003e:`\n  Specify the output format. Supported formats:\n\n   - markdown (default)\n   - html\n   - json\n- `--output, -o \u003cfile\u003e:`\n  Specify the output file name. If not provided, defaults to CHANGELOG.\u003cextension\u003e.\n\n- `--include, -i \u003ccommit types\u003e:`\n  Provide a comma-separated list of commit types to include (e.g., feat,fix,docs,refactor).\n\n### Example Command\n\n```bash\nbuildcli changelog --version v1.0.0 --format markdown --include feat,fix --output CHANGELOG.md\n````\n#### or\n\n```bash\nbuildcli changelog -v v1.0.0 -f markdown -i feat,fix -o CHANGELOG.md\n````\n\n\n## Contribution\n\nContributions are welcome! Feel free to open **Issues** and submit **Pull Requests**.\nSee the [CONTRIBUTING.md](CONTRIBUTING.md) file for more details.\n\nQuick steps to contribute:\n\n1. Fork the project.\n2. Create a branch for your changes:\n\n   ```bash\n   git checkout -b feature/my-feature\n   ```\n\n3. Commit your changes:\n\n   ```bash\n   git commit -m \"My new feature\"\n   ```\n\n4. Push to your branch:\n\n   ```bash\n   git push origin feature/my-feature\n   ```\n\n5. Open a Pull Request in the main repository.\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n## Familiarizing Yourself with BuildCLI\n\nTo get a deeper understanding of the BuildCLI project structure, key classes, commands, and how to contribute, check out our comprehensive guide in [PROJECT_FAMILIARIZATION.md](PROJECT_FAMILIARIZATION.md).\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBuildCLI%2FBuildCLI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBuildCLI%2FBuildCLI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBuildCLI%2FBuildCLI/lists"}