{
  "name": "pijul",
  "description": "A distributed version control system that is at the same time theoretically sound, fast and easy to learn and use",
  "subcommands": [
    {
      "name": "add",
      "description": "Adds a path to the tree",
      "options": [
        {
          "names": [
            "-f",
            "--force"
          ]
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "-r",
            "--recursive"
          ]
        }
      ],
      "args": [
        {
          "name": "PATHS",
          "description": "Paths to add to the internal tree"
        }
      ]
    },
    {
      "name": "apply",
      "description": "Applies changes to a channel",
      "options": [
        {
          "names": [
            "--channel"
          ],
          "description": "Apply change to this channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "--deps-only"
          ],
          "description": "Only apply the dependencies of the change, not the change itself. Only applicable for a single change"
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        }
      ],
      "args": [
        {
          "name": "CHANGE",
          "description": "The change that need to be applied. If this value is missing, read the change in text format on the standard input"
        }
      ]
    },
    {
      "name": "archive",
      "description": "Creates an archive of the repository",
      "options": [
        {
          "names": [
            "--change"
          ],
          "description": "Apply these changes after switching to the channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANGE"
          }
        },
        {
          "names": [
            "--channel"
          ],
          "description": "Use this channel, instead of the current channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "-k"
          ],
          "description": "Do not check certificates (HTTPS remotes only, this option might be dangerous)"
        },
        {
          "names": [
            "-o"
          ],
          "description": "Name of the output file",
          "takes_arg": true,
          "arg": {
            "name": "NAME"
          }
        },
        {
          "names": [
            "--prefix"
          ],
          "description": "Append this path in front of each path inside the archive",
          "takes_arg": true,
          "arg": {
            "name": "PREFIX"
          }
        },
        {
          "names": [
            "--remote"
          ],
          "description": "Ask the remote to send an archive",
          "takes_arg": true,
          "arg": {
            "name": "REMOTE"
          }
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        },
        {
          "names": [
            "--state"
          ],
          "description": "Archive in this state",
          "takes_arg": true,
          "arg": {
            "name": "STATE"
          }
        },
        {
          "names": [
            "--umask"
          ],
          "description": "Append this path in front of each path inside the archive",
          "takes_arg": true,
          "arg": {
            "name": "UMASK"
          }
        }
      ]
    },
    {
      "name": "change",
      "description": "Shows information about a particular change",
      "options": [
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Use the repository at PATH instead of the current directory",
          "takes_arg": true,
          "arg": {
            "name": "PATH"
          }
        }
      ],
      "args": [
        {
          "name": "HASH",
          "description": "The hash of the change to show, or an unambiguous prefix thereof"
        }
      ]
    },
    {
      "name": "channel",
      "description": "Manages different channels",
      "subcommands": [
        {
          "name": "delete",
          "description": "Delete a channel. The channel must not be the current channel",
          "options": [
            {
              "names": [
                "-h",
                "--help"
              ],
              "description": "Print help information"
            }
          ],
          "args": [
            {
              "name": "DELETE"
            }
          ]
        },
        {
          "name": "help",
          "description": "Print this message or the help of the given subcommand(s)"
        },
        {
          "name": "new",
          "description": "Create a new, empty channel"
        },
        {
          "name": "rename",
          "description": "Rename a channel",
          "options": [
            {
              "names": [
                "-h",
                "--help"
              ],
              "description": "Print help information"
            }
          ],
          "args": [
            {
              "name": "FROM"
            },
            {
              "name": "TO"
            }
          ]
        },
        {
          "name": "switch",
          "description": "Switch to a channel. There must not be unrecorded changes in the working copy"
        }
      ],
      "options": [
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        }
      ]
    },
    {
      "name": "clone",
      "description": "Clones an existing pijul repository",
      "options": [
        {
          "names": [
            "--change"
          ],
          "description": "Clone this change and its dependencies",
          "takes_arg": true,
          "arg": {
            "name": "CHANGE"
          }
        },
        {
          "names": [
            "--channel"
          ],
          "description": "Set the remote channel [default: main]",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "-k"
          ],
          "description": "Do not check certificates (HTTPS remotes only, this option might be dangerous)"
        },
        {
          "names": [
            "--path"
          ],
          "description": "Clone this path only",
          "takes_arg": true,
          "arg": {
            "name": "PARTIAL_PATHS"
          }
        },
        {
          "names": [
            "--state"
          ],
          "description": "Clone this state",
          "takes_arg": true,
          "arg": {
            "name": "STATE"
          }
        }
      ],
      "args": [
        {
          "name": "REMOTE",
          "description": "Clone this remote"
        },
        {
          "name": "PATH",
          "description": "Path where to clone the repository. If missing, the inferred name of the remote repository is used"
        },
        {
          "name": "SALT"
        }
      ]
    },
    {
      "name": "credit",
      "description": "Shows which change last affected each line of the given file(s)",
      "options": [
        {
          "names": [
            "--channel"
          ],
          "description": "Use this channel instead of the current channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        }
      ],
      "args": [
        {
          "name": "FILE",
          "description": "The file to annotate"
        }
      ]
    },
    {
      "name": "diff",
      "description": "Shows difference between two channels/changes",
      "options": [
        {
          "names": [
            "--channel"
          ],
          "description": "Compare with this channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--json"
          ],
          "description": "Output the diff in JSON format instead of the default change text format"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        },
        {
          "names": [
            "-s",
            "--short"
          ],
          "description": "Show a short version of the diff"
        },
        {
          "names": [
            "--tag"
          ],
          "description": "Add all the changes of this channel as dependencies (except changes implied transitively), instead of the minimal dependencies"
        },
        {
          "names": [
            "-u",
            "--untracked"
          ],
          "description": "Include the untracked files"
        }
      ],
      "args": [
        {
          "name": "PREFIXES",
          "description": "Only diff those paths (files or directories). If missing, diff the entire repository"
        }
      ]
    },
    {
      "name": "fork",
      "description": "Create a new channel",
      "options": [
        {
          "names": [
            "--change"
          ],
          "description": "Apply this change after creating the channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANGE"
          }
        },
        {
          "names": [
            "--channel"
          ],
          "description": "Make the new channel from this channel instead of the current channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        }
      ],
      "args": [
        {
          "name": "TO",
          "description": "The name of the new channel"
        }
      ]
    },
    {
      "name": "init",
      "description": "Initializes an empty pijul repository",
      "options": [
        {
          "names": [
            "--channel"
          ],
          "description": "Set the name of the current channel (defaults to “main”)",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "-k",
            "--kind"
          ],
          "description": "Project kind; if Pijul knows about your project kind, the .ignore file will be populated with a conservative list of commonly ignored entries. Example: pijul init --kind=rust",
          "takes_arg": true,
          "arg": {
            "name": "KIND"
          }
        }
      ],
      "args": [
        {
          "name": "PATH",
          "description": "Path where the repository should be initialized"
        }
      ]
    },
    {
      "name": "log",
      "description": "Show the entire log of changes",
      "options": [
        {
          "names": [
            "--channel"
          ],
          "description": "Show logs for this channel instead of the current channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "--description"
          ],
          "description": "Include full change description in the output"
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--hash-only"
          ],
          "description": "Only show the change hashes"
        },
        {
          "names": [
            "--limit"
          ],
          "description": "Output at most this many changes",
          "takes_arg": true,
          "arg": {
            "name": "LIMIT"
          }
        },
        {
          "names": [
            "--offset"
          ],
          "description": "Start after this many changes",
          "takes_arg": true,
          "arg": {
            "name": "OFFSET"
          }
        },
        {
          "names": [
            "--output-format"
          ],
          "takes_arg": true,
          "arg": {
            "name": "OUTPUT_FORMAT"
          }
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        },
        {
          "names": [
            "--state"
          ],
          "description": "Include state identifiers in the output"
        }
      ],
      "args": [
        {
          "name": "FILTERS",
          "description": "Filter log output, showing only log entries that touched the specified files. Accepted as a list of paths relative to your current directory. Currently, filters can only be applied when logging the ch"
        }
      ]
    },
    {
      "name": "ls"
    },
    {
      "name": "mv"
    },
    {
      "name": "pull",
      "description": "Pulls changes from a remote upstream",
      "options": [
        {
          "names": [
            "-a",
            "--all"
          ],
          "description": "Pull all changes"
        },
        {
          "names": [
            "-f",
            "--force-cache"
          ],
          "description": "Force an update of the local remote cache. May effect some reporting of unrecords/concurrent changes in the remote"
        },
        {
          "names": [
            "--from-channel"
          ],
          "description": "Pull from this remote channel",
          "takes_arg": true,
          "arg": {
            "name": "FROM_CHANNEL"
          }
        },
        {
          "names": [
            "--full"
          ],
          "description": "Download full changes, even when not necessary"
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "-k"
          ],
          "description": "Do not check certificates (HTTPS remotes only, this option might be dangerous)"
        },
        {
          "names": [
            "--path"
          ],
          "description": "Only pull to these paths",
          "takes_arg": true,
          "arg": {
            "name": "PATH"
          }
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        },
        {
          "names": [
            "--to-channel"
          ],
          "description": "Pull into this channel instead of the current channel",
          "takes_arg": true,
          "arg": {
            "name": "TO_CHANNEL"
          }
        }
      ],
      "args": [
        {
          "name": "FROM",
          "description": "Pulls from this remote"
        },
        {
          "name": "CHANGES",
          "description": "Pull changes from the local repository, not necessarily from a channel"
        }
      ]
    },
    {
      "name": "push",
      "description": "Pushes changes to a remote upstream",
      "options": [
        {
          "names": [
            "-a",
            "--all"
          ],
          "description": "Push all changes"
        },
        {
          "names": [
            "-f",
            "--force-cache"
          ],
          "description": "Force an update of the local remote cache. May effect some reporting of unrecords/concurrent changes in the remote"
        },
        {
          "names": [
            "--from-channel"
          ],
          "description": "Push from this channel instead of the default channel",
          "takes_arg": true,
          "arg": {
            "name": "FROM_CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "-k"
          ],
          "description": "Do not check certificates (HTTPS remotes only, this option might be dangerous)"
        },
        {
          "names": [
            "--path"
          ],
          "description": "Push changes only relating to these paths",
          "takes_arg": true,
          "arg": {
            "name": "PATH"
          }
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Path to the repository. Uses the current repository if the argument is omitted",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        },
        {
          "names": [
            "--to-channel"
          ],
          "description": "Push to this remote channel instead of the remote’s default channel",
          "takes_arg": true,
          "arg": {
            "name": "TO_CHANNEL"
          }
        }
      ],
      "args": [
        {
          "name": "TO",
          "description": "Push to this remote"
        },
        {
          "name": "CHANGES",
          "description": "Push only these changes"
        }
      ]
    },
    {
      "name": "record",
      "description": "Creates a new change",
      "options": [
        {
          "names": [
            "-a",
            "--all"
          ],
          "description": "Record all paths that have changed"
        },
        {
          "names": [
            "--amend"
          ],
          "description": "Amend this change instead of creating a new change",
          "takes_arg": true,
          "arg": {
            "name": "AMEND"
          }
        },
        {
          "names": [
            "--author"
          ],
          "description": "Set the author field",
          "takes_arg": true,
          "arg": {
            "name": "AUTHOR"
          }
        },
        {
          "names": [
            "--channel"
          ],
          "description": "Record the change in this channel instead of the current channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--ignore-missing"
          ],
          "description": "Ignore missing (deleted) files"
        },
        {
          "names": [
            "-m",
            "--message"
          ],
          "description": "Set the change message",
          "takes_arg": true,
          "arg": {
            "name": "MESSAGE"
          }
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        },
        {
          "names": [
            "--timestamp"
          ],
          "description": "Set the timestamp field",
          "takes_arg": true,
          "arg": {
            "name": "TIMESTAMP"
          }
        },
        {
          "names": [
            "--working-copy"
          ],
          "takes_arg": true,
          "arg": {
            "name": "WORKING_COPY"
          }
        }
      ],
      "args": [
        {
          "name": "PREFIXES",
          "description": "Paths in which to record the changes"
        }
      ]
    },
    {
      "name": "remote",
      "description": "Manages remote repositories",
      "subcommands": [
        {
          "name": "delete",
          "description": "Deletes the remote",
          "options": [
            {
              "names": [
                "-h",
                "--help"
              ],
              "description": "Print help information"
            }
          ],
          "args": [
            {
              "name": "REMOTE"
            }
          ]
        },
        {
          "name": "help",
          "description": "Print this message or the help of the given subcommand(s)"
        }
      ],
      "options": [
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        }
      ]
    },
    {
      "name": "remove",
      "description": "Removes a file from the tree of tracked files (pijul record will then record this as a deletion)",
      "options": [
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        }
      ],
      "args": [
        {
          "name": "PATHS",
          "description": "The paths need to be removed"
        }
      ]
    },
    {
      "name": "reset",
      "description": "Resets the working copy to the last recorded change.\nIn other words, discards all unrecorded changes",
      "options": [
        {
          "names": [
            "--channel"
          ],
          "description": "Reset the working copy to this channel, and change the current channel to this channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "--dry-run"
          ],
          "description": "Print this file to the standard output, without modifying the repository (works for a single file only)"
        },
        {
          "names": [
            "-f",
            "--force"
          ],
          "description": "Reset even if there are unrecorded changes"
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        }
      ],
      "args": [
        {
          "name": "FILES",
          "description": "Only reset these files"
        }
      ]
    },
    {
      "name": "unrecord",
      "description": "Unrecords a list of changes",
      "options": [
        {
          "names": [
            "--channel"
          ],
          "description": "Unrecord changes from this channel instead of the current channel",
          "takes_arg": true,
          "arg": {
            "name": "CHANNEL"
          }
        },
        {
          "names": [
            "-h",
            "--help"
          ],
          "description": "Print help information"
        },
        {
          "names": [
            "--repository"
          ],
          "description": "Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a .pijul directory",
          "takes_arg": true,
          "arg": {
            "name": "REPO_PATH"
          }
        },
        {
          "names": [
            "--reset"
          ],
          "description": "Also undo the changes in the working copy (preserving unrecorded changes if there are any)"
        },
        {
          "names": [
            "--show-changes"
          ],
          "description": "Show N changes in a text editor if no s were given. Defaults to the value of unrecord_changes in your global configuration",
          "takes_arg": true,
          "arg": {
            "name": "N"
          }
        }
      ],
      "args": [
        {
          "name": "CHANGE_ID",
          "description": "The hash of a change (unambiguous prefixes are accepted)"
        }
      ]
    }
  ]
}
