8000 Add --interactive (-i) flag to `configu upsert` for editor-based config upserts · Issue #742 · configu/configu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add --interactive (-i) flag to configu upsert for editor-based config upserts #742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rannn505 opened this issue May 20, 2025 · 0 comments
Assignees
Labels
feat New feature or request

Comments

@rannn505
Copy link
Contributor
rannn505 commented May 20, 2025

Suggestion

Add an --interactive (-i) flag to the configu upsert command to open the user's default text editor with a temporary file pre-filled with config data.

When invoked, this mode:

  • Opens the editor with a temp file formatted in YAML or JSON (based on schema or .configu settings).
  • Pre-populates keys and values from the schema and previously upserted values.
  • Applies changes after the editor is closed, continuing the upsert process as normal.
  • Merges key-values from --kv if also provided, to pre-fill the editor content.
  • Uses settings from .configu.cli.editor and .configu.cli.format to control the editor and format.

Motivation

Many developers prefer editing structured configurations in a full editor instead of passing long strings via CLI.

This feature:

  • improves UX for complex configurations data.
  • Makes configu upsert more ergonomic for local development and debugging.
  • Enables a familiar workflow (e.g. Git’s --edit, kubectl edit, Helm --values).
  • Is a key building block for future interactive CLI experiences with Configu.

Context

  • Related future commands might include: configu open schema, configu open config, or configu open dashboard.
  • This sets the naming precedent for interactive workflows in Configu CLI.
  • Interactive editor behavior (format, editor binary) is configurable via .configu:
    cli:
      editor: code
      format: yaml
flowchart TD
    A[User runs configu upsert -i] --> B[Load schema + previous config values]
    B --> C[Merge with --kv if used]
    C --> D[Format config in YAML/JSON]
    D --> E[Open in default editor from .configu]
    E --> F[User edits and saves file]
    F --> G[Validate and apply config]
    G --> H[Finish upsert process]
Loading
@rannn505 rannn505 self-assigned this May 20, 2025
@rannn505 rannn505 added the feat New feature or request label May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant
0