Developer

dd-cli (0.1.0)

Published 2026-07-21 17:36:31 +08:00 by Mustapha

Installation

dotnet nuget add source --name Developer --username your_username --password your_token 
dotnet add package --source Developer --version 0.1.0 dd-cli

About this package

Package Description

dd-cli

Design data CLI for the n5 project. Built on .NET 8 + Spectre.Console.Cli.

Available commands

  • dd-cli version — show version info (-v for verbose)
  • dd-cli gen — generate the configured Client/c C# and MemoryPack snapshot
  • dd-cli sync — synchronize the existing Client/c snapshot into Unity without running Luban or reading Excel

gen and sync take no command-specific options. Both read ~/.dd-cli/config.json:

{
  "workDir": "/absolute/path/to/luban-workspace",
  "unitySyncDir": "/absolute/path/to/UnityProject/Assets/DesignData"
}

If ~/.dd-cli/config.json is missing the first time you run gen or sync, dd-cli writes a commented template to that path and exits 2 with a message telling you which fields to fill in. An existing config file is never overwritten, even when invalid. The file accepts // comments and trailing commas.

gen writes <workDir>/Generated/c/Scripts/**/*.cs and Datas/**/*.memorypack. sync copies that snapshot to <unitySyncDir>/Generated/Scripts/**/*.cs and Datas/**/*.bytes; only the extension changes, not the bytes. Managed stale files are removed while .meta, .asmdef, and other non-managed files are preserved.

Exit codes are 0 for success, 1 for unexpected Luban/copy/I/O/transaction exceptions, and 2 for CliValidationException failures such as invalid configuration, missing or empty snapshots, unsafe paths, collisions, or staged byte mismatches. Generated MemoryPack code includes a lazy generic Tables manager. Unity-owned code supplies the asynchronous byte loader and maps Luban logical output names to the synchronized .bytes assets. ResolveRef generation remains deferred.

See project README for installation.

Details
NuGet
2026-07-21 17:36:31 +08:00
1
DdCli
1.7 MiB
Assets (2)
Versions (5) View all
0.3.0 2026-07-24
0.2.0 2026-07-24
0.1.2 2026-07-21
0.1.1 2026-07-21
0.1.0 2026-07-21