{
  "id": "atuin",
  "name": "Atuin",
  "homepage": "https://atuin.sh",
  "description": "Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands.",
  "icon": "https://atuin.sh/assets/brand/atuin-turtle.svg",
  "executables": [
    "atuin"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/atuin/config.toml"
    ],
    "exclude": [
      "[xdgData]/atuin/history.db",
      "[xdgData]/atuin/records.db",
      "[xdgData]/atuin/meta.db",
      "~/.atuin/logs/"
    ],
    "secret": [
      "[xdgData]/atuin/key"
    ],
    "self_sync": true
  },
  "commands": {
    "format": 1,
    "label": "Atuin shell history",
    "description": "Atuin replaces shell history with a searchable database. Use the subcommand tabs for search, stats, listing, sync and shell init; account, key and server commands are left out.",
    "quality": "ai-draft",
    "base": "fig:atuin",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/atuin.ts",
        "license": "MIT"
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": []
      }
    ],
    "subcommand": [
      {
        "path": [
          "search"
        ],
        "label": "Search history",
        "description": "Search the history database. Deleting matches is left out.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/atuin.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "query",
            "label": "Query",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "cwd",
            "label": "Directory",
            "description": "Only results from this directory.",
            "type": "string",
            "option": [
              "--cwd",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "exit",
            "label": "Exit code",
            "description": "Only results with this exit code.",
            "type": "string",
            "option": [
              "--exit",
              "-e"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "before",
            "label": "Before",
            "description": "Only results added before this date.",
            "type": "string",
            "option": [
              "--before",
              "-b"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "after",
            "label": "After",
            "description": "Only results added after this date.",
            "type": "string",
            "option": [
              "--after"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "limit",
            "label": "Limit",
            "description": "Maximum number of entries.",
            "type": "integer",
            "option": [
              "--limit"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "interactive",
            "label": "Interactive UI",
            "type": "boolean",
            "option": [
              "--interactive",
              "-i"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "filter_mode",
            "label": "Filter mode",
            "description": "Override the configured filter mode.",
            "type": "string",
            "option": [
              "--filter-mode"
            ],
            "suggestions": [
              {
                "value": "global",
                "label": "global"
              },
              {
                "value": "host",
                "label": "host"
              },
              {
                "value": "session",
                "label": "session"
              },
              {
                "value": "directory",
                "label": "directory"
              },
              {
                "value": "workspace",
                "label": "workspace"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "search_mode",
            "label": "Search mode",
            "description": "Override the configured search mode.",
            "type": "string",
            "option": [
              "--search-mode"
            ],
            "suggestions": [
              {
                "value": "prefix",
                "label": "prefix"
              },
              {
                "value": "full-text",
                "label": "full-text"
              },
              {
                "value": "fuzzy",
                "label": "fuzzy"
              },
              {
                "value": "skim",
                "label": "skim"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "human",
            "label": "Human-readable time",
            "type": "boolean",
            "option": [
              "--human"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "cmd_only",
            "label": "Command text only",
            "type": "boolean",
            "option": [
              "--cmd-only"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "reverse",
            "label": "Oldest first",
            "type": "boolean",
            "option": [
              "--reverse",
              "-r"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "recent-here",
            "label": "Commands in this directory",
            "fields": [
              "query",
              "cwd",
              "limit",
              "cmd_only"
            ],
            "required": [],
            "set": {
              "cmd_only": [
                true
              ]
            }
          },
          {
            "id": "interactive",
            "label": "Interactive search",
            "fields": [
              "query",
              "interactive"
            ],
            "required": [],
            "set": {
              "interactive": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "query",
              "cwd",
              "exit",
              "limit",
              "interactive",
              "cmd_only"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "before",
              "after",
              "filter_mode",
              "search_mode",
              "human",
              "reverse"
            ]
          }
        ]
      },
      {
        "path": [
          "stats"
        ],
        "label": "History statistics",
        "description": "Show the most used commands over a period.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/atuin.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "period",
            "label": "Period",
            "description": "Leave blank for statistics since the beginning.",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "count",
            "label": "Top commands",
            "description": "How many top commands to list.",
            "type": "integer",
            "option": [
              "--count",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "top",
            "label": "Top 20 commands",
            "fields": [
              "period",
              "count"
            ],
            "required": [],
            "set": {
              "count": [
                20
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "period",
              "count"
            ]
          }
        ]
      },
      {
        "path": [
          "history",
          "list"
        ],
        "label": "List history",
        "description": "List history items.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/atuin.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "cwd",
            "label": "This directory only",
            "type": "boolean",
            "option": [
              "--cwd",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "session",
            "label": "This session only",
            "type": "boolean",
            "option": [
              "--session",
              "-s"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "human",
            "label": "Human-readable time",
            "type": "boolean",
            "option": [
              "--human"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "cmd_only",
            "label": "Command text only",
            "type": "boolean",
            "option": [
              "--cmd-only"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "session",
            "label": "This session",
            "fields": [
              "session",
              "cmd_only"
            ],
            "required": [],
            "set": {
              "session": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "cwd",
              "session",
              "human",
              "cmd_only"
            ]
          }
        ]
      },
      {
        "path": [
          "sync"
        ],
        "label": "Sync history",
        "description": "Sync with the configured server.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/atuin.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "force",
            "label": "Force re-download",
            "description": "Force re-download everything.",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "sync",
            "label": "Sync",
            "fields": [
              "force"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "force"
            ]
          }
        ]
      },
      {
        "path": [
          "init"
        ],
        "label": "Shell setup",
        "description": "Print the shell setup to eval in your shell rc file.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/atuin.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "shell",
            "label": "Shell",
            "type": "string",
            "position": 0,
            "suggestions": [
              {
                "value": "zsh",
                "label": "zsh"
              },
              {
                "value": "bash",
                "label": "bash"
              },
              {
                "value": "fish",
                "label": "fish"
              },
              {
                "value": "nu",
                "label": "nu"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "disable_ctrl_r",
            "label": "Do not bind Ctrl-R",
            "type": "boolean",
            "option": [
              "--disable-ctrl-r"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "disable_up_arrow",
            "label": "Do not bind Up Arrow",
            "type": "boolean",
            "option": [
              "--disable-up-arrow"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "zsh",
            "label": "Zsh setup",
            "fields": [
              "shell"
            ],
            "required": [
              "shell"
            ],
            "set": {
              "shell": [
                "zsh"
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "shell",
              "disable_ctrl_r",
              "disable_up_arrow"
            ]
          }
        ]
      }
    ]
  }
}
