Documentation
Search
Find snippets by text and tags
Search
Find the code you need without leaving the app, terminal, or HTTP client. Cache exposes the same searchable library across all three interfaces.
Overview
Cache searches:
- Snippet titles
- Code content
- Tags
- Notes
- Language identifiers
- Descriptions
Search in the Web App
Basic Search
- Open the dashboard search input.
- Type a query.
- Review the filtered results.
The dashboard updates immediately as you type.
Combining Search Terms
Multiple words narrow the result set:
text
auth middleware typescriptSearch in the CLI
Basic Search
bash
# Search for a term
cache search "auth middleware"
# Search with filters
cache search "typescript" --tags react,hooks
# JSON output for scripting
cache search "deploy" --format jsonSearch Options
| Flag | Description | Example |
|---|---|---|
--tag | Filter by a tag; repeat for more | --tag auth --tag jwt |
--tags | Filter by tags (comma-separated) | --tags auth,jwt |
--format | Output format | --format jsonl |
Search via API
bash
curl -H "Authorization: Bearer $TOKEN" \
"https://cache.example.com/api/v1/snippets?query=auth+middleware&tag=typescript"Search Tips
Finding Recently Used Snippets
bash
cache search "" --format json | jq 'sort_by(.updated_at) | reverse'Discovering Untagged Patterns
bash
cache search "" --format json | jq -r '.[].tags[]?' | sort | uniq -cExporting Search Results
bash
cache search "typescript" --format json > typescript-snippets.jsonTroubleshooting
No Results Found
- Check spelling.
- Try a simpler term.
- Clear filters.
- Make sure the current browser session or CLI profile points at the expected Cache instance.
Slow Search
- Use more specific search terms.
- Add a tag filter.
- Confirm the underlying app instance is healthy.
Results Not Updating
- Refresh the page or retry the command.
- Confirm you are using the expected data source.
- Re-open the snippet to verify the latest saved content.