publish-cli

Publish the agent-bank CLI to npm and verify its version.

249|47|Updated Nov 5, 2024
One-click install
npx skills add https://github.com/different-ai/agent-bank --skill publish-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: publish-cli
Source: https://github.com/different-ai/agent-bank/tree/main/.opencode/skill/publish-cli
Command: npx skills add https://github.com/different-ai/agent-bank --skill publish-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The publish-cli skill streamlines releasing new versions of the 0 Finance CLI (agent-bank) to npm and ensures the package version stays in sync with the source.

Core Features & Use Cases

  • Publish the agent-bank CLI to npm and maintain a consistent release cadence.
  • Validate that the local build version matches the published version and perform a sanity check after publishing.
  • Provide a repeatable, scriptable workflow for CI/CD teams to release new CLI builds.

Quick Start

Run the publish-cli workflow to publish a new release: bump the version in packages/cli/package.json, align the version() function in packages/cli/src/index.ts, build with pnpm --filter ./packages/cli build, publish from packages/cli using npm publish --tag latest, verify with npm view agent-bank version, then test installation globally and confirm the CLI version.

Frequently Asked Questions about publish-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish a CLI package to npm and keep the version synced with source code?

Publishing a CLI to npm while keeping versions synced involves bumping the package.json version, aligning the version function in source, building with pnpm, running npm publish, and verifying the published version matches the local build.

What steps are required to release an npm CLI build using pnpm?

Releasing an npm CLI build requires bumping the version in packages/cli/package.json, aligning the version function in src/index.ts, building with pnpm --filter, publishing via npm publish, and verifying with npm view.

Do I need npm and pnpm installed to publish a CLI package?

Yes, you need both npm and pnpm installed, along with a properly configured package.json in packages/cli, to successfully build, publish, and verify the CLI package version.

How do I verify an npm publish succeeded and the published version is correct?

To verify an npm publish succeeded, use npm view to check the published version, test the global installation, and confirm the CLI version matches the local build version.

Why does my published npm CLI version not match the local source version?

A published npm CLI version mismatch occurs if the version function in src/index.ts is not aligned with package.json before building with pnpm and publishing with npm.