grokir is a small command-line client for Grokipedia.
It lets you search articles and fetch a page by slug from the terminal.
- Go
1.25(as defined ingo.mod) make(optional but recommended)
Build the binary into dist/:
make buildThis produces:
dist/grokir
Install to ~/.local/bin:
make installMake sure ~/.local/bin is in your PATH.
Remove build artifacts:
make cleanFrom the project root:
./dist/grokir <command> [args]Or, after install:
grokir <command> [args]Search Grokipedia by query.
grokir search "kubernetes scheduler"Options:
-l <num>: max number of results (default:10)-o <num>: offset for pagination (default:0)
Example:
grokir search -l 5 -o 10 "distributed systems"Fetch a page by slug.
grokir page kubernetes-schedulerShow version and build date.
grokir versionBy default, output is human-readable text.
Use JSON output with --json:
grokir --json search "kubernetes"
grokir --json page kubernetes-schedulerNote:
--jsonis a global flag, so place it before the command name.
Run checks:
make test
make lint