Skip to content

Add formatting-preserving vex add and vex remove commands #28

Closed

Description

@LunaStev

Motivation

Users must currently edit vex.ws manually to add or remove Git and path dependencies. Cargo-like dependency management should provide safe CLI operations, but a naive serializer could destroy comments, field ordering, and user formatting.

Proposed commands

  • vex add <name> --git <url> [--branch|--tag|--rev <value>] [--version <version>]
  • vex add <name> --path <path> [--version <version>]
  • vex remove <name>

Design requirements

  • Preserve unrelated formatting and comments in vex.ws.
  • Reject ambiguous source and selector combinations using existing rules.
  • Resolve and update vex.lock transactionally.
  • Respect Git-first development without introducing a registry.
  • Produce a clear diff and actionable errors.

Acceptance criteria

  • Agree on a syntax-preserving WSON edit strategy before implementation.
  • Add round-trip fixtures with comments and non-default formatting.
  • Ensure failed resolution does not leave either file partially updated.
  • Cover Git, path, duplicate, unknown, and transitive-name cases.
  • Document examples in the README.

Activity

  1. added
    discussion
    feature request
    ui/ux
    dependencies
    on Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesdiscussionfeature requestui/ux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions