Set up project scaffolding: GitHub Actions workflows, issue templates, changelog, contributing guidelines, MIT license, and README
This commit is contained in:
30
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
30
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
name: Bug
|
||||||
|
about: Report a bug
|
||||||
|
title: '[Bug] '
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
Briefly: what is the problem?
|
||||||
|
|
||||||
|
**Steps to reproduce**
|
||||||
|
1. …
|
||||||
|
2. …
|
||||||
|
|
||||||
|
**Expected**
|
||||||
|
What should happen?
|
||||||
|
|
||||||
|
**Actual**
|
||||||
|
What happens instead?
|
||||||
|
|
||||||
|
**Environment**
|
||||||
|
- OS:
|
||||||
|
- Java version:
|
||||||
|
- Terminal (e.g. PowerShell, CMD, IDE):
|
||||||
|
|
||||||
|
**Optional: code snippet**
|
||||||
|
```java
|
||||||
|
// minimal example
|
||||||
|
```
|
||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: Question / Discussion
|
||||||
|
url: https://github.com/jakubbbdev/terminal-ui/discussions
|
||||||
|
about: For questions and ideas without a concrete bug/feature ticket
|
||||||
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
name: Feature
|
||||||
|
about: Suggest an idea or enhancement
|
||||||
|
title: ''
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
**Problem / motivation**
|
||||||
|
What is this about? What are you missing right now?
|
||||||
|
|
||||||
|
**Proposal**
|
||||||
|
What should be added or changed?
|
||||||
|
|
||||||
|
**Alternatives**
|
||||||
|
Have you considered other solutions?
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Screenshots, examples, links—feel free to attach.
|
||||||
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
## Description
|
||||||
|
|
||||||
|
<!-- Briefly: what does this PR do? -->
|
||||||
|
|
||||||
|
## Type of change
|
||||||
|
|
||||||
|
- [ ] Bug fix
|
||||||
|
- [ ] New feature
|
||||||
|
- [ ] Refactoring / docs
|
||||||
|
- [ ] Other
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
- [ ] `./gradlew build` passes locally
|
||||||
|
- [ ] Relevant tests updated or added (if applicable)
|
||||||
25
.github/dependabot.yml
vendored
Normal file
25
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Dependabot: automatic PRs for dependency updates
|
||||||
|
# https://docs.github.com/en/code-security/dependabot
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Gradle dependencies (build.gradle.kts, gradle-wrapper)
|
||||||
|
- package-ecosystem: "gradle"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
labels: ["dependencies"]
|
||||||
|
commit-message:
|
||||||
|
prefix: "deps"
|
||||||
|
|
||||||
|
# GitHub Actions (*.yml in .github/workflows)
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
labels: ["dependencies", "github-actions"]
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci"
|
||||||
35
.github/workflows/codeql.yml
vendored
Normal file
35
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# CodeQL: static security analysis (free for public repos).
|
||||||
|
name: CodeQL
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main, master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main, master ]
|
||||||
|
schedule:
|
||||||
|
- cron: '0 6 * * 1'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
security-events: write
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v3
|
||||||
|
with:
|
||||||
|
languages: java
|
||||||
|
|
||||||
|
- name: Build (for CodeQL)
|
||||||
|
run: |
|
||||||
|
chmod +x gradlew
|
||||||
|
./gradlew compileJava --no-daemon
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v3
|
||||||
22
.github/workflows/dependency-review.yml
vendored
Normal file
22
.github/workflows/dependency-review.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# On PRs: checks dependency changes for known vulnerabilities.
|
||||||
|
# Useful when Dependabot or manual dependency updates are used in PRs.
|
||||||
|
|
||||||
|
name: Dependency Review
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main, master]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
review:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Dependency Review
|
||||||
|
uses: actions/dependency-review-action@v4
|
||||||
34
.github/workflows/release.yml
vendored
Normal file
34
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# On push of a version tag (e.g. v1.0.0): build, create GitHub Release, upload JARs.
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 21
|
||||||
|
cache: gradle
|
||||||
|
|
||||||
|
- run: chmod +x gradlew && ./gradlew build --no-daemon
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
generate_release_notes: true
|
||||||
|
files: build/libs/*.jar
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
16
CHANGELOG.md
Normal file
16
CHANGELOG.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
Project changes are documented here.
|
||||||
|
|
||||||
|
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- (New features go here)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- (Changes go here)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- (Bug fixes go here)
|
||||||
22
CONTRIBUTING.md
Normal file
22
CONTRIBUTING.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
Contributions are welcome.
|
||||||
|
|
||||||
|
## Process
|
||||||
|
|
||||||
|
1. Fork the repo and create a branch (e.g. `feature/xyz` or `fix/abc`).
|
||||||
|
2. Make your changes and test locally:
|
||||||
|
```bash
|
||||||
|
./gradlew build
|
||||||
|
```
|
||||||
|
3. Open a pull request against `main`/`master` (fill in the PR template).
|
||||||
|
4. CI must pass; address review feedback as needed.
|
||||||
|
|
||||||
|
## Code
|
||||||
|
|
||||||
|
- Java 21; follow the existing code style.
|
||||||
|
- Prefer adding tests in `src/test/` for new functionality.
|
||||||
|
|
||||||
|
## Questions
|
||||||
|
|
||||||
|
For questions and general discussion: [Discussions](https://github.com/jakubbbdev/terminal-ui/discussions).
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 terminal-ui contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
64
README.md
Normal file
64
README.md
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# terminal-ui
|
||||||
|
|
||||||
|
Java library for terminal UI: tables, rules, colors, prompts, menus, SelectList, pager, and more. Fluent API, ANSI support, testable.
|
||||||
|
|
||||||
|
[](https://github.com/jakubbbdev/terminal-ui/actions/workflows/ci.yml)
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- **Java 21**
|
||||||
|
- **Gradle 9.x** (wrapper included)
|
||||||
|
|
||||||
|
## Build & Test
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew build
|
||||||
|
```
|
||||||
|
|
||||||
|
Run tests:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew test
|
||||||
|
```
|
||||||
|
|
||||||
|
Demo (non-interactive):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew run
|
||||||
|
```
|
||||||
|
|
||||||
|
Interactive demo (best run in a real terminal):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew runDemo2
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage (excerpt)
|
||||||
|
|
||||||
|
```java
|
||||||
|
import dev.jakub.terminal.Terminal;
|
||||||
|
import dev.jakub.terminal.core.Color;
|
||||||
|
|
||||||
|
// Colored text
|
||||||
|
Terminal.print("Hello").color(Color.CYAN).bold().println();
|
||||||
|
|
||||||
|
// Table
|
||||||
|
Terminal.table()
|
||||||
|
.header("A", "B")
|
||||||
|
.row("1", "2")
|
||||||
|
.row("3", "4")
|
||||||
|
.print(System.out);
|
||||||
|
|
||||||
|
// Prompt
|
||||||
|
String name = Terminal.prompt("Name: ").ask();
|
||||||
|
|
||||||
|
// Menu
|
||||||
|
String choice = Terminal.menu()
|
||||||
|
.title("Environment")
|
||||||
|
.option("Dev").option("Prod")
|
||||||
|
.select();
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
See [LICENSE](LICENSE).
|
||||||
Reference in New Issue
Block a user