{
  "name": "atuin",
  "description": "Magical shell history",
  "options": [
    {
      "names": [
        "--help",
        "-h"
      ],
      "description": "Print help",
      "isPersistent": true
    },
    {
      "names": [
        "--version",
        "-V"
      ],
      "description": "Print version"
    }
  ],
  "subcommands": [
    {
      "name": "history",
      "description": "Manipulate shell history",
      "subcommands": [
        {
          "name": "start",
          "description": "Begins a new command in the history",
          "args": [
            {
              "name": "COMMAND",
              "isVariadic": true
            }
          ]
        },
        {
          "name": "end",
          "description": "Finishes a new command in the history (adds time, exit code)",
          "options": [
            {
              "names": [
                "--exit",
                "-e"
              ],
              "args": [
                {
                  "name": "EXIT"
                }
              ]
            }
          ],
          "args": [
            {
              "name": "ID"
            }
          ]
        },
        {
          "name": "list",
          "description": "List all items in history",
          "options": [
            {
              "names": [
                "--cwd",
                "-c"
              ]
            },
            {
              "names": [
                "--session",
                "-s"
              ]
            },
            {
              "names": [
                "--human"
              ]
            },
            {
              "names": [
                "--cmd-only"
              ],
              "description": "Show only the text of the command"
            },
            {
              "names": [
                "--format",
                "-f"
              ],
              "args": [
                {
                  "name": "FORMAT",
                  "description": "Available variables: {command}, {directory}, {duration}, {user}, {host} and {time}. Example: --format \"{time} - [{duration}] - {directory}$\\t{command}\""
                }
              ]
            }
          ]
        },
        {
          "name": "last",
          "description": "Get the last command ran",
          "options": [
            {
              "names": [
                "--human"
              ]
            },
            {
              "names": [
                "--cmd-only"
              ],
              "description": "Show only the text of the command"
            },
            {
              "names": [
                "--format",
                "-f"
              ],
              "args": [
                {
                  "name": "FORMAT",
                  "description": "Available variables: {command}, {directory}, {duration}, {user}, {host} and {time}. Example: --format \"{time} - [{duration}] - {directory}$\\t{command}\""
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "import",
      "description": "Import shell history from file",
      "subcommands": [
        {
          "name": "auto",
          "description": "Import history for the current shell"
        },
        {
          "name": "zsh",
          "description": "Import history from the zsh history file"
        },
        {
          "name": "zsh-hist-db",
          "description": "Import history from the zsh history file"
        },
        {
          "name": "bash",
          "description": "Import history from the bash history file"
        },
        {
          "name": "resh",
          "description": "Import history from the resh history file"
        },
        {
          "name": "fish",
          "description": "Import history from the fish history file"
        },
        {
          "name": "nu",
          "description": "Import history from the nu history file"
        },
        {
          "name": "nu-hist-db",
          "description": "Import history from the nu history file"
        }
      ]
    },
    {
      "name": "stats",
      "description": "Calculate statistics for your history",
      "options": [
        {
          "names": [
            "--count",
            "-c"
          ],
          "description": "How many top commands to list",
          "args": [
            {
              "name": "COUNT"
            }
          ]
        }
      ],
      "args": [
        {
          "name": "PERIOD",
          "description": "Compute statistics for the specified period, leave blank for statistics since the beginning",
          "isVariadic": true
        }
      ]
    },
    {
      "name": "search",
      "description": "Interactive history search",
      "options": [
        {
          "names": [
            "--cwd",
            "-c"
          ],
          "description": "Filter search result by directory",
          "args": [
            {
              "name": "CWD"
            }
          ]
        },
        {
          "names": [
            "--exclude-cwd"
          ],
          "description": "Exclude directory from results",
          "args": [
            {
              "name": "EXCLUDE_CWD"
            }
          ]
        },
        {
          "names": [
            "--exit",
            "-e"
          ],
          "description": "Filter search result by exit code",
          "args": [
            {
              "name": "EXIT"
            }
          ]
        },
        {
          "names": [
            "--exclude-exit"
          ],
          "description": "Exclude results with this exit code",
          "args": [
            {
              "name": "EXCLUDE_EXIT"
            }
          ]
        },
        {
          "names": [
            "--before",
            "-b"
          ],
          "description": "Only include results added before this date",
          "args": [
            {
              "name": "BEFORE"
            }
          ]
        },
        {
          "names": [
            "--after"
          ],
          "description": "Only include results after this date",
          "args": [
            {
              "name": "AFTER"
            }
          ]
        },
        {
          "names": [
            "--limit"
          ],
          "description": "How many entries to return at most",
          "args": [
            {
              "name": "LIMIT"
            }
          ]
        },
        {
          "names": [
            "--offset"
          ],
          "description": "Offset from the start of the results",
          "args": [
            {
              "name": "OFFSET"
            }
          ]
        },
        {
          "names": [
            "--interactive",
            "-i"
          ],
          "description": "Open interactive search UI"
        },
        {
          "names": [
            "--filter-mode"
          ],
          "description": "Allow overriding filter mode over config",
          "args": [
            {
              "name": "FILTER_MODE",
              "suggestions": [
                "global",
                "host",
                "session",
                "directory",
                "workspace"
              ]
            }
          ]
        },
        {
          "names": [
            "--search-mode"
          ],
          "description": "Allow overriding search mode over config",
          "args": [
            {
              "name": "SEARCH_MODE",
              "suggestions": [
                "prefix",
                "full-text",
                "fuzzy",
                "skim"
              ]
            }
          ]
        },
        {
          "names": [
            "--human"
          ],
          "description": "Use human-readable formatting for time"
        },
        {
          "names": [
            "--cmd-only"
          ],
          "description": "Show only the text of the command"
        },
        {
          "names": [
            "--delete"
          ],
          "description": "Delete anything matching this query. Will not print out the match"
        },
        {
          "names": [
            "--delete-it-all"
          ],
          "description": "Delete EVERYTHING!"
        },
        {
          "names": [
            "--reverse",
            "-r"
          ],
          "description": "Reverse the order of results, oldest first"
        },
        {
          "names": [
            "--format",
            "-f"
          ],
          "args": [
            {
              "name": "FORMAT",
              "description": "Available variables: {command}, {directory}, {duration}, {user}, {host} and {time}. Example: --format \"{time} - [{duration}] - {directory}$\\t{command}\""
            }
          ]
        },
        {
          "names": [
            "--inline-height"
          ],
          "description": "Set the maximum number of lines Atuin's interface should take up",
          "args": [
            {
              "name": "INLINE_HEIGHT"
            }
          ]
        }
      ],
      "args": [
        {
          "name": "QUERY",
          "isVariadic": true
        }
      ]
    },
    {
      "name": "sync",
      "description": "Sync with the configured server",
      "options": [
        {
          "names": [
            "--force",
            "-f"
          ],
          "description": "Force re-download everything"
        }
      ]
    },
    {
      "name": "login",
      "description": "Login to the configured server",
      "options": [
        {
          "names": [
            "--username",
            "-u"
          ],
          "args": [
            {
              "name": "USERNAME"
            }
          ]
        },
        {
          "names": [
            "--password",
            "-p"
          ],
          "args": [
            {
              "name": "PASSWORD"
            }
          ]
        },
        {
          "names": [
            "--key",
            "-k"
          ],
          "description": "The encryption key for your account",
          "args": [
            {
              "name": "KEY"
            }
          ]
        }
      ]
    },
    {
      "name": "logout",
      "description": "Log out"
    },
    {
      "name": "register",
      "description": "Register with the configured server",
      "options": [
        {
          "names": [
            "--username",
            "-u"
          ],
          "args": [
            {
              "name": "USERNAME"
            }
          ]
        },
        {
          "names": [
            "--password",
            "-p"
          ],
          "args": [
            {
              "name": "PASSWORD"
            }
          ]
        },
        {
          "names": [
            "--email",
            "-e"
          ],
          "args": [
            {
              "name": "EMAIL"
            }
          ]
        }
      ]
    },
    {
      "name": "key",
      "description": "Print the encryption key for transfer to another machine",
      "options": [
        {
          "names": [
            "--base64"
          ],
          "description": "Switch to base64 output of the key"
        }
      ]
    },
    {
      "name": "status"
    },
    {
      "name": "account",
      "subcommands": [
        {
          "name": "login",
          "description": "Login to the configured server",
          "options": [
            {
              "names": [
                "--username",
                "-u"
              ],
              "args": [
                {
                  "name": "USERNAME"
                }
              ]
            },
            {
              "names": [
                "--password",
                "-p"
              ],
              "args": [
                {
                  "name": "PASSWORD"
                }
              ]
            },
            {
              "names": [
                "--key",
                "-k"
              ],
              "description": "The encryption key for your account",
              "args": [
                {
                  "name": "KEY"
                }
              ]
            }
          ]
        },
        {
          "name": "register",
          "options": [
            {
              "names": [
                "--username",
                "-u"
              ],
              "args": [
                {
                  "name": "USERNAME"
                }
              ]
            },
            {
              "names": [
                "--password",
                "-p"
              ],
              "args": [
                {
                  "name": "PASSWORD"
                }
              ]
            },
            {
              "names": [
                "--email",
                "-e"
              ],
              "args": [
                {
                  "name": "EMAIL"
                }
              ]
            }
          ]
        },
        {
          "name": "logout",
          "description": "Log out"
        },
        {
          "name": "delete"
        }
      ]
    },
    {
      "name": "kv",
      "subcommands": [
        {
          "name": "set",
          "options": [
            {
              "names": [
                "--key",
                "-k"
              ],
              "isRequired": true,
              "args": [
                {
                  "name": "KEY"
                }
              ]
            },
            {
              "names": [
                "--namespace",
                "-n"
              ],
              "args": [
                {
                  "name": "NAMESPACE"
                }
              ]
            }
          ],
          "args": [
            {
              "name": "VALUE"
            }
          ]
        },
        {
          "name": "get",
          "options": [
            {
              "names": [
                "--namespace",
                "-n"
              ],
              "args": [
                {
                  "name": "NAMESPACE"
                }
              ]
            }
          ],
          "args": [
            {
              "name": "KEY"
            }
          ]
        }
      ]
    },
    {
      "name": "server",
      "description": "Start an atuin server",
      "subcommands": [
        {
          "name": "start",
          "description": "Start the server",
          "options": [
            {
              "names": [
                "--host"
              ],
              "description": "The host address to bind",
              "args": [
                {
                  "name": "HOST"
                }
              ]
            },
            {
              "names": [
                "--port",
                "-p"
              ],
              "description": "The port to bind",
              "args": [
                {
                  "name": "PORT"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "init",
      "description": "Output shell setup",
      "options": [
        {
          "names": [
            "--disable-ctrl-r"
          ],
          "description": "Disable the binding of CTRL-R to atuin"
        },
        {
          "names": [
            "--disable-up-arrow"
          ],
          "description": "Disable the binding of the Up Arrow key to atuin"
        }
      ],
      "args": [
        {
          "name": "SHELL",
          "suggestions": [
            "zsh",
            "bash",
            "fish",
            "nu"
          ]
        }
      ]
    },
    {
      "name": "uuid",
      "description": "Generate a UUID"
    },
    {
      "name": "contributors"
    },
    {
      "name": "gen-completions",
      "description": "Generate shell completions",
      "options": [
        {
          "names": [
            "--shell",
            "-s"
          ],
          "description": "Set the shell for generating completions",
          "isRequired": true,
          "args": [
            {
              "name": "SHELL",
              "suggestions": [
                "bash",
                "elvish",
                "fish",
                "powershell",
                "zsh"
              ]
            }
          ]
        },
        {
          "names": [
            "--out-dir",
            "-o"
          ],
          "description": "Set the output directory",
          "args": [
            {
              "name": "OUT_DIR"
            }
          ]
        }
      ]
    }
  ]
}
