AMOOSEDWEB · .NET

Install with
NuGet.

The compiler is a command-line tool for creating Amoosed mode sites. The Reader is a C# library for listing and downloading their verified files. Install the part you need from NuGet.

Build a site with the .NET tool

Install the .NET 10 SDK on Windows x64, then install AmoosedWeb.Compiler on NuGet as a global tool:

dotnet tool install --global AmoosedWeb.Compiler
amw --version
amw init my-site

amw init creates an independent Git project with an ordinary website, an Amoosed mode Hello World app, a members example, and build and publish helpers. Open its README.txt, edit site/ and app/, then run the helper for your platform:

cd my-site
build.cmd
amw serve builds/local-0001

Use the build folder printed by the helper if it differs from the example. To update an existing global tool, run dotnet tool update --global AmoosedWeb.Compiler. For a project-scoped install, run dotnet new tool-manifest and dotnet tool install AmoosedWeb.Compiler inside the project, then invoke it with dotnet tool run amw -- init my-site. Continue with the site tutorial for editing, keys, preview, and Cloudflare Pages publishing.

Read files from C#

Install AmoosedWeb.Reader on NuGet into a .NET 10 application. It brings in the matching AmoosedWeb.Native package automatically. The next Windows x64 package build supplies the C/C++ reader library for the normal constructor without an embedded JavaScript runtime. An explicit executable constructor remains available for a separately installed compatible CLI. Check the installed package version before relying on the native default.

dotnet new console -n MyAmoosedReader
cd MyAmoosedReader
dotnet add package AmoosedWeb.Reader

Replace Program.cs with a small reader. The example lists the files exposed by a site, then downloads one file to a new local path:

using AmoosedWeb.Reader;

var reader = new AmoosedReader(new Uri("https://example.com/"));
foreach (var file in await reader.ListAsync())
    Console.WriteLine($"{file.Path} — {file.Bytes} bytes ({file.Access})");

await reader.DownloadAsync(
    "/amoosed.com/app/files/example.zip", "example.zip");

Run it with dotnet run. Replace the URL and resource path with values from your site’s list. The Reader checks recovered chunks and the complete file before returning, and it will not overwrite an existing download. For a privately shared index, pass the path of an .amwkey file as indexKeyFile. For protected member files, pass an .amwmember or hexadecimal key file as memberKeyFile:

var reader = new AmoosedReader(
    new Uri("https://example.com/"),
    indexKeyFile: "invitation.amwkey",
    memberKeyFile: "member.amwmember");

Keep key files private. For more CLI commands, including remote-list, remote-get, and remote-pull, read the reader section of the compiler guide.

Compatibility and package roles

AmoosedWeb.Compiler

An installable .NET tool with the amw command. This package currently bundles a Windows x64 native executable. It is not a C# library reference.

AmoosedWeb.Reader

A .NET 10 C# library for verified listing and downloads. The next Windows x64 package build calls the C/C++ reader library directly; an explicit CLI constructor remains available.

AmoosedWeb.Native

The Reader’s exact-version dependency. It copies the Windows x64 C/C++ reader DLL into your application’s build and publish output.

Other platforms

Use the cross-platform npm compiler and reader with Node.js 22 or newer on macOS and Linux. A matching NuGet native package is not yet supplied for those platforms.

The Compiler tool still carries amw.exe and its runtime for commands awaiting native migration. The Reader’s Native dependency contains only the matching C/C++ DLL and its build target. The Reader does not execute a website’s app. The NuGet package licenses cover use of the packaged binaries; they do not license the private source or hosted content.