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. Native supplies the verified Windows x64 command-line runtime; you do not install it separately.

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. It launches the native reader as a local child process and is suited to tools and batch work.

AmoosedWeb.Native

The Reader’s exact-version dependency. It copies the Windows x64 executable and runtime 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.

Why are Compiler and Native about the same size? Both contain the same native amw.exe and site runtime. The Compiler is a standalone .NET tool; the Native package copies those files into applications that use the Reader. The .NET SDK packages tool dependencies into the tool itself rather than retaining a separate NuGet dependency, so pointing Compiler at Native would still put those bytes in the Compiler download. Excluding the files makes a clean tool installation unusable. These are two distribution roles for one implementation, not two separate compilers.

The Reader uses the same carrier and integrity implementation as the browser and CLI. It does not replace a web browser or 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.