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
<PackageReference Include="Trifork.Aspire.Hosting.Corax" Version="0.6.0" />
<PackageVersion Include="Trifork.Aspire.Hosting.Corax" Version="0.6.0" />
<PackageReference Include="Trifork.Aspire.Hosting.Corax" />
paket add Trifork.Aspire.Hosting.Corax --version 0.6.0
#r "nuget: Trifork.Aspire.Hosting.Corax, 0.6.0"
#:package Trifork.Aspire.Hosting.Corax@0.6.0
#addin nuget:?package=Trifork.Aspire.Hosting.Corax&version=0.6.0
#tool nuget:?package=Trifork.Aspire.Hosting.Corax&version=0.6.0
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:8bandnomic-embed-texton Ollama. An installedollamauses the GPU on macOS; otherwise it runs in a CPU-only container.corax-stt: speech-to-text with whisper.cpp. It needswhisper-serverandffmpeg(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
| Product | Versions 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. |
-
net10.0
- Aspire.Hosting (>= 13.6.1)
- Aspire.Hosting.Azure.Storage (>= 13.6.1)
- Aspire.Hosting.JavaScript (>= 13.6.1)
- Aspire.Hosting.PostgreSQL (>= 13.6.1)
- Aspire.Hosting.Python (>= 13.6.1)
- Aspire.Hosting.Redis (>= 13.6.1)
- Aspire.Hosting.Yarp (>= 13.6.1)
- CommunityToolkit.Aspire.Hosting.Ollama (>= 13.6.0)
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 |