
Set up Claude CLI
Use the Claude models in your LaRouter plan with the claude command in Terminal on Mac, Linux or Windows.
Option A · Fastest
1-click setup file
Download one file and open it. It installs Claude CLI and connects it to LaRouter with your key. You need a LaRouter account with a plan.
Download the file
Loading your key…
The file is made in your browser and contains your key: don't share it, and delete it after use. Before changing a settings file it saves a copy next to it (names ending in .bak-…). Those copies can hold a key too, so delete them once everything works.
On Linux? Use the manual setup below: one command in a terminal.
Open the file
The first time you open a file from the web, your computer warns you. This is how to get past it.
macOS
1. Open the zip file in Downloads (Safari unzips it for you). Right-click the setup file, choose Open, then click Open again.

2. On macOS 15 and later you see "LaRouter setup" Not Opened instead. Click Done.

3. Go to System Settings > Privacy & Security, scroll to Security and click Open Anyway. Confirm, and the setup runs.

Windows
1. Open the .cmd file in Downloads. If a blue "Windows protected your PC" screen appears, click More info.

2. Click Run anyway. The setup runs in a window. Windows asks for permission a few times while the apps install: click Yes each time. The window says Done when it finishes.

This is the normal warning for any small file that isn't from an app store. You can open it in a text editor and read it first.
Check it works
When the file says Done, open a new Terminal window (PowerShell on Windows) and type the command it shows: claude or codex. Send any message: the reply comes through LaRouter.
Option B
Manual setup
Prefer to see every step, or on Linux? Set up Claude CLI by hand: the commands below already include your key when you are signed in.
The video is in Vietnamese; the written steps below are the same.
What you need
- A LaRouter account
- Claude CLI installed (install steps below)
- Nothing else to install: the setup command uses tools already on your computer
- About 2 minutes
How to install Claude CLI
curl -fsSL https://claude.ai/install.sh | bashirm https://claude.ai/install.ps1 | iexLoading your API key…
Connect Claude CLI to LaRouter
Open Terminal. On a Mac, press Command + Space, type Terminal and press Return. On Windows, open the Start menu, type PowerShell and press Enter.
Copy the command for your computer, paste it into the window and press Enter.
Mac / Linuxcurl -fsSL https://larouter.lapage.vn/setup/claude.sh | LAROUTER_KEY='YOUR_API_KEY' bashSee what this command does
It downloads a short LaRouter script and runs it on your computer. The script adds LaRouter to your settings file, keeps everything else, and saves a backup first. Your key is passed in by the command and saved only in that file on your computer; it is never part of the script. Read the script
Wait for the message "Done. LaRouter is set up". Your other settings stay as they were, and a backup copy is saved next to them.
If Claude CLI is already running, type /exit and start it again.
Check it works
In Terminal, type claude and press Enter.
Type /status and press Enter. The line Anthropic base URL should show i-larouter.lapage.vn.
Ask something simple, such as "Say hello". If you get an answer, it works.
Common problems
- Claude CLI shows a login screen.
- Run the command from step 2 again, then open a new Terminal window and type claude. If it still asks, type /logout inside Claude CLI and start it again.
- I see "not valid JSON. Nothing was changed".
- Your settings file has a typing mistake, so the command left it alone. Fix it with "Set it up by hand" below, or rename the file and run the command again.
- Terminal says "command not found" for claude.
- Claude CLI isn't installed yet, or Terminal was open during the install. Install it (see What you need), then open a new Terminal window.
- Terminal says "curl: command not found" (Linux).
- Some Linux computers don't have curl. Use this command instead; it does the same thing with wget.Mac / Linux
wget -qO- https://larouter.lapage.vn/setup/claude.sh | LAROUTER_KEY='YOUR_API_KEY' bash
The command didn't work? Set it up by hand
Open the hidden .claude folder. On a Mac, open Finder, press Command + Shift + G, paste the Mac address and press Return. On Windows, press Windows + R, paste the Windows address and press Enter. If the folder doesn't exist, create a folder named .claude in your home folder.
Mac~/.claudeWindows%USERPROFILE%\.claudeOpen the file settings.json with TextEdit or Notepad. If it isn't there, create it, paste the whole box below and skip to the last step.
New file{ "env": { "ANTHROPIC_BASE_URL": "https://i-larouter.lapage.vn/v1", "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY" } }If the file already has content, don't replace it. Find the line "env": { and paste these two lines just below it. If there's no "env" line, paste the second box just below the first { in the file.
Two lines to add"ANTHROPIC_BASE_URL": "https://i-larouter.lapage.vn/v1", "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",If there's no "env" line"env": { "ANTHROPIC_BASE_URL": "https://i-larouter.lapage.vn/v1", "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY" },Save the file, then start Claude CLI again.
Agent skills
Skills let your agent use more LaRouter models. Install one, then ask your agent in plain words.