Skip to content

timdesrochers/kagi-cli-shortcut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kagi-cli-shortcut

A simple command-line shortcut to make web searches with either Kagi or Brave.

This project is in no way affiliated with either company/service.

Rationale

Why type more than you have to? This opens a Kagi search results page in your default browser, or in a cli browser of your choice. If you're not using Kagi, you can pass --brave and get your results from Brave Search instead.

Features

  • Dead simple
  • Uses Curl for URL handling
  • Supports using alternative CLI browsers (lynx, w3m, links, etc.)
  • Option to use alternative search base URLs (only Brave Search, currently)

Release for macOS

macOS universal binary, version 0.23.1

Install the binary by copying it to wherever your $PATH may lead you.

Usage

kagi: A simple CLI shortcut for making web searches

Usage:
  kagi "search query" [--cli browser] [--brave] [--help]

Options:
  --cli browser   Opens search results in a specified CLI browser such as 'lynx', 'w3m', or 'links'. Replace 'browser' with the desired CLI browser name.
  --brave Uses an alternative search base URL (Brave search) instead of the default base Kagi URL.
  --help          Shows this help text.

Examples:
  kagi "hello world"
  kagi "hello world" --cli lynx
  kagi "hello world" --brave
  kagi "hello world" --cli w3m --brave

Note: By default, the program uses 'xdg-open' in Linux systems or 'open' in macOS systems to open search results in the default web browser.

Compiling from source

Install Curl development package if not already installed. Then, run:

gcc -o kagi kagi.c -lcurl

About

Tiny cli shortcut for opening a Kagi search in your default browser

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages