Repository navigation
Conversation
harper#4001 makes the harper CLI stop with an error when a .env in the current directory sets its target, credentials or connection trust, and harper login no longer writes .env. Add the canonical key list and migration to the CLI authentication page, correct the pages that told readers to put the target in .env, and add the 5.4 upgrade note. The safe-deployments guide now exports HARPER_CLI_TARGET, since the saved target is per OS user. Dispatch-Task: docs-harper-4001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Short summaries named only part of the list or dropped the environment exception, and HARPER_CLI_* overstated it: HARPER_CLI_TIMEOUT_MS still loads. Note runtime keys for staged releases that keep loadEnv. Dispatch-Task: docs-harper-4001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dispatch-Task: docs-harper-4001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dispatch-Task: docs-harper-4001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request updates the Harper CLI documentation for version 5.4.0, detailing the new behavior where the CLI refuses to load targets, credentials, or connection settings from a project's local .env file and instead throws an error. The feedback focuses on improving readability by ensuring that these file refusal conditions and critical limitations are presented in separate, distinct sentences rather than being combined with other concepts.
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-796 This preview will update automatically when you push new commits. |
Dispatch-Task: docs-harper-4001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-796 This preview will update automatically when you push new commits. |
⊙ Problem
Refuse a project .env CLI target or credential, and save logins under the client's target (harper#4001) makes the
harperCLI stop with an error when a project's.envsets its target, credentials or connection settings. Our docs still tell readers to putHARPER_CLI_TARGETthere and sayharper loginwrites it. On that CLI, the safe-deployments guide fails at its first step.🤔 Are docs enough?
Not alone.
npm create harper@lateststill writesHARPER_CLI_TARGETin.env, so a new project'sharper loginandnpm run deployfail on a 5.4 CLI. These docs tell readers to remove the line, but create-harper needs its own change before 5.4 ships. No issue tracks it yet.💡 Solution
HARPER_CLI_TARGETand no longer copies.envinto a staged release.⚖️ Alternatives
🤔 Export the target in the guide, or rely on the saved login?
Export. The saved target moves with each login, so a bare rollback command could reach another cluster. The cost is setting it again in each new shell.
🤔 Document
dotenv -- harper deploy?Yes, once, with a warning. harper#4001 lists this option, but it passes the CLI everything in the file, bypassing the check. The guide does not use it.
🤔 How does a team share a target now?
target=in apackage.jsonscript replaces the old advice to commit.env. The URL stays visible in review, and a script needs no new dependency.🔧 Changes
reference/cli/authentication.md: Project.envfiles is the new canonical section, with the refused names and when the command stops, the exception for names already in the environment, the migration routes and names an application reads at runtime. How the CLI Picks a Target is new, and the Local Operations fallback now matches it. Login's writes, the Method 2 intro, the credentials-in-URL warning and troubleshooting are corrected; the example.envand "Automatic.envUpdates" are gone.learn/administration/safe-deployments-and-rollback.mdx: the login step exports the target, a note says to remove the scaffolded line, the staged release no longer copies.env, and the polling explanation names the variable. Look hardest here: it is the one recipe that changed.reference/cli/commands.md:harper login, its URL prompt default andharper logoutare updated, and deploy setup and preview setup say to remove the line first.reference/cli/overview.md: the authentication list and login example are corrected.reference/backups/operations.md: an environment target is forwarded, and a refused.envstops the command before it forwards or touches a file.reference/environment-variables/overview.md: a note separatesloadEnvfrom the CLI's read.fabric/cluster-creation-management.md: the connect step no longer says login appends to.env.release-notes/v5-lincoln/5.4.md: an upgrade note and a section with its upgrade impact.reference/components/applications.mdand the getting-started guide also showharper login, with no note: neither scaffolds with create-harper, and the error names the fix. The v4 snapshot is unchanged. These pages stay here, like other open 5.4 docs PRs, until Assemble the v5 reference and open release notes from harper and harper-pro (#788) lands.✅ Verification
249786d1), with scratchHOMEandROOTPATH. The guide's export, login, deploy and staged deploy all worked.format:check,lint,typecheck,test:examplesandbuildpass. The three new anchors are in the built HTML.What the CLI did
.envsets the targetharper login <url>,list_backups(server running and stopped),harper deploy.envsets the targettarget=<url>.envsetsNODE_EXTRA_CA_CERTSget_components.envsetshttps_proxyHTTPS_PROXYexported.envsets the targetdotenv --.envsets the targetharper logout,version,status.env.localsetsHTTPS_PROXY;.env.examplesets the target.envharper login <url>, then a bare operation.envunchanged,last_targetsaved and used.envharper logout <url>last_targetcleared.envnpm run deploywithtarget=in the scriptNot run: Windows, and
.env.vaultend to end (the loader reads it through dotenv).Depends-on: harper#4001
Refs HarperFast/harper#1927, HarperFast/harper#1928
Signed: Claude Opus 5.5 (dev-agent, dispatch task docs-harper-4001)
🤖 Generated with Claude Code
Related PRs: #788 overlaps, 2 others independent
Late Grok findings
6 surviving (highest minor) — Grok reviewed 08690bf
release-notes/v5-lincoln/5.4.md:321— the upgrade paragraph says "Remove the line" for any refused name. For an application value such asHTTPS_PROXY, that drops the value the component'sloadEnvwas supplying, and the paragraph gives no other place to put it.learn/administration/safe-deployments-and-rollback.mdx:84— the staged release no longer copies.env, so values a keptloadEnventry reads stop reaching the nodes. (previously adjudicated)reference/environment-variables/overview.md:66— short summaries of the refusal rule on other pages leave out the "unless the environment sets it" exception and the full set of refused names. (previously adjudicated)reference/cli/authentication.md:27— the "Local Operations" fallback (saved login, then socket) contradicts the new ordered list atreference/cli/authentication.md:37-42, which puts the environment target in between. (previously adjudicated)release-notes/v5-lincoln/5.4.md:315— "That coversHARPER_CLI_*" names more than the closed list the CLI actually refuses. Same wording in the migration text atreference/cli/authentication.md:210andrelease-notes/v5-lincoln/5.4.md:17. (previously adjudicated)reference/cli/authentication.md:189— the list of commands that read.envdoesn't nameharper preview(reference/cli/commands.md:305). (previously adjudicated)Not standing: 3 merged. Grok ran 8m (8m from launch to report); the fold adjudication (
cursor-grok@08690bf95b23-bbf9ec41, claude) took 1m.Origin — the dispatch brief this PR was written from
Document that the harper CLI refuses a project .env target or credential
Document a breaking CLI change from HarperFast/harper PR HarperFast/harper#4001 (fixes harper#1927 and harper#1928), targeted at v5.4.
What changed for users:
harperCLI no longer lets a.envfile in the current directory set its target, credentials or connection trust. If that file sets any ofHARPER_CLI_TARGET,CLI_TARGET,HARPER_CLI_USERNAME/_PASSWORD/_OPERATION_TOKEN/_REFRESH_TOKEN(and theCLI_TARGET_*equivalents),ACTIONS_ID_TOKEN_REQUEST_URL/_TOKEN,GITHUB_REPOSITORY/GITHUB_SHA/GITHUB_REF/GITHUB_EVENT_PATH,HOME/USERPROFILE,NODE_TLS_REJECT_UNAUTHORIZED,NODE_EXTRA_CA_CERTS,SSL_CERT_FILE/SSL_CERT_DIR,NODE_USE_ENV_PROXY,HTTP_PROXY/HTTPS_PROXY/NO_PROXY(any letter case) and the shell/CI environment does not already set it, CLI operations,harper loginand the backup commands stop with an error naming the keys. Values exported in the shell or CI environment work as before and win over the file. Other.envkeys still load. Application runtime.envhandling (harper run/dev, components) is unchanged.harper loginno longer appendsHARPER_CLI_TARGETto the project.env; it saves the target it connected to in~/.harperdb/credentials.json, which later commands use by default. It always saves and prints the URL the user gave, never a target named by the server's reply.harper logoutno longer reads.env.Migration to document: remove
HARPER_CLI_*/CLI_TARGET*lines from the project.env; then either rely onharper login <url>(saved target), passtarget=<url>, export the variables in the shell or CI secrets, or load the file deliberately in an npm script (dotenv -- harper deploy). CI usingharper login --for-cioutput as secrets is unaffected.Find every page in the docs that tells users to put
HARPER_CLI_TARGET(or credentials) in a project.env, or that saysharper loginwrites it there, and update it; add a short note to the CLI reference / CLI authentication page and the v5.4 release notes if the repo keeps them. Link the harper PR. No customer names.Acceptance
One draft documentation PR covering the CLI .env change and its migration, linking HarperFast/harper#4001.
Dispatch: task
docs-harper-4001· queued by task:harper-cli-target-credential-trust-bundle · ran by claude/opus/high · worker kzyp-xps-1Ready-For-Promotion: a792e3f urgency=normal late=folded
Review-Coverage: authored=claude; ran=gemini,cursor-composer,codex,cursor-grok; late=cursor-grok:adjudicated; adjudicated=domain; declined=muse; rounds=5; full=2 @ a792e3f
Review-Attention: skim ~2m (decisions: team-target-sharing-route, document-dotenv-cli-bypass, guide-uses-shell-export) @ a792e3f