Project System
Project Structure
Section titled “Project Structure”my_project/├── my_project.amethystproj # minimal MSBuild stub — not hand-edited├── project.am # real project configuration└── src/ └── main.amProject File (project.am)
Section titled “Project File (project.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"endMSBuild Stub (.amethystproj)
Section titled “MSBuild Stub (.amethystproj)”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.
dotnet Interop
Section titled “dotnet Interop”Amethyst projects are first-class .NET projects:
dotnet buildreads.amethystproj→ triggers the Amethyst MSBuild SDK → readsproject.am.amethystprojcan be added to a.slnfile alongside C# projects- Visual Studio and Rider see Amethyst projects as standard .NET projects
CLI — am
Section titled “CLI — am”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.
Package Management
Section titled “Package Management”Dependencies are NuGet packages, declared in project.am and managed via am add:
am add Newtonsoft.Json # latest versionam add Newtonsoft.Json@13.0.0 # pinned versionam add updates project.am and runs a restore automatically.
Solution Interop
Section titled “Solution Interop”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.