baidu-cli

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: Apache-2.0

README

baidu-cli

A command line for Baidu. One pure-Go binary, no API key.

baidu hot                          # realtime hot search board (top 30)
baidu hot --tab movie -n 10        # top 10 movie searches
baidu suggest --query golang       # 10 autocomplete suggestions
baidu hot -o json                  # JSON output
baidu hot | jq                     # JSONL piped to jq

Output is a table at the terminal and JSONL when piped.

Install

Homebrew
brew install tamnd/tap/baidu
Pre-built binaries

Download from Releases.

Go
go install github.com/tamnd/baidu-cli/cmd/baidu@latest
Docker
docker run --rm ghcr.io/tamnd/baidu:latest hot

Commands

Command Description
hot Baidu realtime or category hot search board
suggest Baidu search suggestions
version Print version information
baidu hot
Flags:
  --tab string   board tab: realtime|novel|movie|teleplay|car (default "realtime")
  -n int         limit number of records (default 30)
  -o string      output: table|json|jsonl|csv|tsv|url|raw
baidu suggest
Flags:
  -Q, --query string   search term to get suggestions for (required)
  -o string            output: table|json|jsonl|csv|tsv|url|raw

License

Apache-2.0. baidu-cli is an independent tool and is not affiliated with Baidu, Inc.

Directories

Path Synopsis
Package baidu is the library behind the baidu command: the HTTP client, request shaping, and the typed data models for Baidu.
Package baidu is the library behind the baidu command: the HTTP client, request shaping, and the typed data models for Baidu.
Package cli builds the baidu command tree on top of the baidu library.
Package cli builds the baidu command tree on top of the baidu library.
cmd
baidu command
Command baidu is a single-binary command line for Baidu.
Command baidu is a single-binary command line for Baidu.
pkg
render
Package render turns slices of record structs into one of the output formats hackernews-cli supports: table, json, jsonl, csv, tsv, url, and raw.
Package render turns slices of record structs into one of the output formats hackernews-cli supports: table, json, jsonl, csv, tsv, url, and raw.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL