#compdef claude-conversation-search

autoload -U is-at-least

_claude-conversation-search() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'*-v[Verbosity level (-v for WARN, -vv for INFO, -vvv for DEBUG)]' \
'*--verbose[Verbosity level (-v for WARN, -vv for INFO, -vvv for DEBUG)]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_claude-conversation-search_commands" \
"*::: :->claude-conversation-search" \
&& ret=0
    case $state in
    (claude-conversation-search)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:claude-conversation-search-command-$line[1]:"
        case $line[1] in
            (index)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_claude-conversation-search__subcmd__index_commands" \
"*::: :->index" \
&& ret=0

    case $state in
    (index)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:claude-conversation-search-index-command-$line[1]:"
        case $line[1] in
            (status)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(rebuild)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(vacuum)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_claude-conversation-search__subcmd__index__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:claude-conversation-search-index-help-command-$line[1]:"
        case $line[1] in
            (status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rebuild)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(vacuum)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(search)
_arguments "${_arguments_options[@]}" : \
'--project=[Filter by project]:PROJECT:_default' \
'--session=[Filter by session ID (prefix match)]:SESSION:_default' \
'--limit=[Results limit]:LIMIT:_default' \
'-C+[Context lines before and after match (like grep -C)]:CONTEXT:_default' \
'-B+[Context lines before match (like grep -B)]:CTX_BEFORE:_default' \
'-A+[Context lines after match (like grep -A)]:CTX_AFTER:_default' \
'*--exclude-project=[Exclude projects by name]:EXCLUDE_PROJECT:_default' \
'*--exclude-pattern=[Exclude results matching regex patterns]:EXCLUDE_PATTERN:_default' \
'--sort=[Sort order]:SORT:(relevance date-desc date-asc)' \
'--after=[Results after date (YYYY-MM-DD or ISO 8601)]:AFTER:_default' \
'--before=[Results before date (YYYY-MM-DD or ISO 8601)]:BEFORE:_default' \
'*--include=[Include extra content types]:INCLUDE:(thinking tools)' \
'--truncate=[Characters shown per message (0 = full content)]:TRUNCATE:_default' \
'-h[Print help]' \
'--help[Print help]' \
':query -- Search query:_default' \
&& ret=0
;;
(topics)
_arguments "${_arguments_options[@]}" : \
'--project=[Filter by project]:PROJECT:_default' \
'--limit=[Results limit]:LIMIT:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(stats)
_arguments "${_arguments_options[@]}" : \
'--project=[Filter by project]:PROJECT:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(session)
_arguments "${_arguments_options[@]}" : \
'--center=[Center on a message UUID (prefix match)]:CENTER:_default' \
'-C+[Context messages before and after center (like grep -C)]:CONTEXT:_default' \
'-B+[Context messages before center (like grep -B)]:BEFORE:_default' \
'-A+[Context messages after center (like grep -A)]:AFTER:_default' \
'--truncate=[Characters shown per message (0 = full content)]:TRUNCATE:_default' \
'--offset=[Skip this many messages before displaying]:OFFSET:_default' \
'--limit=[Messages shown (0 = all)]:LIMIT:_default' \
'--full[Show full content (not just snippets)]' \
'-h[Print help]' \
'--help[Print help]' \
':session_id -- Session ID to view:_default' \
&& ret=0
;;
(summary)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':session_id -- Session ID to summarize:_default' \
&& ret=0
;;
(cache)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_claude-conversation-search__subcmd__cache_commands" \
"*::: :->cache" \
&& ret=0

    case $state in
    (cache)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:claude-conversation-search-cache-command-$line[1]:"
        case $line[1] in
            (info)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(clear)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_claude-conversation-search__subcmd__cache__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:claude-conversation-search-cache-help-command-$line[1]:"
        case $line[1] in
            (info)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clear)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':shell -- Shell to generate completions for:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(mcp)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" : \
'--project[Use project scope instead of user scope]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_claude-conversation-search__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:claude-conversation-search-help-command-$line[1]:"
        case $line[1] in
            (index)
_arguments "${_arguments_options[@]}" : \
":: :_claude-conversation-search__subcmd__help__subcmd__index_commands" \
"*::: :->index" \
&& ret=0

    case $state in
    (index)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:claude-conversation-search-help-index-command-$line[1]:"
        case $line[1] in
            (status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rebuild)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(vacuum)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(search)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(topics)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(session)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(summary)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(cache)
_arguments "${_arguments_options[@]}" : \
":: :_claude-conversation-search__subcmd__help__subcmd__cache_commands" \
"*::: :->cache" \
&& ret=0

    case $state in
    (cache)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:claude-conversation-search-help-cache-command-$line[1]:"
        case $line[1] in
            (info)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clear)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(completions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(mcp)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_claude-conversation-search_commands] )) ||
