Skip to content

CLI: sign-in hint on 401 and a default login server#1371

Merged
RhysSullivan merged 3 commits into
mainfrom
cli-login-hints
Jul 9, 2026
Merged

CLI: sign-in hint on 401 and a default login server#1371
RhysSullivan merged 3 commits into
mainfrom
cli-login-hints

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Calling the API with a stale or rejected stored login used to surface the transport error, Decode error (401 GET .../api/tools), with no recovery path. The CLI now treats a 401 as a sign-in problem and answers with the fix. The hint mirrors how the user addressed the server: plain executor login in the common no-flags case, echoing --server / --base-url only when the user typed them. Profile names stay internal; login and logout output mention them only when the user works with named profiles.

executor login with no flags and no stored profiles now signs in to https://executor.sh instead of failing with "No server to log in to", and prints Signing in to <origin> before the device flow so an implicit target is always visible.

Covered by a new local e2e scenario (recording below) plus unit tests for the message variants.

CLI call · a signed-out hosted profile explains how to log back in (local)

A 401 from a stored profile now renders as a sign-in message naming the
profile and the exact login command, instead of the transport-level
`Decode error (401 GET .../api/tools)`. `executor login` with no flags
and no profiles now targets https://executor.sh instead of erroring, and
prints the chosen server before starting the device flow.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing ef4d6ab Commit Preview URL

Branch Preview URL
Jul 09 2026, 08:38 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud ef4d6ab Jul 09 2026, 08:41 PM

@pkg-pr-new

pkg-pr-new Bot commented Jul 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1371

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1371

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1371

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1371

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1371

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1371

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1371

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1371

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1371

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1371

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1371

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1371

executor

npm i https://pkg.pr.new/executor@1371

commit: ef4d6ab

The sign-in hint now mirrors how the user addressed the server: plain
`executor login` when no flags were typed, echoing --server/--base-url
only when they were. Login and logout output mention profiles only when
the user works with named profiles.
@RhysSullivan RhysSullivan marked this pull request as ready for review July 9, 2026 20:38
@RhysSullivan RhysSullivan merged commit 262fc3e into main Jul 9, 2026
21 checks passed
@RhysSullivan RhysSullivan deleted the cli-login-hints branch July 9, 2026 20:47
@RhysSullivan RhysSullivan mentioned this pull request Jul 9, 2026
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.

1 participant