Trifork.Aspire.Hosting.Corax 0.6.0

dotnet add package Trifork.Aspire.Hosting.Corax --version 0.6.0
                    
NuGet\Install-Package Trifork.Aspire.Hosting.Corax -Version 0.6.0
                    
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="Trifork.Aspire.Hosting.Corax" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Trifork.Aspire.Hosting.Corax" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="Trifork.Aspire.Hosting.Corax" />
                    
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 Trifork.Aspire.Hosting.Corax --version 0.6.0
                    
#r "nuget: Trifork.Aspire.Hosting.Corax, 0.6.0"
                    
#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 Trifork.Aspire.Hosting.Corax@0.6.0
                    
#: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=Trifork.Aspire.Hosting.Corax&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=Trifork.Aspire.Hosting.Corax&version=0.6.0
                    
Install as a Cake Tool

Corax hosting integration

Adds Corax Core to an Aspire AppHost. Corax runs locally with everything it needs, including local models, so no API keys are needed. It can also connect to a deployed Corax instead.

Getting started

The Corax images are private, so log the container runtime in to GitHub Container Registry with a token that can read packages:

gh auth refresh -h github.com -s read:packages
gh auth token | docker login ghcr.io -u <github-user> --password-stdin

Then add the package to the AppHost:

aspire add Trifork.Aspire.Hosting.Corax

Usage

const corax = await builder.addCorax("corax");

await builder.addProject("api", "../Api/Api.csproj")
    .withReference(corax)
    .waitFor(corax);
var corax = builder.AddCorax("corax");

builder.AddProject<Projects.Api>("api")
    .WithReference(corax)
    .WaitFor(corax);

The app receives CORAX_URI and CORAX_KEY, and starts once Corax's default models are registered.

Examples

Add the Corax web interface, signed in as a local administrator:

await builder.addCorax("corax").withFrontend();

Run your corax-backend clone with hot reload. It needs uv and ffmpeg, and ignores the clone's .env.local:

await builder.addCorax("corax").withBackend({ path: "../../corax-backend" });

Run your corax-frontend clone with hot reload. It needs bun, and signs in as a local administrator:

await builder.addCorax("corax").withFrontend({ path: "../../corax-frontend" });

Build the scanner from your clone:

await builder.addCorax("corax").withScanner({ path: "../../corax-scanner" });

Add the compliance scanner:

await builder.addCorax("corax").withScanner();

Pin versions instead of following latest (each repository has its own versions):

await builder.addCorax("corax")
    .withBackend({ version: "v2.358.0" })
    .withFrontend({ version: "v2.254.0" })
    .withScanner({ version: "v0.36.0" });

Use Azure OpenAI instead of local models (gpt-5.6-luna and text-embedding-ada-002 by default):

const key = await builder.addParameter("openai-api-key", { secret: true });

await builder.addCorax("corax").withAzureOpenAI("https://gpt-corax.openai.azure.com", key);

Serve Corax and its web interface on fixed ports (undefined keeps them random), and set environment variables on them:

await builder.addCorax("corax")
    .withBackend({ port: 8000 })
    .withFrontend({ port: 3000 })
    .configureBackend(async (api) => { await api.withEnvironment("ENABLE_EVALUATION", "true"); })
    .configureFrontend(async (frontend) => { await frontend.withEnvironment("PUBLIC_TTYD_URL", "http://localhost:7681"); });

Use an existing database, for example to keep data from another setup. Set the password with Aspire's withPassword:

await builder.addCorax("corax", { database: { name: "postgres", volume: "corax_database_data" } })
    .configurePostgres(async (postgres) => { await postgres.withPassword(pgPassword); });

Run another PostgreSQL version than production's 16, or keep the database container running between AppHost runs for faster starts:

await builder.addCorax("corax").configurePostgres(async (postgres) => {
    await postgres.withImageTag("pg17").withLifetime(ContainerLifetime.Persistent);
});

Use a deployed Corax. The dashboard asks for its API key, which is saved per URL, so a key is never sent to another deployment:

await builder.addCorax("corax").runAsRemote("https://api.dev.corax.app");

What runs locally

  • corax-api: Corax in development mode; its generated API key grants administrator access. Corax and its web interface send telemetry to the Aspire dashboard.
  • corax-postgres, corax-storage: PostgreSQL 16 with pgvector, and Azure Blob Storage through the Azurite emulator, as deployed Corax uses. Their data is kept in volumes across restarts.
  • corax-models: qwen3:8b and nomic-embed-text on Ollama. An installed ollama uses the GPU on macOS; otherwise it runs in a CPU-only container.
  • corax-stt: speech-to-text with whisper.cpp. It needs whisper-server and ffmpeg (brew install whisper-cpp ffmpeg); without them, only speech-to-text fails.

Connection properties

Property Environment variable Description
Uri CORAX_URI The base URL of the Corax API.
Key CORAX_KEY The API key, sent as the X-API-Key header.

The connection string has the format Endpoint={Uri};Key={Key}.

Feedback & contributing

https://github.com/trifork/corax-aspire-integration

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 43 10/15/2026
0.5.0 41 10/15/2026
0.4.0 55 10/14/2026
0.3.0 43 10/14/2026
0.2.2 40 10/14/2026
0.2.1 52 10/14/2026
0.2.0 48 10/14/2026
0.1.3 48 10/14/2026
0.1.2 38 10/14/2026
0.1.1 40 10/14/2026
0.1.0 39 10/14/2026
0.1.0-preview.4 42 10/14/2026
0.1.0-preview.3 41 10/14/2026
0.1.0-preview.2 39 10/13/2026
0.1.0-preview.1 36 10/13/2026