_claude-conversation-search_commands() {
    local commands; commands=(
'index:Index management' \
'search:Search conversations (auto-indexes if needed)' \
'topics:Show technology topics and their usage across conversations' \
'stats:Show detailed cache and conversation statistics' \
'session:View specific session conversations' \
'summary:Summarize a session using Claude (runs in jailed empty dir)' \
'cache:Cache management' \
'completions:Generate shell completions' \
'mcp:Run as MCP server' \
'install:Register with Claude MCP' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'claude-conversation-search commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__cache_commands] )) ||
_claude-conversation-search__subcmd__cache_commands() {
    local commands; commands=(
'info:Show cache statistics' \
'clear:Clear cache and rebuild' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'claude-conversation-search cache commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__cache__subcmd__clear_commands] )) ||
_claude-conversation-search__subcmd__cache__subcmd__clear_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search cache clear commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__cache__subcmd__help_commands] )) ||
_claude-conversation-search__subcmd__cache__subcmd__help_commands() {
    local commands; commands=(
'info:Show cache statistics' \
'clear:Clear cache and rebuild' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'claude-conversation-search cache help commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__cache__subcmd__help__subcmd__clear_commands] )) ||
_claude-conversation-search__subcmd__cache__subcmd__help__subcmd__clear_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search cache help clear commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__cache__subcmd__help__subcmd__help_commands] )) ||
_claude-conversation-search__subcmd__cache__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search cache help help commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__cache__subcmd__help__subcmd__info_commands] )) ||
_claude-conversation-search__subcmd__cache__subcmd__help__subcmd__info_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search cache help info commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__cache__subcmd__info_commands] )) ||
_claude-conversation-search__subcmd__cache__subcmd__info_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search cache info commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__completions_commands] )) ||
_claude-conversation-search__subcmd__completions_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search completions commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help_commands] )) ||
_claude-conversation-search__subcmd__help_commands() {
    local commands; commands=(
'index:Index management' \
'search:Search conversations (auto-indexes if needed)' \
'topics:Show technology topics and their usage across conversations' \
'stats:Show detailed cache and conversation statistics' \
'session:View specific session conversations' \
'summary:Summarize a session using Claude (runs in jailed empty dir)' \
'cache:Cache management' \
'completions:Generate shell completions' \
'mcp:Run as MCP server' \
'install:Register with Claude MCP' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'claude-conversation-search help commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__cache_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__cache_commands() {
    local commands; commands=(
'info:Show cache statistics' \
'clear:Clear cache and rebuild' \
    )
    _describe -t commands 'claude-conversation-search help cache commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__cache__subcmd__clear_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__cache__subcmd__clear_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help cache clear commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__cache__subcmd__info_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__cache__subcmd__info_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help cache info commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__completions_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__completions_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help completions commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__help_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help help commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__index_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__index_commands() {
    local commands; commands=(
'status:Show index status and statistics (default)' \
'rebuild:Force full rebuild of the index' \
'vacuum:Clean up deleted entries from index' \
    )
    _describe -t commands 'claude-conversation-search help index commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__index__subcmd__rebuild_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__index__subcmd__rebuild_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help index rebuild commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__index__subcmd__status_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__index__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help index status commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__index__subcmd__vacuum_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__index__subcmd__vacuum_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help index vacuum commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__install_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help install commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__mcp_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__mcp_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help mcp commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__search_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__search_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help search commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__session_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__session_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help session commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__stats_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__stats_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help stats commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__summary_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__summary_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help summary commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__help__subcmd__topics_commands] )) ||
_claude-conversation-search__subcmd__help__subcmd__topics_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search help topics commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index_commands] )) ||
_claude-conversation-search__subcmd__index_commands() {
    local commands; commands=(
'status:Show index status and statistics (default)' \
'rebuild:Force full rebuild of the index' \
'vacuum:Clean up deleted entries from index' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'claude-conversation-search index commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index__subcmd__help_commands] )) ||
_claude-conversation-search__subcmd__index__subcmd__help_commands() {
    local commands; commands=(
'status:Show index status and statistics (default)' \
'rebuild:Force full rebuild of the index' \
'vacuum:Clean up deleted entries from index' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'claude-conversation-search index help commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index__subcmd__help__subcmd__help_commands] )) ||
_claude-conversation-search__subcmd__index__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search index help help commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index__subcmd__help__subcmd__rebuild_commands] )) ||
_claude-conversation-search__subcmd__index__subcmd__help__subcmd__rebuild_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search index help rebuild commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index__subcmd__help__subcmd__status_commands] )) ||
_claude-conversation-search__subcmd__index__subcmd__help__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search index help status commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index__subcmd__help__subcmd__vacuum_commands] )) ||
_claude-conversation-search__subcmd__index__subcmd__help__subcmd__vacuum_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search index help vacuum commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index__subcmd__rebuild_commands] )) ||
_claude-conversation-search__subcmd__index__subcmd__rebuild_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search index rebuild commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index__subcmd__status_commands] )) ||
_claude-conversation-search__subcmd__index__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search index status commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__index__subcmd__vacuum_commands] )) ||
_claude-conversation-search__subcmd__index__subcmd__vacuum_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search index vacuum commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__install_commands] )) ||
_claude-conversation-search__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search install commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__mcp_commands] )) ||
_claude-conversation-search__subcmd__mcp_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search mcp commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__search_commands] )) ||
_claude-conversation-search__subcmd__search_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search search commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__session_commands] )) ||
_claude-conversation-search__subcmd__session_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search session commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__stats_commands] )) ||
_claude-conversation-search__subcmd__stats_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search stats commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__summary_commands] )) ||
_claude-conversation-search__subcmd__summary_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search summary commands' commands "$@"
}
(( $+functions[_claude-conversation-search__subcmd__topics_commands] )) ||
_claude-conversation-search__subcmd__topics_commands() {
    local commands; commands=()
    _describe -t commands 'claude-conversation-search topics commands' commands "$@"
}

if [ "$funcstack[1]" = "_claude-conversation-search" ]; then
    _claude-conversation-search "$@"
else
    compdef _claude-conversation-search claude-conversation-search
fi
