CLI & Local Development
Install the reqlo CLI, sign in through your browser, and manage agents, schema, policies, keys and approvals from your terminal.
The reqlo CLI manages policies as code and lets you review and resolve
approval requests from your terminal. It talks to the same API as the dashboard.
reqlo --helpInstall
npm install -g @reqlo/cli
reqlo --versionRequires Node.js 20.18 or later. To run it without installing, use npx @reqlo/cli <command>.
| Task | Command |
|---|---|
| Update | npm update -g @reqlo/cli |
| Uninstall | reqlo logout, then npm uninstall -g @reqlo/cli |
Commands
| Command | Purpose |
|---|---|
reqlo init | Scaffold config, schema, a policy and tests |
reqlo projects list | List your projects |
reqlo env list / env use | Find environment IDs and pick one |
reqlo agents | List, create, tag, disable, enable and delete agents |
reqlo schema push | Register actions and resource types from a file |
reqlo check | Evaluate one request: simulated or live |
reqlo keys | List and revoke API keys |
reqlo policies | List, validate, test, diff, push, version and roll back policies |
reqlo login | Sign in through your browser |
reqlo whoami | Show who you're signed in as |
reqlo logout | Revoke this machine's login and remove it |
reqlo approvals list | List approval requests |
reqlo approvals view | Show one request |
reqlo approvals approve | Approve a pending request |
reqlo approvals reject | Reject a pending request |
Authentication
The CLI uses two credentials, each for a different job:
| Credential | Used for | How you get it |
|---|---|---|
Project API key (REQLO_API_KEY) | Reading approvals, reqlo check --live, and finding the key's environment | API keys in the dashboard |
| Your CLI login (personal access token) | Everything else, as you and with your role: workspace, agents, schema, policies, keys, approving and rejecting | reqlo login |
Approving and rejecting never accept the project API key. The key is shared with your agents' backends, so if it could approve, an agent could approve its own request. A decision is always made by a signed-in person.
Sign in
reqlo login- Your browser opens the ReQlo dashboard. Sign in if needed.
- Check the request names your computer, then select Authorize.
- The page shows a code such as
ABCD-EFGH. Paste it into the terminal.
Opening your browser to authorize the CLI. If it doesn't open, visit:
https://app.reqlo.io/cli/authorize?challenge=…&name=reqlo+CLI+on+laptop
Paste the code shown in your browser: ABCD-EFGH
Signed in as jane@example.com. Saved to ~/.config/reqlo/credentials.json; this login expires 2027-02-06.The code works once, expires after 10 minutes and only works for the terminal that started the login: the CLI proves it with a one-time secret it never shows (PKCE). A copied code is useless on its own.
The CLI stores a personal access token in ~/.config/reqlo/credentials.json, readable only by you. Tokens expire
after 90 days. See and revoke them in the dashboard under Account → CLI tokens; a revoked token stops working
immediately.
On a machine without a browser, run reqlo login --no-browser and open the printed link on another device.
Sign out
reqlo logout revokes this machine's token on the server, then deletes the local file, so a copy of the file stops
working too.
Global flags
| Flag | Description |
|---|---|
--json | Print JSON instead of text. |
--api-url <url> | API base URL. Default: $REQLO_API_URL, then https://api.reqlo.io. |
-v, --version | Print the CLI version. |
-h, --help | Show help. |
Environment variables
| Variable | Meaning |
|---|---|
REQLO_API_KEY | Project API key used to read approvals. Keep it in your shell or secret store; never commit it. |
REQLO_ACCESS_TOKEN | Personal access token used instead of reqlo login. |
REQLO_API_URL | API base URL. http:// is accepted only for localhost. |
REQLO_CONFIG_DIR | Where the login is stored. Default: $XDG_CONFIG_HOME/reqlo or ~/.config/reqlo. |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | The request failed, or you declined a confirmation |
2 | Invalid usage or input |
3 | Not signed in, signed in to a different API, or the login expired |
5 | reqlo check: the decision is deny |
6 | reqlo check: the decision is approval required |
Output
Text output is for people and may change; don't parse it. Use --json in scripts: it prints the API's JSON
response on stdout and nothing else. Errors go to stderr as Error: <message>, and never include API keys, tokens or
raw server responses.
Troubleshooting
| Message | Fix |
|---|---|
You're not signed in. Run reqlo login. | Run reqlo login, or set REQLO_ACCESS_TOKEN. |
Your CLI login is invalid, expired or revoked. | Run reqlo login again. Check Account → CLI tokens if you didn't revoke it. |
That code is invalid, expired or already used. | Codes work once, for 10 minutes. Run reqlo login again. |
Set REQLO_API_KEY to your project API key | Export your project key before approvals list or view. |
REQLO_API_KEY is invalid, expired or revoked. | Copy the current key from API keys, or roll it. |
You aren't an approver for this request. | Only the request's channel approvers, or owners and admins when it has no channel, can resolve it. |
This request was already resolved or has expired. | Refresh with reqlo approvals list. |
Pass --yes to confirm when not running in an interactive terminal. | In scripts, add --yes to approve or reject. |
Something wrong or unclear? Report an issue with this page.