Skip to content

Publish cforge-dev to npm as @cforgecli/dev #21

Description

@ermin-muratovic

Summary

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

Install Experience (target)

npm install -g @cforgecli/dev
cforge-dev chat
cforge-dev implement 1 --auto

package.json updates

{
  "name": "@cforgecli/dev",
  "version": "1.0.0",
  "publishConfig": {
    "access": "public"
  },
  "files": [
    "dist/",
    "contracts/",
    "README.md",
    "CFORGE_DEV.md"
  ]
}

Note: contracts/ must be included — users need default
governance contracts after install.

.npmignore

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

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

Integrate into CreateRelease

Update CreateRelease use case to run npm publish as final step
after GitHub release creation.

Manual prerequisite (shared with cforge)

  • npm org @cforgecli already claimed
  • NPM_TOKEN added to GitHub secrets

Acceptance Criteria

  • npm install -g @cforgecli/dev works globally
  • All commands work post-install
  • contracts/ included in published package
  • publish.yml auto-triggers on GitHub release
  • CreateRelease runs npm publish as final step
  • README updated with npm install instructions

Type

TASK

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskTask issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions