flake-edit 0.0.1

Edit your flake inputs with ease.
Documentation

$ flake-edit - edit your flake inputs with ease

Built with Nix Crates Documentation Matrix Chat Room

$ flake-edit - edit your flake inputs with ease.

$ flake-edit - usage

flake-edit has the following cli interface:

$ flake-edit help

Edit your flake inputs with ease

Usage: flake-edit [OPTIONS] [FLAKE_REF] <COMMAND>

Commands:
  add
          Add a new flake reference
  remove
          Remove a specific flake reference based on its id
  list
          List flake inputs
  update
          Update inputs to their latest specified release
  pin
          Pin inputs to their current or a specified rev
  help
          Print this message or the help of the given subcommand(s)

Arguments:
  [FLAKE_REF]
          

Options:
      --flake <FLAKE>
          
      --diff
          Print a diff of the changes, will set the apply flag to false
      --apply
          Whether to apply possible changes
  -h, --help
          Print help
  -V, --version
          Print version

$ flake-edit add

$ flake-edit help add

Add a new flake reference

Usage: flake-edit add [OPTIONS] [ID] [URI]

Arguments:
  [ID]
          The name of an input attribute
  [URI]
          The uri that should be added to the input

Options:
      --ref-or-rev <REF_OR_REV>
          Pin to a specific ref_or_rev
  -n, --no-flake
          The input itself is not a flake
  -h, --help
          Print help

For some types, the id will be automatically inferred. flake-edit add example

For some inputs, the uri can be put in directly and the id and type will be inferred. flake-edit add inferred example

$ flake-edit remove

$ flake-edit help remove

Remove a specific flake reference based on its id

Usage: flake-edit remove [ID]

Arguments:
  [ID]
          

Options:
  -h, --help
          Print help

flake-edit remove example

$ flake-edit update

$ flake-edit help update

Update inputs to their latest specified release

Usage: flake-edit update

Options:
  -h, --help
          Print help

flake-edit update example

$ flake-edit list

$ flake-edit help list

List flake inputs

Usage: flake-edit list [OPTIONS]

Options:
      --format <FORMAT>
          [default: detailed]
  -h, --help
          Print help

List the outputs, that are specified inside the inputs attribute. flake-edit list example List the outputs, that are specified inside the inputs attribute, in json format. flake-edit list example

$ flake-edit pin

$ flake-edit help pin

Pin inputs to their current or a specified rev

Usage: flake-edit pin <ID> [REV]

Arguments:
  <ID>
          The id of an input attribute
  [REV]
          Optionally specify a rev for the inputs attribute

Options:
  -h, --help
          Print help

flake-edit pin Pin a specific input to it's current revision (rev).

As a library

Add flake-edit as a library by running:

cargo add flake-edit --no-default-features

Be aware that the lib interface is still unstable. Though we are already very happy to get feedback.

License

MIT