class

Kagi::CLI

Inherits Reference < Object

Defines a command-line interface for interacting with the Kagi APIs

$ ./bin/kagi

Usage: kagi [subcommand] [argument]

    kagi search [query]              -   Search Kagi
    kagi enrich [news|web] [query]   -   Search Enrichment APIs
    kagi fast-gpt [query]            -   Ask FastGPT
    kagi summarize [url]             -   Summarize a URL

Instance methods

enrich(cmd : String, query : String)

Search for query via the enrich API (depending on the cmd) and print the results

Source
execute

Parse ARGV and execute the corresponding method

Source
fast_gpt(query : String)

Prints the response of FastGPT for a given query

Source
search(query : String)

Search for query via the search API and print the results

Source
summarize(url : String)

Prints a summary of the given url

Source