OpenWriterControle/plugins/claude-code/scripts/context/openagents-repo/guides/npm-publishing.md
Darren Hinde a8fc9c7715
feat(plugin): enhance context management and skill invocation (#239)
* fix(shellcheck): declare and assign separately in router.sh (SC2155)

* feat(plugin): enhance context management and skill invocation

- Update .context-manifest.json to include profile and detailed source information.
- Revise context-scout.md to clarify context root discovery and navigation.
- Modify commands to replace deprecated skills with updated ones (brainstorming → approach, systematic-debugging → debugger).
- Streamline install-context.md for clarity and remove interactive profile selection.
- Improve oac-status.md to provide a more comprehensive status report.
- Add OAC system paths to session-start.sh for better context management.
- Remove obsolete skills and improve documentation for existing commands.
2026-02-23 12:12:29 +00:00

2.8 KiB

NPM Publishing Guide

Purpose: Quick reference for publishing OpenAgents Control to npm

Time to Read: 3 minutes


Core Concept

OpenAgents Control is published as @nextsystems/oac on npm. Users install globally and run oac [profile] to set up their projects.

Key files:

  • package.json - Package configuration
  • bin/oac.js - CLI entry point
  • .npmignore - Exclude dev files
  • install.sh - Main installer (runs when user executes oac)

Publishing Workflow

1. Prepare Release

# Update version
npm version patch  # 0.7.0 -> 0.7.1
npm version minor  # 0.7.0 -> 0.8.0

# Update VERSION file
node -p "require('./package.json').version" > VERSION

# Update CHANGELOG.md with changes

2. Test Locally

# Create package
npm pack

# Install globally from tarball
npm install -g ./nextsystems-oac-0.7.1.tgz

# Test CLI
oac --version
oac --help

# Uninstall
npm uninstall -g @nextsystems/oac

3. Publish

# Login (one-time)
npm login

# Publish (scoped packages need --access public)
npm publish --access public

4. Verify

# Check it's live
npm view @nextsystems/oac

# Test installation
npm install -g @nextsystems/oac
oac --version

5. Create GitHub Release

git tag v0.7.1
git push --tags
# Create release on GitHub with changelog

User Installation

Once published, users can:

# Global install (recommended)
npm install -g @nextsystems/oac
oac developer

# Or use npx (no install)
npx @nextsystems/oac developer

Common Issues

"You do not have permission to publish"

npm whoami  # Check you're logged in
npm publish --access public  # Scoped packages need public access

"Version already exists"

npm version patch  # Bump version first

"You must verify your email"

npm profile get  # Check email verification status

Package Configuration

What's included (see package.json → files):

  • .opencode/ - Agents, commands, context, profiles, skills, tools
  • scripts/ - Installation scripts
  • bin/ - CLI entry point
  • registry.json - Component registry
  • install.sh - Main installer
  • Docs (README, CHANGELOG, LICENSE)

What's excluded (see .npmignore):

  • node_modules/
  • evals/
  • .tmp/
  • Dev files

Security

  • ✅ Enable 2FA: npm profile enable-2fa auth-and-writes
  • ✅ Use strong npm password
  • ✅ @nextsystems scope is protected (only you can publish)

References


Last Updated: 2026-01-30