Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ tinyfish fetch content get https://example.com

The CLI writes results to the filesystem instead of piping them through your model's context window — tokens stay low, output stays structured.

### Scripts

Drop TinyFish into everyday tools with small copyable scripts.

| Script | Description |
|--------|-------------|
| [Raycast TinyFish Search](./scripts/raycast-tinyfish-search) | Search the web from Raycast and get formatted result URLs, titles, and snippets |

### Agent Skill

One-line install. Works with Claude Code, Codex, Cursor, OpenCode, Antigravity, and other coding agents. The Skill teaches your agent **when** to reach for Search vs. Fetch vs. Agent, and **how** to call them.
Expand Down
10 changes: 10 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# TinyFish Scripts

Small, copyable scripts that wire TinyFish into everyday tools.

## Available scripts

| Script | Description |
|--------|-------------|
| [raycast-tinyfish-search](./raycast-tinyfish-search) | Raycast Script Command for searching the web with TinyFish and showing formatted result URLs |

41 changes: 41 additions & 0 deletions scripts/raycast-tinyfish-search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# TinyFish Search for Raycast

Search the web from Raycast with TinyFish and return formatted result URLs, titles, and snippets.

## Setup

1. Install and authenticate the TinyFish CLI:

```bash
npm install -g @tiny-fish/cli
tinyfish auth login
```

2. Copy `tinyfish-search.sh` into your Raycast Script Commands folder.

3. Make the script executable:

```bash
chmod +x tinyfish-search.sh
```

4. Open Raycast, run **TinyFish Search**, and type any query.

## Script

The script calls:

```bash
tinyfish search query "<your query>"
```

It formats the JSON response into readable search results:

```text
Results for: raycast extensions

1. Raycast - Your shortcut to everything
https://www.raycast.com/
Raycast lets you control your tools with a few keystrokes...
```

72 changes: 72 additions & 0 deletions scripts/raycast-tinyfish-search/tinyfish-search.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/bash
set -euo pipefail

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title TinyFish Search
# @raycast.mode fullOutput

# Optional parameters:
# @raycast.icon 🔎
# @raycast.description Search the web with TinyFish and list result URLs
# @raycast.argument1 { "type": "text", "placeholder": "Search query" }

# Documentation:
# @raycast.author tinyfish
# @raycast.authorURL https://tinyfish.ai

export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.npm-global/bin:$HOME/.local/bin:$PATH"

query="${1:-}"

if [ -z "$query" ]; then
echo "Usage: TinyFish Search <query>"
exit 1
fi

TINYFISH_BIN="$(command -v tinyfish || true)"
if [ -z "$TINYFISH_BIN" ]; then
echo "tinyfish not found in PATH"
echo
echo "Install and authenticate it first:"
echo " npm install -g @tiny-fish/cli"
echo " tinyfish auth login"
exit 127
fi

raw_output="$("$TINYFISH_BIN" search query "$query")"

python3 - "$raw_output" <<'PY'
import json
import sys

raw = sys.argv[1].strip()
data = json.loads(raw)
query = data.get("query") or "Search"
results = data.get("results") or []

print(f"Results for: {query}")
print()

if not results:
print("No results found.")
sys.exit(1)

for result in results:
position = result.get("position") or ""
title = result.get("title") or "Untitled"
site = result.get("site_name") or ""
url = result.get("url") or ""
snippet = (result.get("snippet") or "").strip()

heading = f"{position}. {title}" if position else title
if site:
heading = f"{heading} ({site})"

print(heading)
if url:
print(url)
if snippet:
print(snippet)
print()
PY