Skip to content

Project System

my_project/
├── my_project.amethystproj # minimal MSBuild stub — not hand-edited
├── project.am # real project configuration
└── src/
└── main.am

All project configuration lives in project.am using Amethyst’s block syntax:

project :my_app do
version "1.0.0"
target :net9
dependency "Newtonsoft.Json", "13.0.0"
dependency "Microsoft.EntityFrameworkCore", "9.0.0"
authors ["Alice", "Bob"]
description "My awesome Amethyst app"
end

The .amethystproj file is a minimal XML stub that registers the Amethyst MSBuild SDK. It is scaffolded by am new and committed to source control, but never hand-edited:

<Project Sdk="Amethyst.Sdk" />

The Amethyst MSBuild SDK reads project.am for all real configuration.

Amethyst projects are first-class .NET projects:

  • dotnet build reads .amethystproj → triggers the Amethyst MSBuild SDK → reads project.am
  • .amethystproj can be added to a .sln file alongside C# projects
  • Visual Studio and Rider see Amethyst projects as standard .NET projects

The am command provides a Go-style focused interface:

Command Description
am new <name> Scaffold a new project
am build Build the project
am run Build and run
am run <file> Run a specific file
am test Run tests
am add <package> Add a NuGet dependency and restore
am fmt Format source files
am check Type-check without building

am build, am run, and am test wrap dotnet under the hood with friendlier output.

Dependencies are NuGet packages, declared in project.am and managed via am add:

Terminal window
am add Newtonsoft.Json # latest version
am add Newtonsoft.Json@13.0.0 # pinned version

am add updates project.am and runs a restore automatically.

Amethyst projects integrate into .NET solutions as first-class projects. The .amethystproj stub is a standard MSBuild project file and can be added to a .sln alongside C# projects with no special configuration.