Skip to content

cli: profiles aliases, global options, allow-devices RPC hardening#231

Merged
Leechael merged 16 commits intomainfrom
feat/cli-profiles-alias
Apr 10, 2026
Merged

cli: profiles aliases, global options, allow-devices RPC hardening#231
Leechael merged 16 commits intomainfrom
feat/cli-profiles-alias

Conversation

@Leechael
Copy link
Copy Markdown
Collaborator

@Leechael Leechael commented Apr 9, 2026

Summary

Bundle of CLI improvements on top of the profiles-alias branch:

  • Profiles command aliases (list, rm, mv) for the profiles subcommand
  • Unified global option handling across dispatchers so shared flags don't need per-command plumbing
  • allow-devices accepts direct app identifiers (app_... / raw 40-hex) to avoid CVM ambiguity when a CVM hasn't been created yet
  • Transaction progress logging in the SDK blockchain actions (onTransactionSubmitted / onTransactionConfirmed / state change callbacks) and http() transport timeouts on add/remove/set-allow-any-device
  • RPC URL is echoed before every blockchain operation so users can see which endpoint they are hitting
  • RPC hang → fast fail + copy-paste retry:
    • Wrap every SDK call in allow-devices with a 30s CLI-level Promise.race timeout so a stuck viem default RPC (e.g. rate-limited eth.merkle.io) surfaces as a clear error instead of an 8-minute hang
    • On RPC connectivity errors (timeout / HttpRequestError / Cloudflare 1015 / 429 / etc.), print a ready-to-paste retry command that reconstructs the user's original invocation with --rpc-url swapped in for a chainlist-sourced alternative endpoint, plus a link to https://chainlist.org/chain/<id> for more options and pointers to paid providers
    • --private-key value is masked back to $PRIVATE_KEY in the reconstructed command so shell-expanded secrets don't leak
    • Added --rpc-url option to allow-devices list
    • Polling loop (waitForAllowlistState) uses a 15s per-iteration budget so one stuck call can't starve the outer 60s timeout
  • Output cleanup in allow-devices: dropped the logger and chalk wrappers; progress now writes to stderr directly, --json is respected via a per-handler say closure, no more colored /// prefixes in this subcommand

Test plan

  • bun run src profiles list / rm / mv — alias commands still work
  • bun run src allow-devices ls <app_id> on Ethereum + Base — plain-text output, no color
  • bun run src allow-devices ls <app_id> --json — JSON mode stays clean, no stray progress text
  • bun run src allow-devices add -i <app_id> --private-key $PRIVATE_KEY against a rate-limited RPC — fails within ~30s with the copy-paste retry hint, reconstructed command shows $PRIVATE_KEY literal (not the real key)
  • bun run src allow-devices add <app_id> <device_id> --private-key $PRIVATE_KEY --rpc-url <alt> — retry path works end-to-end
  • --wait path on add / remove / allow-any still observes the on-chain state

Leechael added 6 commits April 9, 2026 22:02
- Fail fast on stuck RPC (30s wrapper) and surface the hang as a
  clear error with a copy-paste retry command containing a
  chainlist-sourced alternative endpoint
- Mask --private-key in the reconstructed retry command so
  shell-expanded secrets don't leak into the error hint
- Add --rpc-url option to `allow-devices list`
- Drop logger and chalk wrappers from allow-devices output;
  write progress to stderr directly and respect --json via a
  per-handler say closure
@Leechael Leechael changed the title feat/cli profiles alias cli: profiles aliases, global options, allow-devices RPC hardening Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

📋 Check Results

✨ JS SDK - Code Formatting

Show format check results
✓ No formatting issues found

🔍 JS SDK - TypeScript Type Check

Show type check output
$ tsc --noEmit

🧪 JS SDK - Test Results

Show test output
$ vitest --run --exclude '**/*.e2e.test.ts'

