Haya 0.0.6-beta1

This is a prerelease version of Haya.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Haya --version 0.0.6-beta1
                    
NuGet\Install-Package Haya -Version 0.0.6-beta1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Haya" Version="0.0.6-beta1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Haya" Version="0.0.6-beta1" />
                    
Directory.Packages.props
<PackageReference Include="Haya" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Haya --version 0.0.6-beta1
                    
#r "nuget: Haya, 0.0.6-beta1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Haya@0.0.6-beta1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Haya&version=0.0.6-beta1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Haya&version=0.0.6-beta1&prerelease
                    
Install as a Cake Tool

<p align="center"> <img src="docs/images/haya-logo.svg" alt="haya" width="280"> </p>

<h3 align="center">Living architecture docs, generated from your code.</h3>

<p align="center"> Haya reads small annotations you put next to your code (<code>Responsibility</code>, <code>Collaborator</code>, <code>Meta</code>) and generates CRC documents, C4 diagrams and a Backstage catalog, for <b>C#</b> and <b>TypeScript</b> codebases. </p>

<p align="center"> <a href="https://github.com/dburriss/haya-net/actions/workflows/build.yml"><img src="https://github.com/dburriss/haya-net/actions/workflows/build.yml/badge.svg" alt="Build and test"></a> <a href="https://www.nuget.org/packages/Haya.Tool"><img src="https://img.shields.io/nuget/v/Haya.Tool?logo=nuget&label=Haya.Tool" alt="NuGet Haya.Tool"></a> <a href="https://www.nuget.org/packages/Haya"><img src="https://img.shields.io/nuget/v/Haya?logo=nuget&label=Haya" alt="NuGet Haya"></a> <a href="https://github.com/dburriss/haya-net/blob/main/LICENSE"><img src="https://img.shields.io/github/license/dburriss/haya-net" alt="License"></a> </p>

Get started

Install the tool and the attributes package (alpha, hence --prerelease; .NET 10 SDK required):

dotnet tool install --global Haya.Tool --prerelease
dotnet add package Haya --prerelease

For TypeScript, see the TypeScript tutorial.

Then annotate your code and run one command:

[assembly: Meta(AppName = "CheckoutApi", System = "HayaEcomm", Description = "Handles payment for a cart")]

[Responsibility(Description = "Handles order processing")]
public class CreditCardPaymentUsecase { }
haya crc -cc ./Example.sln

Start with the tutorial for your stack:

See the annotated C# example and its generated CRC.

What it does

  • CRC documents. Components, Responsibilities and Collaborators as Markdown, optionally with embedded diagrams. See the CLI reference.
  • C4 diagrams. Level 1 (system context) and level 2 (containers) as Mermaid. See Generate C4 diagrams.
  • Backstage catalog. One component per application with dependencies. See Publish to Backstage.
  • Describe files. A JSON/YAML description of an application that every other command accepts as input. See the describe format.
  • Many systems at once. Merge several codebases, C# and TypeScript mixed, into one picture. See Document several systems together.
  • Same output on both stacks. The C# tool (Haya.Tool) and the TypeScript tool (Haya.Bun) share one rendering core. See Architecture.

Haya is not a replacement for good documentation practices. It keeps a minimum level of documentation next to the code, so it stays current and a new joiner has somewhere to start exploring.

Documentation

Organised by Diataxis, starting at the docs index:

I want to... Go to
Learn Haya by doing Tutorials
Get a specific job done How-to guides
Look up a flag or attribute CLI, Attributes
Understand why it works this way Concepts, ADRs

More: examples · changelog · contributing

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Haya:

Package Downloads
Haya.Roslyn

Roslyn based analysis of C# solutions for Haya. Finds the Haya attributes and produces Haya.Core descriptors.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 92 11/12/2026
0.0.6 91 11/11/2026
0.0.6-beta1 95 11/9/2026
0.0.3 314 9/21/2024

