Skip to content

Commit d560d37

Browse files
authored
Merge pull request #29 from Microck/fix/docs-logging-demo-sync
fix(docs): sync CLI docs, logging, and demo assets
2 parents 1571b2f + 8606798 commit d560d37

21 files changed

Lines changed: 473 additions & 94 deletions

Cargo.lock

Lines changed: 118 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ serde_json = "1.0.149"
3535
thiserror = "2.0.18"
3636
tokio = { version = "1.50.0", features = ["macros", "rt-multi-thread"] }
3737
toml = "1.1.1"
38+
tracing = "0.1.41"
39+
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }

README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
---
1818

19-
`kagi` is a terminal CLI for Kagi that gives you command-line access to search, quick answers, ask-page, assistant, translate, summarization, feeds, paid API commands, and account-level settings like lenses, custom assistants, custom bangs, and redirect rules. it is built for people who want one command surface for interactive use, shell workflows, and structured JSON output.
19+
`kagi` is a terminal CLI for Kagi that gives you command-line access to search, quick answers, ask-page, assistant, translate, summarization, public feeds through `news` and `smallweb`, paid API commands like `fastgpt` and `enrich`, and account-level settings like lenses, custom assistants, custom bangs, and redirect rules. it is built for people who want one command surface for interactive use, shell workflows, and structured JSON output.
2020

2121
the main setup path is `kagi auth`. on a real terminal it opens a guided setup flow where you choose `Session Link` or `API Token`, get the official instructions inline, paste the credential, save it to `./.kagi.toml`, and validate it immediately. if you also use Kagi's paid API, the same wizard can add that too.
2222

@@ -30,7 +30,7 @@ if you already use Kagi and want to access it from scripts, shell workflows, or
3030

3131
- use your existing session-link URL for subscriber features
3232
- get structured JSON for scripts, agents, and other tooling
33-
- use one CLI for search, quick answers, assistant, translate, summarization, and feeds
33+
- use one CLI for search, quick answers, assistant, translate, summarization, `news`, and `smallweb`
3434
- add `KAGI_API_TOKEN` only when you want the paid public API commands
3535

3636
## quickstart
@@ -155,7 +155,7 @@ for the full command-to-token matrix, use the [`auth-matrix`](https://kagi.micr.
155155

156156
| command | purpose |
157157
| --- | --- |
158-
| `kagi search` | search Kagi with JSON by default, optional live filters, or `--format pretty` for terminal output |
158+
| `kagi search` | search Kagi with `json` by default, or render as `pretty`, `compact`, `markdown`, or `csv` |
159159
| `kagi batch` | run multiple searches in parallel with JSON, compact, pretty, markdown, or csv output and shared filters |
160160
| `kagi auth` | launch the auth wizard, or inspect, validate, and save credentials |
161161
| `kagi summarize` | use the paid public summarizer API or the subscriber summarizer with `--subscriber` |
@@ -186,6 +186,9 @@ kagi --generate-completion zsh > ~/.zsh/completion/_kagi
186186

187187
# fish
188188
kagi --generate-completion fish > ~/.config/fish/completions/kagi.fish
189+
190+
# powershell
191+
kagi --generate-completion powershell >> $PROFILE
189192
```
190193

191194
see the [installation guide](https://kagi.micr.dev/guides/installation) for platform-specific setup details.
@@ -222,6 +225,19 @@ run a filtered search against the subscriber web-product path:
222225
kagi search --region us --time month --order recency "rust release notes"
223226
```
224227

228+
use explicit date bounds instead of a preset time window:
229+
230+
```bash
231+
kagi search --from-date 2026-03-01 --to-date 2026-03-31 "rust release notes"
232+
```
233+
234+
force personalized search on or off for one request:
235+
236+
```bash
237+
kagi search --personalized "best cafes nearby"
238+
kagi search --no-personalized "best cafes nearby"
239+
```
240+
225241
run a few searches in parallel:
226242

227243
```bash
@@ -263,7 +279,9 @@ manage custom assistants:
263279

264280
```bash
265281
kagi assistant custom list
266-
kagi assistant custom create "Release Notes" --model gpt-5-mini --web-access
282+
kagi assistant custom get "Release Notes"
283+
kagi assistant custom create "Release Notes" --model gpt-5-mini --web-access --lens 2 --instructions "Focus on release diffs and migration notes."
284+
kagi assistant custom update "Release Notes" --bang-trigger relnotes --no-personalized
267285
```
268286

269287
get a quick answer with references:
@@ -325,6 +343,17 @@ kagi bang custom list
325343
kagi redirect list
326344
```
327345

346+
inspect or change one lens, bang, or redirect rule:
347+
348+
```bash
349+
kagi lens get "Default"
350+
kagi lens update "Default" --description "primary search profile"
351+
kagi bang custom create "Docs" --trigger docs --template "https://docs.rs/releases/search?query=%s"
352+
kagi bang custom update docs --shortcut-menu
353+
kagi redirect create '^https://old.example.com/(.*)|https://new.example.com/$1'
354+
kagi redirect disable '^https://old.example.com/(.*)|https://new.example.com/$1'
355+
```
356+
328357
## what it looks like
329358

330359
if you want a quick feel for the cli before installing it, this is the kind of output you get from auth setup, quick answer, translate, ask-page, the subscriber summarizer, assistant, and the public news feed:

0 commit comments

Comments
 (0)