Skip to main content
The AI•Pkg SDK has two public interfaces: the AI•Pkg.Core .NET library and the aipkg CLI. This spec defines the normative API surface for both. Anyone building a compatible tool, client, or alternative implementation should use this document as the reference.

AI•Pkg.Core

Cross-platform .NET 10 class library. Consumed by servers, CLI tools, and test harnesses.

aipkg CLI

Command-line tool. Single-file binary. No runtime required.

Part 1: AI•Pkg.Core Public API

Overview

Public Types

100% of public surface members must carry XML doc comments before the 1.0.0 release.

Part 2: aipkg CLI Command Reference

Command Reference

Behavior:
  1. Reads and validates the .aispec manifest
  2. Resolves all file references (icon, readme, license, shared/, apm/)
  3. Builds the ZIP archive
  4. Reports the archive size and file count
Auto-detect platform: the CLI inspects the current directory for known config directories (.claude/, .cursor/, etc.) to infer the active platform. Falls back to prompting if ambiguous.
Reads aipkg.config.json and installs all declared packages.
Shows: ID, version, description, authors, capabilities, targets, permissions, dependencies, download count.
Sources are stored in ~/.aipkg/sources.json.
Creates a minimal {id}.aispec file in the current directory.

Part 3: Configuration File Schemas

Project dependencies file — analogous to package.json (npm).

Part 4: TypeScript SDK Interface (Post-MVP)

The TypeScript SDK packages provide registry client and manifest parsing functionality:
TypeScript SDK is not in scope for MVP. Defined here for future reference.