Shell function to open URLs in Kagi Summarizer

I’m a fan and an avid user of Kagi search. I’m their ultimate subscriber and use their summarizer a lot.

I needed a method to open URLs in Kagi Summarizer. I wrote a small shell function to do that.

ksum() {
  local urlenc=$(jq -rn --arg x "$1" '$x|@uri')
  open "https://kagi.com/summarizer/index.html?target_language=&summary=takeaway&url=${urlenc}"
}

/shell/ /kagi/ /search/ /summarizer/