login authenticates your session, parse sends a document to a single provider, compare runs the same document through multiple providers side by side, and providers lists what’s available. Every command supports npx @file_router/cli <command> or the filerouter binary if you installed the CLI globally.
login
Authenticate this CLI with FileRouter using your browser. Thelogin command opens your browser for authorization and saves an API key to your machine once you approve.
login once. The CLI reuses the saved key for all subsequent commands.
You can skip
login entirely by setting the FILEROUTER_API_KEY environment variable. The CLI reads it automatically on every invocation.parse
Parse a single document with one provider and print the result to your terminal.Arguments and flags
string
required
A local file path or a publicly accessible URL. This is the document you want to parse.
string
default:"llamaparse"
The provider to use. Alias:
-p. Accepted values: llamaparse, mistral-ocr, datalab.string
default:"markdown"
Comma-separated list of output types to request. Alias:
-o. Example: markdown,images.boolean
default:"false"
Write the complete parse result as JSON instead of the default text output.
string
Write output to a file at the given path instead of printing to stdout.
boolean
default:"false"
Use your provider API key directly (BYOK mode). Bypasses the hosted FileRouter service. See BYOK Mode for details.
Examples
compare
Run the same document through multiple providers in parallel and view the results side by side.Arguments and flags
string
required
A local file path or a publicly accessible URL. FileRouter sends this document to each provider you specify.
string
default:"llamaparse,mistral-ocr,datalab"
Comma-separated list of provider IDs to include in the comparison. Alias:
-p. Omit this flag to compare all providers at once.string
default:"markdown"
Comma-separated list of output types to request from every provider. Alias:
-o.boolean
default:"false"
Write the complete comparison result as JSON instead of the summary table.
string
Write output to a file at the given path instead of printing to stdout.
boolean
default:"false"
Use your own provider API keys directly (BYOK mode). Bypasses the hosted FileRouter service. See BYOK Mode for details.
Examples
providers
List all available document providers and the output types each one supports.Flags
boolean
default:"false"
Write provider metadata as JSON instead of the default text table.