[PUT-1478] Add KV commands to CLI - #3579
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Puter CLI by adding an interactive puter kv connect <app> REPL that scopes puter.kv operations to a chosen app鈥檚 KV store, while also centralizing access to the SDK鈥檚 apps module and updating CLI metadata/docs to reflect the broader tooling scope.
Changes:
- Add
puter kv connect <app>command that launches a Node REPL with awaited results and one-line error output. - Introduce
bindApp()KV wrappers to reliably injectoptConfig: { appUuid }across kv method call forms. - Extract a shared
appsApi()guard and update CLI messaging/version/docs for the new KV functionality.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cli/src/lib/ui.js | Adds red() helper used for REPL error formatting. |
| src/cli/src/lib/kvbind.js | New helper to bind puter.kv calls to a specific app UUID across varied signatures. |
| src/cli/src/lib/apps.js | New shared accessor/guard for puter.apps / legacy variants. |
| src/cli/src/commands/kv.js | Implements the interactive KV REPL command (kv connect). |
| src/cli/src/commands/app.js | Reuses shared appsApi() instead of duplicating logic. |
| src/cli/README.md | Documents puter kv connect usage and behavior. |
| src/cli/package.json | Bumps version and updates description to match expanded scope. |
| src/cli/bin/puter.js | Registers the new kv connect command and updates CLI description. |
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.