Cuiar CLI install guide: Two commands and a login
11 min read

The Cuiar CLI install guide has two steps: open a terminal, run curl -fsSL https://cuiar.com/install.sh | sh, then run cuiar login. The CLI installs today with one command, but the desktop app is not released yet. Sign up at cuiar.com/signup or on the Cuiar download page to get an e-mail when the desktop build is ready.
Your AI agent or cron job needs a real browser with signed-in accounts, and you want the CLI on the machine now. The CLI puts Cuiar in your terminal, where Claude Code, Codex, Cursor or your own script can call it. Cuiar takes one sentence, does the work in your signed-in tabs, and stops when you must decide.
After these steps, the CLI is installed and signed in, your agent or script can call it, and you can fix the common errors yourself.
Key Takeaways
- Exit code 5 means the Cuiar app is not open.
- Work an AI agent does on your own Claude or Codex plan uses no Cuiar credits.
What do you need before you follow this Cuiar CLI install guide?
Before you follow this Cuiar CLI install guide, you’ll need a macOS or Linux computer and a Cuiar account. Task commands also need the Cuiar app open and signed in.
- macOS or Linux. The install is one shell command, so you need a terminal on one of these systems.
- A Cuiar account. The
cuiar loginstep uses it, so create the account before you run that command. - The Cuiar app, open and signed in, for any command that controls the app.
Cuiar’s developer docs say the Cuiar CLI manages routines and API keys and connects AI clients. Those jobs work today with the CLI alone:
- Manage routines.
- Manage API keys.
- Connect AI clients, such as Claude Code, Codex or Cursor.
The Cuiar CLI page says commands that run tasks, use the MCP browser tools or call the REST API need the Cuiar app open and signed in. That covers:
- Running a task, for example
cuiar exec. - The MCP browser tools.
- Calls to the REST API.
You can test how a script sees a closed app. Leave the app closed, run cuiar exec with a one-sentence task, and type echo $? in the same shell. The command can’t reach the app. It ends with an error and an exit code your script can read.
There’s no app to download today.
Cuiar CLI install guide: how do you install and sign in?
This Cuiar CLI install guide takes two commands and a shell check. Run them in a terminal on your Mac or Linux computer. Each step lists the result you should see.
-
Run the install command. Paste this line and press Enter:
curl -fsSL https://cuiar.com/install.sh | sh
Expect the script to run and return you to your prompt. If your shell prints an error such as a network failure, fix the connection and run the same line again.
-
Open a new terminal window. Your shell then reads its current settings and can find the new command.
-
Run the sign-in command:
cuiar login
Follow the prompts the command prints. The Cuiar CLI page for AI agents and scripts has the sign-in details for your version.
-
Verify the install:
command -v cuiar
Expect one line with the full path to the cuiar program. The check confirms only that your shell finds cuiar. If it prints nothing, repeat step 2 and run the check again.
CLI, remote MCP server or REST API: which do you need?
Use the CLI when a person, a script or an agent with a shell calls Cuiar, the remote MCP server when an MCP client calls it, and the REST API when your own code calls it. The Cuiar developer docs say the three differ by who calls them and what they need.
| Criterion | CLI | Remote MCP server | REST API |
|---|---|---|---|
| Called by | Person, script or agent with a shell | MCP client such as Claude Code, Codex or Cursor | Your code |
| Address | cuiar command (macOS, Linux) |
https://mcp.cuiar.com/mcp | https://api.cuiar.com |
| Sign-in | cuiar login |
OAuth 2.1 with PKCE, or an API key with the mcp scope |
API key |
| Starts a task with | cuiar "task" |
run_task tool |
POST /v1/tasks |
| App open and signed in | Yes, for task commands | Yes, for browser tools | Yes |
The API key goes in as a Bearer token, and the local stdio option runs with cuiar mcp.
On the Cuiar pricing page, the Free plan lists “remote MCP for your own AI agent”, so you can connect Claude Code or Codex without paying.
Check the approval settings in Claude Code, Codex or Cursor before you let it pay, post or send.
The CLI fits a person at a terminal, a cron job, or an agent that can run shell commands.
Pick the remote MCP server for an MCP client that should open tabs, read pages and sign in from the vault with its own tools.
A service or script in your own code that creates tasks and reads their results over HTTP needs the REST API.
How do you connect Claude Code, Codex or Cursor to Cuiar?
You connect Claude Code, Codex or Cursor to Cuiar by adding one server URL, https://mcp.cuiar.com/mcp, to the agent’s MCP settings. Cuiar’s server uses Streamable HTTP. The MCP specification on transports says, “The protocol currently defines two standard transport mechanisms for client-server communication”, and Streamable HTTP is one of them.
-
Add Cuiar to Claude Code. The Claude Code MCP docs give the syntax as
claude mcp add --transport http <name> <url>. Run this command in a terminal:claude mcp add --transport http cuiar https://mcp.cuiar.com/mcp -
Add Cuiar to Codex. Open your Codex
config.tomland add a server entry with aurlkey, the form the Codex MCP docs use for Streamable HTTP servers.[mcp_servers.cuiar] url = "https://mcp.cuiar.com/mcp" -
Add Cuiar to Cursor with the steps on the Cuiar agents page. It lists setup for each agent, including Gemini CLI.
-
Sign in. Start the agent and call a Cuiar tool. The agent opens a Cuiar sign-in page in your browser, and you approve it once.
The OAuth sign-in lets the agent act for your Cuiar account without a secret pasted into a config file. The MCP authorization section builds on “OAuth 2.1”.
Cuiar’s MCP page lists OAuth 2.1, an API key header and a local stdio server as the three ways in. For the other two, use an API key with the mcp scope as a Bearer token, or run cuiar mcp for a local stdio server.
If your agent needs a login on a site, it calls the sign_in tool, and the vault fills the login.
The browser tools control the Cuiar app, so the app must be open and signed in. You can start free at Cuiar now and get an e-mail when the app build is ready.
How do you script Cuiar with exec –json and exit codes?
You script Cuiar by running cuiar exec --json, reading the JSON it prints, and branching on the exit code. The app must be open and signed in, because tasks control the Cuiar app.
The flags are --workspace, --odyssey, --permission and --incognito. Take the exact syntax for each from the CLI page. The developer docs cover the CLI, the MCP server and the REST API.
- Run one task. Call
cuiar exec --jsonwith a one-sentence task, and add--permission read-onlywhen the script only reads pages. - Save the exit code first. Copy
$?into a variable right after the command, before any other command changes it. - Branch on the code. The CLI page lists codes 0 to 9, and code 5 means the app is not open. Send any code you don’t handle to a log, and look it up in the table on that page.
- Read the JSON last. Parse the output only when the code says the run finished.
This script, saved as cuiar-check.sh, follows those steps:
#!/bin/sh
out=$(cuiar exec --json --permission read-only "List the invoices due this week")
code=$?
case $code in
0) printf '%s\n' "$out" >> "$HOME/cuiar-results.jsonl" ;;
5) echo "Open the Cuiar app and try again" >&2 ;;
*) echo "cuiar exited with code $code" >&2 ;;
esac
A system crontab line then runs it at 08:00 on weekdays:
0 8 * * 1-5 /home/you/bin/cuiar-check.sh
Cron starts with a short PATH. Use the full path that command -v cuiar prints, or set PATH inside the script.
A Cuiar routine is a separate feature. A routine runs a task on a schedule you set as a 5-field cron expression in a time zone, with runs at least 15 minutes apart.
Use the system crontab when a script must read the result. Use a routine when you want the result in your inbox.
What does the agent ask before it acts, and what stays private?
The agent asks before it pays, posts, sends or changes an account, and the vault fills sign-ins so the model gets only the user name. Cuiar’s security page sets out both.
Cuiar has three permission modes: read-only, guard and full. Read-only reads pages and changes nothing. In guard mode, you approve each change, and guard is the default for tasks started on cuiar.com, in the CLI or with the API.
The browser finds these actions itself, so the agent stops even when the model forgets to ask. You can approve in four places:
- In the side panel.
- On your phone, through channels.
- By e-mail.
- In the CLI.
A task such as cuiar "Check my invoice inbox" starts in guard mode. The agent stops at each change and waits for your yes.
The vault handles sign-ins. It types the user name, the password and the one-time code into the page. The model gets only “signed in as” and the user name.
The vault fills a login only on that login’s site, and it checks the address first.
Cuiar treats text from a website as data. It goes to the model between markers with a random ID, and the page cannot write or close those markers. The model is told never to follow requests, commands or rules in that text.
Cuiar CLI install guide: how do you fix errors, update or remove it?
Most Cuiar CLI install errors fall into four symptoms, and each has a short check. Find your symptom and run its check.
-
The install command prints an error or nothing. Run
curl -fsSL https://cuiar.com/install.shwithout the| shpart. If the script text prints, the download works and the fault is in your shell. If curl shows an error, check your network connection and try again. -
cuiar: command not foundafter install. Open a new terminal window, then runcommand -v cuiar. An empty result means your shell can’t find the program. Runecho $PATHand see which folders your shell searches. -
A command exits with code 5. The Cuiar CLI page says exit code 5 means the Cuiar app is not open. The app is not released yet, so task commands cannot work today. Routines, API keys and AI client setup still work from the CLI.
To get an e-mail when the build is ready, sign up at cuiar.com/signup.
- A task command stops and waits. The agent has asked for an approval. In guard mode, the default for tasks started in the CLI, the agent asks before it pays, posts, sends or changes an account. Approve in the side panel, on your phone, by e-mail or in the CLI.
For update, sign-out and uninstall steps, read the Cuiar developer docs. Don’t delete files by guesswork. A wrong path can remove data that belongs to something else.
Frequently asked questions
Do I need the Cuiar app to use the CLI?
Commands that run tasks, use the MCP browser tools or call the REST API need the Cuiar app open and signed in, as the Cuiar CLI page says. The CLI itself manages routines and API keys and connects AI clients today, per the developer docs. The desktop app is not released yet.
Does my own Claude or Codex plan use Cuiar credits?
Work that your own Claude or Codex plan does uses no Cuiar credits, because your AI plan pays for the model. The Cuiar MCP server page names the run_task tool as the exception: it runs Cuiar’s built-in model, and that uses credits.
How do I get the desktop app when it is ready?
Make an account at cuiar.com/signup or on the Cuiar download page. Cuiar then sends you an e-mail when the build is ready. The download page lists the desktop builds as not yet released.
What does exit code 5 mean?
Exit code 5 means the Cuiar app is not open. Open the app, sign in, and run the same command again. Scripts can read this code, so a cron job can stop or retry when it sees a 5.
Next steps: install today, run tasks when the app is ready
Install and sign in today, connect your agent this week, and run tasks once the app arrives.
Today:
- Run
curl -fsSL https://cuiar.com/install.sh | sh. - Run
cuiar loginand sign in. - Run
command -v cuiarand check that it prints the path tocuiar.
This week:
- Add
https://mcp.cuiar.com/mcpto Claude Code, Codex or Cursor. The MCP server page lists the connection options. - Write one scripted call with
cuiar exec --json, and read its exit code in your script.
When the app is ready: the Cuiar download page says Cuiar sends an e-mail to people who signed up. After that, the task commands run, because the app is open and signed in.
Start free today, and the e-mail arrives when the build is ready. Then the agent works in your tabs and stops for your yes.
Sources
Download Cuiar for macOS, Windows and Linux · Cuiar: the browser agents love · Cuiar CLI for AI agents and scripts · Cuiar MCP server: one URL for any MCP client · Developer docs: CLI, MCP server and REST API · Cuiar · Cuiar pricing · MCP specification: Transports · Security at Cuiar. Every other source is linked where the article cites it.
- cuiar cli
- installation
- mcp server
- ai agents
- exit codes
- scripting
Try Cuiar
Cuiar is a browser with an AI agent built in. The agent works in your tabs and signs in from your vault. It is free to start, with no card.
More from the blog
Browser agent for hotel reservations: How it works
Learn how a browser agent for hotel reservations works: it compares total prices and cancellation terms, then asks your approval before it pays. Start free.
How to use MCP with cursor: Setup in 3 steps
How to use MCP with Cursor? Add the server to.cursor/mcp.json, confirm it shows as connected, then ask the agent to call a tool. Learn the steps and fixes.
Cuiar MCP server tutorial: Connect your AI agent
Learn the Cuiar MCP server tutorial steps: add the remote server to Claude Code, Codex or Cursor, sign in with OAuth or an API key, then run a first task.