online

module
v0.1.2-0...-6613874 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT

README

online — one web research CLI for agents

online gives coding agents one small command surface for current web work. It searches multiple independent indexes, extracts known URLs as clean Markdown, crawls and maps sites, produces grounded answers and cited research, and retrieves code examples.

Default output is concise and easy for agents to read. --json emits the same normalized fields as compact JSON for programs.

Install

go install github.com/khanglvm/online/cmd/online@main

Use @main until the first release under the renamed module is published.

Capabilities

online search "current topic" --limit 5 --no-save
online answer "grounded question" --max-citations 4
online fetch https://example.com/article --max-length 4000
online fetch https://example.com/article --query "one bounded fact" --max-length 4000
online map https://docs.example.com --limit 15
online crawl https://docs.example.com --instructions "Find API docs" --limit 5 --max-chars 3000
online research "Compare the options and return a cited decision brief" --max-chars 10000
online code "correct library API usage with examples" --tokens 1200

Search supports source freshness, date and domain filters, localization, and focused verticals:

online search "query" --fresh --include-domain example.com
online search "query" --from 2026-01-01 --language vi --location Vietnam
online search "query" --type academic|company|people|news|personal-site|financial-report

Overlapping capabilities are executed across all configured sources automatically. URLs are canonicalized and deduplicated; fetch selects one clean document; crawl enforces one total page budget after merging. Agents do not need to understand source routing.

Agent-friendly output

query = "Go release notes"
status = "ok"
result_count = 2
result.1.title = "Go Release History"
result.1.url = "https://go.dev/doc/devel/release"
result.1.snippet = "..."

Long content uses a readable block form:

document.content <<'ONLINE_EOF'
# Clean Markdown
...
ONLINE_EOF

The delimiter changes automatically if page content contains ONLINE_EOF. Treat status = "partial", conflict = true, or source_error.* as unverified output that needs focused search and page-level confirmation. Fetch reports scope = "page"|"focused_excerpt" and truncated = true|false; focused excerpts and truncated pages cannot prove newest/oldest, absence, ordering, or a complete list.

Credentials

Store keys through stdin so they do not appear in shell history:

printf '%s\n' "$KEY_1" "$KEY_2" | online config keys set SOURCE_ID
online config keys list

Credentials are stored in ~/.online/config.yaml, written as 0600 inside a 0700 directory. The CLI uses only the configured free-of-charge web capabilities unless you explicitly configure another source.

Agent skills

online install-skill --build-only
npx skills add "$HOME/.online/skills/codex/online" \
  --skill online --agent '*' --global --yes --copy

This builds the local skill folder and installs it globally for supported agents. The skill presents online as one capability-oriented tool without source-specific routing instructions.

Sessions

online session create "topic"
online search "subtopic" --session SESSION_ID
online results SESSION_ID
online note add SESSION_ID "finding"
online export SESSION_ID --format md

Development

go test ./...
go build ./cmd/online
go vet ./...

The project is pure Go and ships as a single binary.

Jump to

Keyboard shortcuts

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