Skip to content

DX-3075: publish the CLI as upstash, so npx upstash runs setup - #28

Merged
CahidArda merged 3 commits into
mainfrom
npx-upstash-short-name
Oct 5, 2026
Merged

CahidArda merged 3 commits into
mainfrom
npx-upstash-short-name

Conversation

@CahidArda

Copy link
Copy Markdown
Collaborator

No description provided.

claude and others added 3 commits October 5, 2026 12:15
The CLI will also be published as the unscoped `upstash` package, from the
same build with the same version, so `npx upstash` works. Under that name a
bare `upstash` in a terminal runs `upstash setup`; with arguments it is the
full CLI. Outside a terminal a bare `upstash` keeps printing the help, so an
agent or script never rewrites agent configs by accident. @upstash/cli is
unchanged.

A second publish rather than a wrapper that depends on @upstash/cli: both
packages would declare an `upstash` bin, and npm can link the dependency's
bin instead of the wrapper's, which skips the setup default.

The release workflow change that publishes the second package is in the PR
description, to be added by someone with workflow permissions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LWUubWwYWp1dZTK1S9Ek95
`upstash` is now the primary package name. The release workflow publishes
it, then the same build again as @upstash/cli, so existing installs keep
getting releases and the old name can be deprecated later with one command.

With both names running the same code, the name check is gone: a bare
`upstash` in a terminal runs `upstash setup` under either name, and outside
a terminal it still prints the help. The telemetry header keeps reporting
@upstash/cli so the analytics series stays continuous.

The release workflow change ships separately (it needs workflow
permissions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LWUubWwYWp1dZTK1S9Ek95
@linear-code

linear-code Bot commented Oct 5, 2026

Copy link
Copy Markdown

DX-3075

@CahidArda CahidArda changed the title Npx upstash short name DX-3075: publish the CLI as upstash, so npx upstash runs setup Oct 5, 2026
@CahidArda
CahidArda requested a balanced review from Copilot October 5, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The dual-publish workflow cannot safely recover when only the second publication fails.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Publishes the CLI under upstash while preserving @upstash/cli, and makes bare interactive invocations run setup.

Changes:

  • Adds terminal-aware default setup behavior and tests.
  • Renames the primary npm package and updates documentation.
  • Extends releases to publish both package aliases.
File Description
src/​cli.ts Applies the default command before parsing.
src/​default-command.ts Selects setup for bare interactive invocations.
tests/​unit/​default-command.test.ts Tests default-command behavior.
README.md Documents the new package and invocation.
package.json Renames the npm package.
package-lock.json Synchronizes package metadata.
.github/​workflows/​release.yml Publishes both npm package aliases.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


- name: Publish @upstash/cli release candidate
if: github.event.release.prerelease
run: npm publish --access public --tag=canary --provenance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants