Thank you for your interest in contributing to Termina! This guide will help you get set up for local development.
- .NET 10 SDK
- Node.js 20+ (for documentation)
- Git
# Clone the repository
git clone https://github.com/Aaronontheweb/Termina.git
cd Termina
# Restore .NET tools
dotnet tool restore
# Build the solution
dotnet build# Run all tests
dotnet test
# Run tests with detailed output
dotnet test -v normal
# Run tests for a specific project
dotnet test tests/Termina.Tests# Build packages
dotnet pack -c Release -o ./bin/nuget
# The packages will be in ./bin/nuget/
ls ./bin/nuget/*.nupkg# Run the counter demo
dotnet run --project demos/Termina.Demo.RegionBased
# Run the streaming chat demo (requires more setup)
dotnet run --project demos/Termina.Demo.Streaming
# Run the original demo
dotnet run --project demos/Termina.DemoThe documentation website is built with VitePress.
# Navigate to docs folder
cd docs
# Install dependencies (first time only)
npm install
# Start development server with hot reload
npm run dev
# The site will be available at http://localhost:5173/Termina/cd docs
# Build the static site
npm run build
# Preview the production build
npm run previewdocs/
├── .vitepress/
│ └── config.ts # VitePress configuration
├── public/
│ └── termina-icon.png # Site logo
├── index.md # Homepage
├── guide/ # Getting started guides
├── tutorials/ # Step-by-step tutorials
├── layout/ # Layout system docs
├── components/ # Component reference
├── styling/ # Styling guide
├── concepts/ # Core concepts
├── advanced/ # Advanced topics
└── comparison/ # Comparisons with alternatives
VitePress can include code directly from source files:
<!-- Include entire file -->
<<< @/../demos/Termina.Demo.RegionBased/CounterViewModel.cs{csharp}
<!-- Include specific lines -->
<<< @/../src/Termina/Layout/TextNode.cs{15-45 csharp}
<!-- Include with line highlighting -->
<<< @/../demos/Termina.Demo.RegionBased/CounterPage.cs{12,15-20 csharp:line-numbers}This keeps documentation in sync with actual code.
Termina supports Native AOT compilation. To test AOT publishing:
# Publish with AOT
dotnet publish demos/Termina.Demo -c Release -r linux-x64 --self-contained
# Test the AOT binary
./demos/Termina.Demo/bin/Release/net10.0/linux-x64/publish/Termina.Demo --test- Use
dotnet formatto format code - Follow existing patterns in the codebase
- Add XML documentation comments to public APIs
- Ensure all tests pass before submitting PRs
- Create a feature branch from
dev - Make your changes
- Ensure tests pass:
dotnet test - Ensure docs build:
cd docs && npm run build - Submit a PR to
devbranch
Termina/
├── src/
│ ├── Termina/ # Core framework
│ │ ├── Layout/ # Layout nodes (TextNode, PanelNode, etc.)
│ │ ├── Reactive/ # ReactiveViewModel, [Reactive] attribute
│ │ ├── Routing/ # Route templates and matching
│ │ ├── Terminal/ # ANSI terminal abstraction
│ │ └── ...
│ └── Termina.Generators/ # Source generators
├── demos/
│ ├── Termina.Demo.RegionBased/ # Counter demo
│ ├── Termina.Demo.Streaming/ # Chat demo with Akka.NET
│ └── Termina.Demo/ # Original demo
├── tests/
│ └── Termina.Tests/ # Unit tests
└── docs/ # VitePress documentation
- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.