Build & Publish

Publishing Guide

How to package your harness, validate it, and publish it to the anpm registry so others can install it with one command.

Terminal
$ anpm publish
Publishing my-harness@1.0.0...
✓ Validation passed
✓ Uploaded to registry
✓ Published! Anyone can now run: anpm install my-harness

This guide walks through the complete publish workflow from a finished harness to a live registry entry.

0 Overview

Publishing to anpm creates a versioned, immutable entry in the registry. Each publish bumps the version in your manifest and uploads all harness files. Installers always receive the exact version they request.

💡

Harnesses follow Anthropic's .claude standard. Managed agent deployment is also supported.

Full flow to publish:

  • 1Install anpm CLI and log in
  • 2Create harness directory structure
  • 3Write anpm.yaml manifest
  • 4Test locally
  • 5Publish with anpm publish

1 Prerequisites

Before you start, make sure you have:

  • anpm CLI installed (npm i -g anpm)
  • Authenticated via anpm login
  • A valid anpm.yaml manifest in your harness root
  • All required fields present (name, version, description)
Terminal
# Install anpm, log in, and connect slash commands
$ npm install -g anpm-io
$ anpm login
$ anpm init
✓ Connected /anpm-explore, /anpm-create, /anpm-status
# Create a new harness project
$ anpm create my-harness
✓ Created my-harness/ with template

2 Harness Structure

anpm expects a specific folder layout so it can auto-wire agents, skills, rules, and commands into Claude Code.

my-harness/
anpm.yaml ← manifest (required)
skills/
main-skill.md ← skill definition
sub-skill.md
hooks/
pre-install.sh ← runs before install
rules/
coding-rules.md ← project rules
CLAUDE.md ← agent instructions
README.md ← usage docs

Required Files

FileDescription
anpm.yamlHarness metadata, dependencies, and publish config
skills/At least one skill file required
README.mdUsage documentation (shown on the anpm registry page)

3 Manifest Reference

The anpm.yaml file describes your harness to the registry. Required fields are name, version, and description. Optional fields include keywords, homepage, license, and access.

anpm.yaml
# Harness basic info
name: my-harness
version: 1.0.0
description: "A brief description of what this harness does"
# Category tags
tags:
- content
- automation
- design
# Skill entrypoints
skills:
- skills/main-skill.md
- skills/sub-skill.md
# Dependencies (other harnesses)
dependencies:
crawling: "^0.8.0"
# Publish settings
publish:
visibility: public
# public | private | internal
license: MIT

4 Test Locally

Before publishing, install your harness locally and run it inside Claude Code to verify everything works as expected.

Terminal
# Link harness to a local project
$ anpm link ./my-harness
Linked my-harness to current project
# Test in a live agent session
$ anpm run my-harness
Starting harness in dev mode...
# Check installed status
$ anpm status
✓ my-harness linked (local)
⚠️

Use anpm link to symlink your harness locally, then anpm run to test it in a live agent session before publishing.

5 Publish

When you're ready, run anpm publish from your harness root. The CLI validates your manifest, bundles the files, and uploads to the registry.

Terminal
# Publish to the anpm registry
$ anpm publish
Publishing my-harness@1.0.0...
✓ Validation passed
✓ Uploaded to registry
✓ Published! Install with: anpm install my-harness
# Deploy as managed agent (optional)
$ anpm deploy --to anthropic
Deploying to managed agent...
✓ Live at agent.anpm.dev/my-harness

Version Updates

After making changes, bump the version and republish in one step:

Terminal
# Publish with automatic patch bump
$ anpm publish --patch
# 1.0.0 → 1.0.1
# Or use --minor / --major
$ anpm publish --minor
# 1.0.1 → 1.1.0

6 Visibility

Control who can find and install your harness.

VisibilityDescriptionUse Case
publicListed in the anpm registry and installable by anyone.Open-source agents
privateNot listed publicly. Installable only with an access code.Paid or limited distribution
internalVisible to your organization members only.Internal team agents
🔒

Private harnesses require an access code at install time.
anpm install my-harness --code ABC123

7 Publishing Guidelines

Public harnesses go through automated review. Your harness must meet these criteria:

  • Do not publish harnesses that contain secrets or credentials.
  • Use semantic versioning (MAJOR.MINOR.PATCH).
  • Include a clear description so users know what the harness does.
  • Test your harness locally before publishing.
  • Keep the harness focused on a single workflow or task.
🚀

Reviews are automated and usually complete within minutes. If rejected, you'll receive specific feedback explaining what needs to be fixed.

Ready to publish?

Install the CLI and publish your first harness.

Install CLI