Before you start
- A Darpan account you can sign in to at app.drpn.ai.
- The CLI turned on for you in each tenant you want to use it in. See Turn on the CLI.
- A Mac with Homebrew and Node 22.18 or newer. Check with
node --version; if it shows none or an older version, install Node from nodejs.org.
Turn on the CLI
CLI access is off by default and set per tenant. A Darpan admin turns it on for you in a tenant, with an end date. Darpan admins need no access of their own. To ask for it:1
Open User settings
Open Ask Darpan with
Cmd/Ctrl+K and search for Open User Settings, or go to /settings/user. Check that the active tenant is the one you want the CLI in.2
Request access
In CLI sessions, the CLI in <tenant> card says whether the CLI is on for you. If it is not, add what you need it for in What it is for (optional) and choose Request access in <tenant>.
3
Wait for a Darpan admin
The card shows Requested <date>. A Darpan admin will turn it on. When the request is approved, the card shows the CLI as on and when it ends. If it is declined, the card shows the date and the admin’s note, and you can ask again.
Install
brew install alone stops with Refusing to load formula drpn-ai/tap/darpan from untrusted tap. The brew trust line trusts only the darpan formula. Check the install with darpan version.
Sign in
Signing in links the CLI on this machine to your Darpan user. You approve it in the browser, so your password never goes through the terminal.1
Start the sign-in
BCDF-GHJK, and opens the Approve CLI page at app.drpn.ai/cli-login. Sign in to the app if it asks.2
Enter the code
Type the code into Code from your terminal? and choose Continue. The code works for 10 minutes.
3
Check and approve
The page asks Approve Darpan CLI on computer name?, with Started and Expires below. The computer name is the one the CLI sent. Approve only a code you just started in your own terminal, then choose Approve. Deny turns the request down.With two-factor on, Approve opens your passkey prompt when you have a passkey. Use the app code asks for Current code from your app instead.The page shows Approved. and Return to your terminal. The terminal prints your username and when the sign-in ends.
darpan login again once it is approved.
Choose a tenant
Every command runs in one tenant. List yours and pick one:--tenant <tenant-id>. Check who and where you are with darpan whoami.
First commands
Commands print JSON. The CLI can do anything your role lets you do in the app, and the server checks your role on every call. It reads data, starts and cancels runs, plays audits and re-checks findings, and asks a connected system a fresh read-only question. With
darpan 0.3.0 or later, it also makes the changes your role allows. Connection passwords, tokens and keys, sign-in, two-factor, passkeys, CLI access, and Shopify or Slack installs stay in the app. A secret given to an AI assistant is kept in its transcript.
Change a run’s conclusions and sync an automation
A Tenant admin or Company editor can also change a run’s conclusions and keep an automation in step with its run. These needdarpan 0.2.4 or later.
Start a save from
conclusions show, edit the file, then save it: a save replaces every conclusion, so a partial list would drop the rest. conclusions save refuses an empty or malformed list. Each change is credited to you in Config history, as an edit in the app would be.
Look up any order
Withdarpan 0.6.0 or later and Darpan 3.5.0 or later, darpan lookup <id> finds an id in what Darpan already holds: a Shopify order id or name, a refund or return id, a HotWax order or return id (with or without #), or a NetSuite number, in any spelling. It answers from Darpan’s ID index, built from every run and kept copy Darpan reads, and calls none of your connected systems. It shows:
- The records that carry the id in each system, and the records they connect to, such as a HotWax order’s Shopify order or a NetSuite sales order’s fulfillments.
- The open findings on any of them, including findings on an order’s lines.
A lookup needs view access in the tenant.
darpan lookup --all is gone in 0.6.0: a lookup never reads your systems, so there is no fuller read to ask for.
Explain a finding, or mark a cause expected
Withdarpan 0.4.0 or later, a Tenant admin or Company editor can tell Claude why a finding happened (“the order isn’t paid yet, the payment preference is missing”) and have it filed, together with the findings like it. Claude proposes the change; nothing changes until you say yes.
--words is what you said, as you said it. Any value in a proposal that is not already in the finding or the audit’s setup is listed in change show; you see each one, and Claude names it back with --confirm before the change is made. If the setup changed since the proposal was planned, run darpan change plan <id> and look at it again.
Make other changes
Any other change goes throughdarpan call. darpan api lists every method, and writes: true marks the ones that change something. darpan call sends those only with --yes. Without it, the CLI sends nothing and lists the method’s inputs.
Read the current record first and check what will change before you pass
--yes. Each change is credited to you in Config history, as an edit in the app would be. darpan 0.3.0 drops darpan scripts, script and deploy. Use darpan call for queries and their schedules.
Use it from Claude Code
Add the CLI as an MCP server and every command becomes a tool Claude Code can call:How long a sign-in lasts
A sign-in lasts 7 days, whatever your role, Darpan admins included. It also stops working when your CLI access for the tenant ends, is paused, or is revoked. When it does, commands say Your CLI session has expired. Rundarpan login again.
See and end your sign-ins
User settings → CLI sessions lists each machine signed in to the CLI, with when it signed in and when it expires. Choose Revoke to end one, for example on a machine you no longer use. To sign out on the machine you are on:~/.config/darpan. Signing out removes it.