ai
Natural Language Search
Translate natural-language prompts into structured search filters. Use dry-run mode to preview interpretation before running a full search.
Prerequisites
The ai command requires a configured AI provider. By default, FileFortress uses
Microsoft Foundry Local — a local LLM runtime that keeps your queries on your machine.
Quick setup (one-time):
filefortress tools detect --forcefilefortress tools configure foundry --enablefilefortress ai "find images" --dry-runUsing a different provider? FileFortress supports any OpenAI-compatible endpoint — Ollama, OpenAI, Azure OpenAI, OpenRouter, and more. See the Local AI Setup Guide and the tools command for full configuration details.
Syntax
filefortress ai "natural language query" [options]
The query
argument is required and should describe file-search intent (media type, size, date, remote, path, etc.).
Options
| Option | Description | Example |
|---|---|---|
--dry-run |
Interpret query and show filters without executing search | ai "find images under 5kb" --dry-run |
--explain |
Show explanation of how the prompt was interpreted | ai "recent videos" --explain |
--view |
Control search result format after translation | ai "find png files" --view summary |
--save-to-file |
Accepted for compatibility; persistence not implemented for ai output | ai "find photos" --save-to-file out.txt |
Prompt Patterns That Work
Strong Prompt
ai "find images smaller than 5kb"
Maps directly to media type + size filter.
Weak Prompt
ai "how many remotes do i have?"
Account question, not a search filter query.
Use the right command for account questions
For remote counts and account state, use filefortress remotes list.
Use ai when your intent is file discovery.
Examples
Basic AI search
filefortress ai "find images"
Preview interpretation first
filefortress ai "find images smaller than 5kb" --dry-run
Inspect reasoning + filters
filefortress ai "find images smaller than 5kb" --dry-run --explain
AI Provider Management
FileFortress supports multiple AI providers. Only one is active at a time.
Configuring Foundry (Default)
filefortress tools configure foundry --enablefilefortress tools configure foundry --enable --model phi-4-minifilefortress tools configure foundry --model "phi-4-openvino-gpu:1"filefortress tools configure foundry --disableSwitching Providers
When you enable Foundry with --enable, it is automatically set as the active AI provider.
FileFortress stores provider configurations so you can switch between them. For configuring
other providers (Ollama, OpenAI, Azure, OpenRouter), see the
Local AI Setup Guide.
Supported Providers
Troubleshooting
Provider 400 with Foundry
Commonly caused by model mismatch. Configure the exact model ID reported by your endpoint.
filefortress tools configure foundry --model "phi-4-openvino-gpu:1"
AI could not extract any search filters
Rephrase with explicit search intent (media type, size, date, remote, path). Use
--dry-run --explain to validate translation before execution.
Continue Learning
Explore deeper guidance for prompt design and troubleshooting workflows.