Skip to content

Publish cforge to npm as @cforgecli/cli #15

@ermin-muratovic

Description

@ermin-muratovic

Summary

Publish the cforge CLI to npm so users can install globally
without cloning the repo.

Install Experience (target)

npm install -g @cforgecli/cli
cforge analyze spec.md
cforge chat

package.json updates

{
  "name": "@cforgecli/cli",
  "version": "0.5.0",
  "publishConfig": {
    "access": "public"
  },
  "files": [
    "dist/",
    "README.md"
  ]
}

.npmignore

src/
tests/
*.test.ts
tsconfig.json
jest.config.ts

GitHub Actions publish workflow

Create .github/workflows/publish.yml:

  • Triggers on: release published
  • Runs: npm ci → npm run build → npm publish
  • Uses: NPM_TOKEN secret

Manual prerequisite (one-time)

  • npm org @cforgecli already claimed
  • Generate NPM_TOKEN (Automation type) at npmjs.com/settings/tokens
  • Add NPM_TOKEN to GitHub repo secrets

Acceptance Criteria

  • npm install -g @cforgecli/cli works
  • All 5 commands work post-install (analyze, iterate, compress, critique, chat)
  • publish.yml triggers automatically on GitHub release
  • README updated with npm install instructions
  • Version in package.json matches GitHub release tag

Type

TASK

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskMaintenance task

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions