Skip to content

feat(cli): install the complex command; publish as complex.md - #41

Merged
jameslcowan merged 3 commits into
mainfrom
feat/complex-command
Nov 12, 2026
Merged

jameslcowan merged 3 commits into
mainfrom
feat/complex-command

Conversation

@jameslcowan

Copy link
Copy Markdown
Collaborator

What changed

The only command was complex-md, and npx complex-md is the only way to run it without an install. The project is named complex.md, so the command and the package name did not match the name people see.

  • The package installs 3 commands that run the same entry: complex, complex.md and complex-md. complex-md stays, so hooks, CI files and AGENTS.md lines from earlier versions keep working.
  • The release job also publishes the same build under the name complex.md, so npx complex.md works. Trusted publishing needs a package that exists, so the step skips until the first publish of complex.md is made by hand.

The README, the help text and the site still say npx complex-md. They change in a later pull request, after complex.md is on npm, so no text names a package that does not exist yet.

How it was tested

  • cd cli && npm test: 840 pass, 0 fail, 2 todo.
  • npm pack, then a global install into a scratch prefix: complex --version, complex.md --version and complex-md --version all print 0.11.0.
  • npm pkg set name=complex.md && npm pack --dry-run: complex.md-0.11.0.tgz, 47 files.

AI assistance

  • An AI tool helped write this change. Claude Code (Claude Opus 5.5) wrote both commits and this description.
  • Each commit the tool helped write has an Assisted-by: or a Co-Authored-By: trailer.
  • A person read the whole diff and will answer the review comments.

🤖 Generated with Claude Code

jameslcowan and others added 2 commits November 6, 2026 16:52
Intent: give the CLI a 1 word command that matches the project name.

The only command was complex-md. The package now installs complex,
complex.md and complex-md, and all 3 run bin/complex-md.js. complex-md
stays because hooks and CI files from earlier versions call it.
complex.md is the bin that npx picks when the package is published as
complex.md, since npx runs the bin named like the package.

Verify: cd cli && npm test, 840 pass, 0 fail. npm pack, then a global
install into a scratch prefix: all 3 commands print 0.11.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Intent: let a release reach npm under the project's own name.

npm runs `npx complex.md` only if a package has that name. The release
job now publishes the same build a second time with the name set to
complex.md. Trusted publishing needs the package to exist first, so the
step checks the registry and skips until the first manual publish.

Verify: the workflow parses; npm pack --dry-run with the name set gives
complex.md-0.11.0.tgz with 47 files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jameslcowan jameslcowan added the owner Gated: the maintainer reviews and merges label Nov 7, 2026

@jameslcowan jameslcowan left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: merge. No tag and no publish come with it; the release stays the maintainer's decision.

What I checked.

  • cd cli && npm test on e9f548e: exit 0, 840 pass, 0 fail, 2 todo. CI is green on all 6 legs.
  • The 3 bin names point at 1 entry, and complex-md stays. Hooks, CI files and AGENTS.md blocks that earlier versions wrote keep working. This is a minor change under the semver rule in CONTRIBUTING.md, and the CHANGELOG entry sits under Unreleased.
  • npx needs a bin named like the package when a package has more than 1 bin. bin-names.test.js checks that for both names. That test is the right one to have: without it, npx complex-md would fail with "could not determine executable to run".
  • The release step runs after both existing publishes, so a failure there cannot block complex-md or complex-md-mcp. npm pkg set name=complex.md changes only the runner's copy of cli/package.json.
  • npm view complex.md returns 404 today, so the step skips, as the description says.

Risks to check before the first complex.md publish. Neither blocks this merge, because no published text names complex.md yet.

  1. npm may refuse the name. npm rejects a new package name that matches an existing one once punctuation is removed. complex.md and complex-md both become complexmd. npm does not document an exception for the same owner. The first hand publish will show it; if npm refuses, a scoped name or a request to npm support are the options. Find out before the README changes.
  2. complex.md on Windows. npm writes 3 shims per bin: complex.md, complex.md.cmd and complex.md.ps1. cmd.exe looks for a command that has an extension under its exact name first, so it may find the extensionless complex.md shim and open it with the .md file association instead of running it. npx complex.md on Windows runs the command through cmd.exe too. I did not test this. A global install on the Windows runner, then complex.md --version in cmd and pwsh, answers it. complex and complex-md have no extension and are not affected.

Small suggestion, not done here. The skip test npm view complex.md version treats any failure as "not on npm", a network error included. In that case a release would skip the complex.md publish and still show green. Matching E404 in the output would make a network error fail the step instead.

Process note. This pull request changes release.yml, so it is gated under "Maintainer agents" (#42). The maintainer approved this merge in advance. No version tag is pushed, so nothing publishes.

@jameslcowan
jameslcowan merged commit af7812a into main Nov 12, 2026
7 checks passed
@jameslcowan jameslcowan mentioned this pull request Nov 12, 2026
3 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner Gated: the maintainer reviews and merges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant