StoryCADLib 4.1.1

dotnet add package StoryCADLib --version 4.1.1
                    
NuGet\Install-Package StoryCADLib -Version 4.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StoryCADLib" Version="4.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StoryCADLib" Version="4.1.1" />
                    
Directory.Packages.props
<PackageReference Include="StoryCADLib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add StoryCADLib --version 4.1.1
                    
#r "nuget: StoryCADLib, 4.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package StoryCADLib@4.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=StoryCADLib&version=4.1.1
                    
Install as a Cake Addin
#tool nuget:?package=StoryCADLib&version=4.1.1
                    
Install as a Cake Tool

StoryCADLib

Core library for StoryCAD — a free, open-source outline editor for fiction writers. StoryCADLib lets you create, query, mutate, save, and load StoryCAD outlines programmatically. The same library powers the StoryCAD desktop app.

Install

dotnet add package StoryCADLib

Target frameworks

  • net10.0-desktop — cross-platform (Windows, macOS, Linux) via UNO Platform.
  • net10.0-windows10.0.22621 — Windows-specific, links the WinAppSDK head.

Quick start

StoryCADLib uses a service-locator pattern. Bootstrap once at startup, then resolve the API surface (or individual services) from the container.

using CommunityToolkit.Mvvm.DependencyInjection;
using StoryCADLib.Services.API;
using StoryCADLib.Services.IoC;

// Initialise the library. headless: true skips UI-thread-bound services
// and is what you want from any non-WinUI host (console, test, server).
BootStrapper.Initialise(headless: true);

var api = Ioc.Default.GetRequiredService<StoryCADApi>();

// Create a new outline from a built-in template (index 0 = Blank).
var result = await api.CreateEmptyOutline(
    name: "The Old Man and the Sea",
    author: "Ernest Hemingway",
    templateIndex: "0");

if (result.IsSuccess)
{
    foreach (var guid in result.Payload)
        Console.WriteLine(guid);
}
else
{
    Console.Error.WriteLine(result.ErrorMessage);
}

All StoryCADApi methods return OperationResult<T> — no exceptions escape to callers. Check IsSuccess and read ErrorMessage on failure.

When to use which entry point

  • StoryCADApi — high-level façade designed for Semantic Kernel / AI agent integration. Stable, narrow surface.
  • OutlineService — lower-level operations on outlines. Use directly when you need fine-grained control.
  • StoryModel — the in-memory document. Mutable; pair with SerializationLock for safe concurrent access.

Documentation

The API-Samples repo has end-to-end examples — see samples/Outliner for a WinUI consumer and samples/ConsistencyValidation for headless usage.

License

GNU GPL v3 — see LICENSE.TXT. The proprietary "Collaborator" module is licensed separately; see ADDITIONAL-LICENSE-PERMISSIONS.TXT in the repo for the GPLv3 §7 additional permissions that govern combination with it and App Store distribution.

Product Compatible and additional computed target framework versions.
.NET net10.0-desktop1.0 is compatible.  net10.0-windows10.0.22621 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
4.1.1 32 5/13/2026
4.1.0 101 5/8/2026
4.0.2 101 4/1/2026
4.0.0 101 3/25/2026
3.3.0 327 9/19/2025
3.2.1 324 8/7/2025
3.2.0 226 7/7/2025
3.1.0 215 4/25/2025
3.0.8 295 4/14/2025
3.0.0 280 4/10/2025