Metadata-Version: 2.4
Name: cli-anything-tinyfish
Version: 0.1.0
Summary: Agent-native CLI for TinyFish Web Agent — web search, clean page extraction, and natural-language browser automation via the TinyFish REST APIs.
Author-email: Jason Brashear <jason@webdevtoday.com>
License: MIT
Project-URL: Homepage, https://github.com/webdevtodayjason/cli-anything-tinyfish
Project-URL: TinyFish Docs, https://docs.tinyfish.ai
Project-URL: CLI-Anything Hub, https://clianything.cc
Keywords: tinyfish,cli,web-search,web-scraping,browser-automation,ai-agents,cli-anything
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: httpx>=0.24
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# cli-anything-tinyfish

Agent-native CLI for the [TinyFish Web Agent](https://tinyfish.ai) — web
search, clean page extraction, and natural-language browser automation from
your terminal, over TinyFish's REST APIs.

Built for the [CLI-Anything Hub](https://clianything.cc): JSON on stdout,
JSON errors on stderr, exit codes that mean something, API-key auth from the
environment. No browser OAuth, ever — which is the point: TinyFish's official
MCP server requires an interactive OAuth 2.1 browser flow, which headless
agents and kiosk machines can't complete. This CLI talks to the REST APIs
(`X-API-Key`) instead.

## Install

```bash
pip install cli-anything-tinyfish
```

## Authenticate

Create a free key at [agent.tinyfish.ai/api-keys](https://agent.tinyfish.ai/api-keys):

```bash
export TINYFISH_API_KEY="sk-tinyfish-..."
cli-anything-tinyfish auth status
```

Search and fetch are credit-free; agent runs consume TinyFish credits.

## Use

```bash
# Search the web
cli-anything-tinyfish search "best react state management" --location US --pretty

# Fetch up to 10 URLs as clean markdown (JS-rendered, boilerplate stripped)
cli-anything-tinyfish fetch https://example.com/article --format markdown

# Natural-language browser automation
cli-anything-tinyfish run "Extract the pricing table as JSON" --url https://example.com/pricing

# Async: submit, poll, cancel
cli-anything-tinyfish run "goal" --url https://example.com --submit
cli-anything-tinyfish runs get <run_id>
cli-anything-tinyfish runs list --status RUNNING
cli-anything-tinyfish runs cancel <run_id>
```

Every command supports `--json` (default) and `--pretty`.

## For AI agents

The skill definition lives at
[`cli_anything/tinyfish/skills/SKILL.md`](cli_anything/tinyfish/skills/SKILL.md).
Feed it to any SKILL-compatible agent (Claude Code, OpenClaw, Codex, …) and the
agent can drive TinyFish through this CLI with plain shell access.

## Development

```bash
pip install -e ".[dev]"
python3 -m pytest cli_anything/tinyfish/tests/test_core.py -v     # unit (no network)
TINYFISH_API_KEY=sk-... python3 -m pytest cli_anything/tinyfish/tests/test_full_e2e.py -v  # e2e (credit-free endpoints only)
```

## Related

- TinyFish docs: https://docs.tinyfish.ai (REST endpoints this CLI wraps)
- TinyFish official CLI (npm, by TinyFish): `npm install -g @tiny-fish/cli`
- CLI-Anything Hub: https://clianything.cc

## License

MIT © Jason Brashear
