Browse docs
Docs / CLI Reference / swarmfile-search

swarmfile-search

swarmfile-search runs full-text search across the local Swarmfile metadata cache, with fallback to the hub. It's a standalone binary for searching from a terminal or a script, rather than the dashboard omnibox.

The local cache is entries-only: it indexes file and folder names in a local full-text index, and it's what a plain query checks first. Project and people (principal) name matches only come from the hub fallback - the local cache doesn't mirror those, so a query for a project or person name needs a hub round-trip (or --remote) to find anything. Either way, it's a metadata search - it finds things by name, not by file contents.

For the conceptual overview of how search resolves results and where else you can search from, see Search.

Usage#

swarmfile-search <query>

Flags#

FlagDescription
--projectScope the search to a single project by ID. Defaults to $SWARMFILE_PROJECT_ID when set
--limitMaximum results. Default 20
--remoteForce the search against the hub. Conflicts with --local-only
--local-onlyForce the search against the local cache only. Conflicts with --remote
--jsonPrint raw JSON instead of a human-readable list

Examples#

Plain query across the local cache, falling back to the hub if needed:

swarmfile-search "concept_v3"

Scoped to a project, capped at 5 results, local cache only:

swarmfile-search "elevation" --project proj_xyz789 --local-only --limit 5

JSON output for scripting:

swarmfile-search "plan.dwg" --json