�[7m�[1m�[36m RUN �[39m�[22m�[27m �[36mv1.6.1�[39m �[90m/home/runner/work/phala-cloud/phala-cloud/js�[39m

 �[32m✓�[39m src/actions/blockchains/deploy_app_auth.test.ts �[2m (�[22m�[2m27 tests�[22m�[2m)�[22m�[90m 31�[2mms�[22m�[39m
 �[32m✓�[39m src/client.test.ts �[2m (�[22m�[2m45 tests�[22m�[2m)�[22m�[90m 38�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/blockchains/add_compose_hash.test.ts �[2m (�[22m�[2m34 tests�[22m�[2m)�[22m�[90m 122�[2mms�[22m�[39m
�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould add compose hash successfully with default parameters�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould handle custom timeout�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould use custom schema when provided�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould return raw data when schema is false�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould throw when custom schema validation fails�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould work with wallet client authentication�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould work with both clients provided�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould skip prerequisite checks when configured�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould use retry mechanism when enabled�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mStandard Version�[2m > �[22m�[2mshould handle progress callbacks�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould return success result when operation succeeds�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould work with custom schema�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould return raw data when schema is false�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould work without parameters�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version�[2m > �[22m�[2mshould work with empty parameters object�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSchema Flexibility�[2m > �[22m�[2mshould allow extra fields in transaction receipt for forward compatibility�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSchema Flexibility�[2m > �[22m�[2mshould handle ComposeHashAdded event when present�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mType Inference�[2m > �[22m�[2mshould infer correct types for default schema�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mType Inference�[2m > �[22m�[2mshould infer correct types for custom schema�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mType Inference�[2m > �[22m�[2mshould infer unknown type when schema is false�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version Type Inference�[2m > �[22m�[2mshould infer correct SafeResult types for default schema�[22m�[39m
[]

�[90mstdout�[2m | src/actions/blockchains/add_compose_hash.test.ts�[2m > �[22m�[2maddComposeHash�[2m > �[22m�[2mSafe Version Type Inference�[2m > �[22m�[2mshould infer correct SafeResult types for custom schema�[22m�[39m
[]

 �[32m✓�[39m src/utils/errors.test.ts �[2m (�[22m�[2m30 tests�[22m�[2m)�[22m�[90m 19�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/define-action.test.ts �[2m (�[22m�[2m24 tests�[22m�[2m)�[22m�[90m 24�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/define-action.type.test.ts �[2m (�[22m�[2m20 tests�[22m�[2m)�[22m�[90m 22�[2mms�[22m�[39m
 �[32m✓�[39m src/types/cvm_id.test.ts �[2m (�[22m�[2m53 tests�[22m�[2m)�[22m�[90m 27�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/hostname.test.ts �[2m (�[22m�[2m53 tests�[22m�[2m)�[22m�[90m 26�[2mms�[22m�[39m
 �[32m✓�[39m src/parse_dotenv.test.ts �[2m (�[22m�[2m71 tests�[22m�[2m)�[22m�[90m 22�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/get_current_user.test.ts �[2m (�[22m�[2m14 tests�[22m�[2m)�[22m�[90m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/provision_cvm_compose_file_update.test.ts �[2m (�[22m�[2m29 tests�[22m�[2m)�[22m�[90m 29�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/commit_cvm_compose_file_update.test.ts �[2m (�[22m�[2m12 tests�[22m�[2m)�[22m�[90m 17�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_info.test.ts �[2m (�[22m�[2m11 tests�[22m�[2m)�[22m�[90m 24�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/watch_cvm_state.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 61�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_compose_file.test.ts �[2m (�[22m�[2m10 tests�[22m�[2m)�[22m�[90m 19�[2mms�[22m�[39m
 �[32m✓�[39m src/version-inference.type.test.ts �[2m (�[22m�[2m17 tests�[22m�[2m)�[22m�[90m 80�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/provision_cvm.test.ts �[2m (�[22m�[2m14 tests�[22m�[2m)�[22m�[90m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/client.extend.type.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 8�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_list.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/version-inference.runtime.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/kms/get_app_env_encrypt_pubkey.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 16�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/patch_cvm.test.ts �[2m (�[22m�[2m10 tests�[22m�[2m)�[22m�[90m 21�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/kms/get_kms_list.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 24�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/commit_cvm_provision.test.ts �[2m (�[22m�[2m7 tests�[22m�[2m)�[22m�[90m 23�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/kms/get_kms_info.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 24�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_stats.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 18�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/verify-webhook.test.ts �[2m (�[22m�[2m11 tests�[22m�[2m)�[22m�[90m 9�[2mms�[22m�[39m
 �[32m✓�[39m src/client.extend.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/confirm_cvm_patch.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/update_cvm_envs.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/validate-parameters.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 9�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/get_available_nodes.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 16�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/ssh_keys/create_ssh_key.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 9�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/shutdown_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/types/app_compose.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/restart_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/start_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/stop_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 16�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_containers_stats.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/ssh_keys/delete_ssh_key.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 19�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/delete_cvm.test.ts �[2m (�[22m�[2m8 tests�[22m�[2m)�[22m�[90m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/ssh_keys/sync_github_ssh_keys.test.ts �[2m (�[22m�[2m6 tests�[22m�[2m)�[22m�[90m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/as-hex.test.ts �[2m (�[22m�[2m9 tests�[22m�[2m)�[22m�[90m 7�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/get_cvm_state.test.ts �[2m (�[22m�[2m4 tests�[22m�[2m)�[22m�[90m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/refresh_cvm_instance_ids.test.ts �[2m (�[22m�[2m2 tests�[22m�[2m)�[22m�[90m 6�[2mms�[22m�[39m
 �[32m✓�[39m src/actions/cvms/refresh_cvm_instance_id.test.ts �[2m (�[22m�[2m2 tests�[22m�[2m)�[22m�[90m 6�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m46 passed�[39m�[22m�[90m (46)�[39m
�[2m      Tests �[22m �[1m�[32m685 passed�[39m�[22m�[90m (685)�[39m
�[2m   Start at �[22m 09:57:57
�[2m   Duration �[22m 8.18s�[2m (transform 1.31s, setup 3ms, collect 10.56s, tests 986ms, environment 13ms, prepare 5.22s)�[22m

📝 JS SDK - Lint Check

Show lint results
✓ No linting issues found

🌐 JS SDK - Browser Compatibility

Show browser test results

🌐 Browser Compatibility Report

Browser compatibility tests completed across:

  • ✓ Chromium
  • ✓ Firefox
  • ✓ WebKit (Safari)

The SDK has been verified to work in modern browser environments.


Check run: https://github.com/Phala-Network/phala-cloud/actions/runs/24237405225

When allowAnyDevice is true, getAllowedDevices short-circuits and
echoes the queried device IDs back as if they were "allowed" — which
is all platform nodes, not a real allowlist. Printing that table is
misleading. Skip the table in human output and return an empty
devices array in --json mode so consumers don't mistake the echo
for a curated list.
Extract shared privateKeyOption / rpcUrlOption into core/common-flags.ts
so on-chain KMS commands (deploy, allow-devices, cvms replicate,
envs update) share a single definition and consistent help text.

Add ETH_RPC_URL environment variable fallback to match foundry/cast
convention: --rpc-url > ETH_RPC_URL > chain default. Users with an
existing foundry workflow can reuse their RPC endpoint configuration.
PRIVATE_KEY env var support was already present; its description is
now surfaced uniformly in every command's help.
Introduces a lightweight help-topics system backed by markdown files in
docs/help/topics/. A codegen step (`bun run gen:help`) reads those files
and emits src/commands/help/topics.generated.ts, which is inlined into
the CLI bundle at build time — no runtime file reads, no tsup loader
tricks.

The first topic is `envs`, a single-page reference for every environment
variable the CLI recognizes: auth, on-chain KMS (PRIVATE_KEY,
ETH_RPC_URL), DEBUG semantics, self-update flags, CLOUD_URL, and
PHALA_CLOUD_DIR.

The global help output gains a "Help topics" block listing available
topics with a pointer to `phala help <topic>`. Adding a new topic only
requires dropping a .md file into docs/help/topics/ and running
`bun run gen:help`.
@Leechael
Copy link
Copy Markdown
Collaborator Author

!release js minor

@github-actions
Copy link
Copy Markdown
Contributor

🚀 @Leechael release command accepted: js minor.

Target branch: feat/cli-profiles-alias (open PR). Version commits will be pushed to this branch.
The release workflow is queued; results will be posted here.

@github-actions
Copy link
Copy Markdown
Contributor

@Leechael release failed: js 0.3.0

Branch: feat/cli-profiles-alias
Please review the workflow logs: https://github.com/Phala-Network/phala-cloud/actions/runs/24232700355

The owner pre-check added in 0c6a50c calls readContract({ functionName: "owner" })
expecting an address string, but the mock statically returned a tuple. Make the
mock recognize the owner call and return the sender address derived from the
test private key, aligning mockWalletClient.account.address so both privateKey
and walletClient modes share the same sender.
Pre-commit protection previously covered python and go only, so JS/CLI
regressions could slip into main. Mirror the release-npm.yml gates
(lint → type-check → test) for both js/ and cli/, gated by file scope so
Python/Go edits still skip the JS toolchain.

Enable fail_fast so the first failing hook surfaces immediately, and
assign priorities (10/20/30) so format/lint runs before type-check
before tests.

Build intentionally not hooked — CI is the source of truth for packaged
output; pre-commit aims to catch logic regressions fast.
@Leechael
Copy link
Copy Markdown
Collaborator Author

!release js patch

@github-actions
Copy link
Copy Markdown
Contributor

🚀 @Leechael release command accepted: js patch.

Target branch: feat/cli-profiles-alias (open PR). Version commits will be pushed to this branch.
The release workflow is queued; results will be posted here.

@github-actions
Copy link
Copy Markdown
Contributor

🎉 Release completed: js v0.2.7

📦 Package Info

  • Package size: size: 167.9
  • Unpacked size: size: 1.5
  • Total files: files:
📄 Files included
11.4kB LICENSE
2.7kB README.md
5.8kB dist/actions/apps/check_app_cvms_is_allowed.d.ts
4.0kB dist/actions/apps/check_app_is_allowed.d.ts
34.5kB dist/actions/apps/get_app_attestation.d.ts
1.2kB dist/actions/apps/get_app_cvms.d.ts
3.8kB dist/actions/apps/get_app_device_allowlist.d.ts
1.6kB dist/actions/apps/get_app_filter_options.d.ts
1.2kB dist/actions/apps/get_app_info.d.ts
3.0kB dist/actions/apps/get_app_list.d.ts
1.9kB dist/actions/apps/get_app_revision_detail.d.ts
1.7kB dist/actions/apps/get_app_revisions.d.ts
3.9kB dist/actions/blockchains/abi/dstack_app.d.ts
2.6kB dist/actions/blockchains/add_compose_hash.d.ts
2.5kB dist/actions/blockchains/add_device.d.ts

@Leechael
Copy link
Copy Markdown
Collaborator Author

!release cli patch

@github-actions
Copy link
Copy Markdown
Contributor

🚀 @Leechael release command accepted: cli patch.

Target branch: feat/cli-profiles-alias (open PR). Version commits will be pushed to this branch.
The release workflow is queued; results will be posted here.

@github-actions
Copy link
Copy Markdown
Contributor

🎉 Release completed: cli v1.1.15

📦 Package Info

  • Package size: size: 146.2
  • Unpacked size: size: 540.9
  • Total files: files:
📄 Files included
11.4kB LICENSE
3.8kB README.md
29.6kB dist/api/index.d.ts
113.8kB dist/api/index.js
20B dist/index.d.ts
380.3kB dist/index.js
1.9kB package.json

All changes come from a copy review of user-facing strings added in the
cli-v1.1.14..HEAD delta.

Refactor:
- Extract transactionHashOption to common-flags with explicit documentation
  of the `already-registered` sentinel. Share between deploy and cvms
  replicate so the description stays in sync.

Fixes flagged in the audit:
- common-flags: globalInteractiveOption "when supported" is vague — clarify
  as "for commands that support it". apiTokenOption drops passive phrasing.
  rpcUrlOption drops the foundry/cast parenthetical (commit-message noise in
  --help) and aligns with on-chain KMS language.
- allow-devices add/remove: drop `(s)` pseudo-pluralization; split the
  compound device_id argument description into two sentences.
- allow-devices allow-any: note that --enable or --disable is required.
  disallow-any: note the equivalence to `allow-any --disable`.
- profiles use/rename/delete: align with top-level "auth profile" wording.
- cvms replicate: tighten prepare-only ("Only ... without performing" hedge
  stacking); drop redundant "Explicit" in compose-hash; normalize trailing
  punctuation; correct --commit description to list --transaction-hash in
  the requirements.
- deploy: tighten prepare-only wording for the same reason.

envs.md help topic:
- PRIVATE_KEY: align with the flag description ("for signing", active).
- ETH_RPC_URL: expand the "reuse existing setup" fragment into a full
  sentence explaining the foundry/cast interop.

Regenerated topics.generated.ts via `bun run gen:help`.
The previous commit unified deploy and replicate --commit descriptions as
"Requires --token, --compose-hash, and --transaction-hash", but that's
accurate only for replicate. The deploy handler (commitCvmUpdate) only
hard-requires --token and --cvm-id: --compose-hash is auto-read from the
commit token when omitted, and --transaction-hash falls back to the
already-registered sentinel.

Restore the asymmetry so the --help text matches actual runtime behavior.
@Leechael
Copy link
Copy Markdown
Collaborator Author

!release cli patch

@github-actions
Copy link
Copy Markdown
Contributor

🚀 @Leechael release command accepted: cli patch.

Target branch: feat/cli-profiles-alias (open PR). Version commits will be pushed to this branch.
The release workflow is queued; results will be posted here.

@github-actions
Copy link
Copy Markdown
Contributor

🎉 Release completed: cli v1.1.16

📦 Package Info

  • Package size: size: 146.3
  • Unpacked size: size: 541.1
  • Total files: files:
📄 Files included
11.4kB LICENSE
3.8kB README.md
29.6kB dist/api/index.d.ts
113.8kB dist/api/index.js
20B dist/index.d.ts
380.5kB dist/index.js
1.9kB package.json

@Leechael Leechael merged commit f9041a4 into main Apr 10, 2026
1 check passed
@Leechael Leechael deleted the feat/cli-profiles-alias branch April 10, 2026 15:19
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.

2 participants