Skip to content

feat(cli) Add command to Update a Secret - #2990

Merged
AzamAbdul merged 5 commits into
agent/browse-v4-7-context-namesfrom
feat/cli-update-secret-v4
Sep 23, 2026
Merged

AzamAbdul merged 5 commits into
agent/browse-v4-7-context-namesfrom
feat/cli-update-secret-v4

Conversation

@AzamAbdul

Copy link
Copy Markdown
Contributor

why

We want to add secrets support to the browse cli and is a continuation of the efforts introduced in this PR:
#2946.

In this particular PR, we add support for updating a secret by retrieving the public key for the project, reading the secret value from an env variable, a value piped to stdin, or prompting them in a password prompt (the inquire package), encrypting the value with the public key, then calling the update secret endpoint via patch with the provided secret-id and the encrypted value.

what changed

  • Adds a command to update a secret

test plan

  • unit tests
  • point cli at local secrets api, verify encrypted secrets value lands in local db and is updated

@AzamAbdul
AzamAbdul added this pull request to stack #2950 September 19, 2026 00:26
@changeset-bot

changeset-bot Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9a8a6f3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
browse Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@AzamAbdul AzamAbdul changed the title Feat/cli Add command to Update a Secret feat(cli) Add command to Update a Secret Sep 19, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/cli/tests/cli-secrets-update-contract.test.ts
];
static override args = {
secretId: Args.string({
description: "Project secret ID.",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: maybe mention the format or give an example of a secretId if helpful for agents? but if not done for other CRUD operations, no need to do here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can add it for the other crud ops too here

@shrey150 shrey150 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

would address / resolve cubic comments before continuing

@AzamAbdul
AzamAbdul force-pushed the feat/cli-update-secret-v4 branch 2 times, most recently from bfbb841 to ff31e3c Compare September 23, 2026 00:12
Base automatically changed from feat/cli-create-secret-v4 to agent/browse-v4-7-context-names September 23, 2026 00:41
@AzamAbdul
AzamAbdul force-pushed the feat/cli-update-secret-v4 branch from 0e9f6cb to 9a8a6f3 Compare September 23, 2026 00:41
@AzamAbdul
AzamAbdul merged commit 5169775 into agent/browse-v4-7-context-names Sep 23, 2026
8 checks passed
AzamAbdul added a commit that referenced this pull request Sep 23, 2026
# why

Browse needs commands to manage project secrets and attach them to
Functions. The seven component PRs were merged into
`agent/browse-v4-7-context-names`; this PR brings those changes onto
current `main` at `fbcdf61`.

# what changed

- Add `browse cloud secrets` commands to list, get, create, update, and
delete secrets, including client-side encryption for create/update and
password input support.
- Add `browse functions secrets` commands to attach, detach, and list
secrets for a function.
- Include API helpers, command contract tests, dependencies, and the
seven Browse changesets.

Cherry-picked in order from #2946, #2949, #2967, #2990, #3006, #3007,
and #3009. All seven applied without conflicts. The secrets
implementation is unchanged from the original branch. This branch
retains main's Browse 0.10.0 release and excludes the old parent
branch's context-name and eval changes.

# test plan

Validated locally on macOS with Node 24.18.0 and pnpm 11.23.0:

- `pnpm install --frozen-lockfile` — passed.
- `pnpm exec turbo run build --filter=browse` — all four tasks passed
(protocol, extension, SDK, CLI).
- `pnpm --filter browse lint` — formatting, ESLint, and TypeScript
passed.
- `pnpm --filter browse test:cli` — 36 files / 471 tests passed, using
an isolated daemon directory and umask 022.
- `pnpm exec node --import tsx scripts/release/check-changesets.ts` and
`git diff --check` — passed.

Validation covers the built CLI and local contract fixtures; no
production secrets were created or modified.

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
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.

3 participants