cmd

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 21 Imported by: 0

README

desearch-cli

A fast, scriptable CLI for Desearch AI — a contextual AI search engine that aggregates results across web, Hacker News, Reddit, Wikipedia, YouTube, Twitter/X, and arXiv with AI-synthesized answers and citations.

Single binary, no Python or Node.js dependencies.

Install

brew tap roboalchemist/tap
brew install desearch-cli
Binary

Download the latest release for your platform from the releases page, then:

# macOS (Intel or Apple Silicon)
curl -L https://github.com/roboalchemist/desearch-cli/releases/latest/download/desearch-cli_Darwin_arm64.tar.gz | tar xz
sudo mv desearch-cli /usr/local/bin/

# Linux
curl -L https://github.com/roboalchemist/desearch-cli/releases/latest/download/desearch-cli_Linux_x86_64.tar.gz | tar xz
sudo mv desearch-cli /usr/local/bin/
Build from source
go install github.com/roboalchemist/desearch-cli@latest

Setup

Get an API key at https://console.desearch.ai, then configure it:

desearch-cli config --api-key <YOUR_KEY>

That's it. The API key is stored in your config file at ~/.config/desearch-cli/config.toml.

Basic Usage

desearch-cli "golang best practices"

Commands

search (default)
desearch-cli [query] [flags]

Search across all or specified sources. This is the default command, so desearch-cli "query" and desearch-cli search "query" are equivalent.

completion
desearch-cli completion <query> [flags]

Stream an AI-generated summary without per-source search results.

config
desearch-cli config [flags]

Manage API key and default settings.

version
desearch-cli version

Show version information.

Search Flags

Flag Type Description
--query string string Search prompt (also the positional arg)
--tool strings []string Sources to query: web, hackernews, reddit, wikipedia, youtube, twitter, arxiv (default: all)
--date-filter string string Predefined date range. One of: PAST_24_HOURS, PAST_2_DAYS, PAST_WEEK, PAST_2_WEEKS, PAST_MONTH, PAST_2_MONTHS, PAST_YEAR, PAST_2_YEARS
--start-date string string ISO8601 UTC start bound, e.g. 2026-01-01T00:00:00Z
--end-date string string ISO8601 UTC end bound
--streaming bool Stream results as they arrive
--result-type string string ONLY_LINKS or LINKS_WITH_FINAL_SUMMARY (default: LINKS_WITH_FINAL_SUMMARY)
--count int int Results per source, 10-200 (default: 10)
--system-message string string Override system prompt to influence AI behavior
--json bool Output raw JSON instead of formatted human-readable
--no-ai bool Skip AI completion/summary

Config Flags

Flag Description
--api-key string Set API key (get at https://console.desearch.ai)
--default-tool strings Set default sources (can be specified multiple times)
--default-date-filter string Set default date filter
--show Display current configuration (alias: desearch-cli config show)
--clear Reset configuration to defaults

Examples

Search with specific sources
desearch-cli "llm benchmarks" --tool web --tool hackernews
desearch-cli "rust vs go performance" --tool reddit --tool youtube
Date filtering
desearch-cli "AI news" --date-filter PAST_2_DAYS
desearch-cli "golang updates" --start-date 2026-01-01T00:00:00Z --end-date 2026-03-01T00:00:00Z
Limit results
desearch-cli "react patterns" --tool web --count 20
Custom system message
desearch-cli "explain quantum computing" --system-message "Summarize in simple terms for a non-technical audience"
Streaming output
desearch-cli "latest AI research" --streaming
AI completion only (no per-source results)
desearch-cli completion "what is bittensor"
desearch-cli completion "explain transformers" --system-message "Summarize in simple terms"
JSON output
desearch-cli "golangci-lint" --json | jq '.search[0].title'
desearch-cli "linux kernel news" --tool hackernews --json
Skip AI summary
desearch-cli "hacker news top posts" --no-ai
Set defaults
desearch-cli config --api-key sk-xxxx --default-tool web --default-date-filter PAST_WEEK
View current config
desearch-cli config show
Clear config
desearch-cli config clear

Configuration File

Config is stored at ~/.config/desearch-cli/config.toml (XDG spec).

api_key = "YOUR_KEY"
default_tools = ["web", "hackernews", "reddit", "wikipedia", "youtube", "twitter", "arxiv"]
default_date_filter = "PAST_24_HOURS"
default_count = 10

All fields are optional. Any field not set uses the API server defaults.

Output Format

By default, output is formatted with section headers per source:

=== WEB ===
[Article Title](https://example.com)
  Article snippet text

[Another Article](https://another.com)
  Another snippet

=== HACKERNEWS ===
[HN Post Title](https://news.ycombinator.com/item?id=123)
  Post snippet

=== REDDIT ===
[Reddit Post Title](https://reddit.com/r/...)
  Post snippet

=== TWITTER ===
@username
  Tweet text
  Link: https://x.com/...
  42 likes, 12 retweets, 5 replies

=== AI SUMMARY ===
AI-generated synthesis of the results...

Twitter results include engagement metrics (likes, retweets, replies, quotes, bookmarks) when available.

Use --json for raw JSON output.

License

MIT

Issue Tracker

Report bugs and request features at: https://github.com/roboalchemist/desearch-cli/issues

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute adds all child commands to the root command and sets flags appropriately.

func GetJSONOut

func GetJSONOut() bool

GetJSONOut returns whether --json flag was set.

func RootCmd

func RootCmd() *cobra.Command

RootCmd returns the root cobra command for use by gendocs.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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