Skip to main content
The FileRouter CLI lets you parse and compare documents across providers directly from your terminal. You can run it instantly with npx, install it globally, or authenticate once and start sending files to the hosted service — no configuration files required.

Requirements

The CLI requires Node.js 22.14.0 or later. Check your version with:

Run or Install the CLI

You have two options: run the CLI on demand with npx, or install it globally so the filerouter binary is always available.
After a global install, you can run the CLI using the filerouter binary:
All examples in these docs use npx @file_router/cli — substitute filerouter if you installed globally.

Authenticate

Before you can use the hosted FileRouter service, you need to authenticate. Run:
The CLI prints a verification URL and a short code in your terminal, then opens your browser. Approve the request in the browser, and the CLI saves an API key to your machine automatically. You only need to do this once.
1

Run the login command

Your terminal prints a verification URL and a short code, then opens your browser.
2

Approve in the browser

Confirm the code shown in your terminal matches the one on screen, then approve the request.
3

Return to the terminal

Once approved, the CLI prints Authenticated. and saves your API key locally. You’re ready to parse documents.

Verify the Setup

Run the following command to confirm the CLI is working and list the available providers:
You should see output similar to:
You can skip the login step by setting the FILEROUTER_API_KEY environment variable instead. The CLI reads it automatically: