apkg init
The init command creates an apkg.json manifest in the current directory through a series of interactive prompts. This is the first step when building a new package.
Synopsis
Section titled “Synopsis”apkg init [--force]Options
Section titled “Options”| Option | Description |
|---|---|
--force | Overwrite an existing apkg.json if present |
Without --force, the command exits with an error if apkg.json already exists in the current directory.
Interactive prompts
Section titled “Interactive prompts”The command walks you through each field:
| Prompt | Default | Validation |
|---|---|---|
Package name (@scope/name) | @<username>/<directory> | Must be scoped, lowercase alphanumeric with hyphens, max 214 characters |
| Version | 0.1.0 | Must be valid semver |
| Package type | skill | Select from list (see below) |
| Description | (empty) | Free text |
| License | MIT | Free text |
| Keywords | (empty) | Comma-separated list |
If you are logged in, the default package name uses your username as the scope (e.g. @alice/my-tool). Otherwise it defaults to @scope/<directory>.
Package types
Section titled “Package types”| Type | Description |
|---|---|
skill | A reusable skill for AI assistants |
agent | An autonomous agent package |
mcp-server | A Model Context Protocol server |
prompt | A prompt template |
config | A configuration package |
library | A shared library |
composite | A bundle of multiple package types |
Package name rules
Section titled “Package name rules”The package name must:
- Start with a scope:
@username/nameor@org/name - Use only lowercase letters, numbers, hyphens, dots, and underscores
- Start and end with a letter or number (after the scope prefix)
- Be 214 characters or fewer
Generated manifest
Section titled “Generated manifest”After answering the prompts, the command writes apkg.json. A readme field is automatically included if a README.md file exists in the current directory. For a complete reference of all manifest fields, including type-specific options and dependency fields, see the apkg.json Schema Reference.
{ "name": "@alice/my-skill", "version": "0.1.0", "type": "skill", "description": "A useful skill that does things", "license": "MIT", "readme": "README.md", "keywords": ["example", "skill"]}Examples
Section titled “Examples”Create a new package in the current directory:
mkdir my-skill && cd my-skillapkg initReinitialize an existing package (overwrites apkg.json):
apkg init --forceRelated commands
Section titled “Related commands”| Command | Description |
|---|---|
login | Authenticate to set default scope |
add | Add dependencies to the manifest |
publish | Pack and upload the package to the registry |