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
@rannn505

Description

@rannn505

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

Metadata

Metadata

Assignees

Labels

featNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0