Releases are tag-driven: pushing a `v*` tag publishes `Haya`, `Haya.Core`, `Haya.Roslyn` and `Haya.Tool` to NuGet with
`--include-references` and `--include-assembly <glob>` (with `--verbose`) read Haya attributes from public types in
Custom TypeScript annotations with defaults: `defineResponsibility`, `defineCollaborator` and `defineMeta` in
Custom C# attributes with defaults: derive from `ResponsibilityAttribute`, `CollaboratorAttribute` or `MetaAttribute` and
Documentation reorganised by Diataxis under `docs/` (tutorials, how-to guides, reference, explanation), a new README
C4 Level 2 (container) diagram: `crc -cc` adds it after the level 1 diagram and `diagram -t c4container` writes only
`Technology` and `Kind` on `Meta` (`meta({ technology, kind })` in TypeScript). `Kind` is an `AppKind`
Every command accepts several inputs (solutions, tsconfig projects and/or describe files, mixed) and builds one
`crc`, `describe`, `diagram` and `backstage` accept a `haya describe` file (`.json`, `.yaml`, `.yml`) as input
`Haya.Bun` is a working CLI: `crc`, `describe`, `diagram` and `backstage` for TypeScript projects, with a static analyser
`src/Haya.TypeScript` (`@haya/annotations`): `@Responsibility`, `@Collaborator` and `meta()` for TypeScript, replacing
`examples/typescript/example`: TypeScript equivalent of the C# example; its `CRC.md` is now generated by the CLI.
`src/Haya.Bun`: experimental Fable → TypeScript build of the CLI running on Bun (command skeleton).
`AGENTS.md` (with `CLAUDE.md` symlink), `global.json`, `nuget.config`, local Fable tool manifest.
The `describe` document is now version `0.2`: an app's `meta` may have `tech` and `kind` (left out when unset).
The `describe` document moved to version `0.1` before `0.2`: `{ "apps": [ { meta, responsibilities, collaborators } ], "version": "0.1" }`
Library API: `Describe`, `Crc`, `Diagram` and `Backstage` take an `App list` instead of a `Descriptor list`;
`Haya.Bun` references `Haya.Core` as a whole and compiles all of it with Fable (previously three linked files).
`crc` markdown is rendered by an internal builder instead of FuncyDown (output unchanged, always LF line endings).
JSON/YAML output is written with Flexi.Json and Flexi.Yaml via explicit encoders (ADR004), replacing
Roslyn analysis moved out of `Haya.Core` into the new `Haya.Roslyn` project (ADR003). `Haya.Core` no longer
Target .NET 10 (`Haya` attributes stay on netstandard2.0).
Upgraded dependencies: Roslyn 5.9, YamlDotNet 18.1, FuncyDown 1.4.2, Argu 6.2.5.
Tests migrated to xunit.v3 on Microsoft.Testing.Platform.
CI uses the SDK from `global.json` and builds the Bun project.
Markdown table cells escape `|` and newlines.
`diagram` (and the `crc` C4 diagram) apply the same default system for a collaborator without a `System` as
`backstage`: an app now lists, in `dependsOn`, the apps in the catalog that declare it as an upstream collaborator.
`backstage`: a collaborator without a `System` now takes its owning app's system (or `External` when its
`backstage`: `dependsOn` and `dependencyOf` now follow the collaborator `Direction`: downstream collaborators go in
`backstage` no longer fails for an app without `meta()`; it catalogues the collaborators only (regression test added).
`backstage -f json` now writes JSON (an array of Component entities) instead of YAML, on both stacks.
`Haya.Bun` now finds annotations in workspace packages imported by name (symlinked into `node_modules`) and in
`Haya.Tool` no longer emits a responsibility twice and drops the collaborator for a C# class that has both
Solutions containing F# projects no longer crash analysis; only C# projects are analysed.
FSharpPlus dependency.
Direct `Microsoft.Build` package references (Roslyn's MSBuild build host handles project loading).