Datarails Write-back (Beta)

Datarails Write-back lets you, your scripts and your AI assistant read and update your Datarails environment from your computer, with the same account and permissions you use in the Datarails web app. This article covers how it works, how to install it, how to control what it may do, best practices, troubleshooting and frequently asked questions.

What Write-back Is

Write-back is a small program you install on your computer. You run it with the dr command in a terminal, or let an AI assistant run it for you from plain-language requests. It uses the same services as the Datarails web app, so you see the same data and can do the same things your account allows there.

Typical uses:

  • Quick checks — look up a table, a dashboard number or a sync status without clicking through the web app.
  • Repeated tasks — script work you do every month, such as uploading files or updating workflow tasks.
  • AI assistants — let an assistant such as Claude Code, Gemini CLI or Codex CLI carry out Datarails tasks for you, including making changes, within the limits you set.

What you can do

Area What you can do
Tables and data List tables, look at sample rows, get distinct values and totals
Dashboards and widgets List dashboards, read the numbers behind a widget, add charts, KPIs and tables
Files Upload files and new versions, see version history and sheets
Integrations Check sync status and errors, start a sync, test a connection
Mapping and lookups Work with data mappers and lookup tables, find unmapped items
Reports and storyboards List and clone reports, create a storyboard from a dashboard
Planning Work with forecast cycles and scenarios
Workflows and month-end close See and update workflow tasks, approvals and sign-offs
Metrics and FX Look up metrics and currency rates
Help Center Search Datarails help articles with dr kb search "<question>"

Some areas only work if your organization uses that part of Datarails. Run dr --help --server <region>, or dr <command> --help, for the full and current list.

Beta Status

Write-back is in beta. It works and is in use, but it is still changing. It uses your existing account and permissions, and there is no separate charge for it.

  • Commands can change. Names, options and output may change between releases. If you build scripts on it, use --json output and re-test after each update.
  • Updates are frequent. Run dr update regularly to get fixes and new commands.
  • Deleting is not available. During the beta, write-back cannot delete anything. Do deletions in the web app.

Prerequisites

  • A Datarails account — any Datarails user can install write-back and sign in. There is nothing for an admin to turn on.
  • A computer running Windows, macOS or Linux — with permission to install software. Some companies restrict this; check with your IT team if the install is blocked.
  • Node.js 18 or newer — the one-step installers add it for you if it is missing.
  • Your Datarails web app address — you need it to pick your region in Step 3.

Step 1: Install Write-back

Pick the line for your computer and run it in a terminal (PowerShell on Windows, Terminal on macOS or Linux).

Your computer Run this
Windows (PowerShell) powershell -ExecutionPolicy Bypass -Command "irm https://drcli.datarails.com/cli/install.ps1 | iex"
macOS or Linux curl -fsSL https://drcli.datarails.com/cli/install.sh | bash
Node.js 18+ already installed npm install -g @datarails-ai/dr-cli

The installer also adds a Datarails skill to AI assistants it finds on your computer (such as Claude Code), so they know how to run Datarails tasks from plain-language requests.

Step 2: Open a New Terminal

Close the terminal and open a new one, so the dr command is found.

Step 3: Find Your Region

Look at the address you open the Datarails web app at, and use the matching value with --server in every command.

Web app address Use
app.datarails.com --server US
us-2.datarails.com --server US2
ukapp.datarails.com --server UK
caapp.datarails.com --server CA
euapp.datarails.com --server EU

You can also pass the address itself, for example --server https://ukapp.datarails.com. The short form -s works too. The examples below use US; replace it with your region.

Step 4: Sign In and Choose What Write-back May Do

  1. Run:

    dr login --server US
  2. Your browser opens a Datarails page. If it does not open, copy the link the terminal prints after If the browser doesn't open, visit: into your browser.
  3. Sign in the way you normally do. Check that the page names the Datarails CLI and your email address. (The sign-in page uses the name “Datarails CLI” for write-back during the beta.)
  4. Choose what this sign-in may do. See Permissions below for the options.
  5. Click Allow. The terminal confirms that you are signed in.

Step 5: Check Your Sign-in

dr whoami --server US

This shows the account you are signed in as, your organization and what this sign-in allows.

Step 6: Run Your First Command

dr dashboards list --server US

This lists the dashboards you can see. Add --json for output your scripts can read.

Permissions

Write-back never gets more access than you have. It acts as you, and you decide how much of your access it may use.

It acts as you

Every command runs as the person who signed in, with the same permissions that person has in the Datarails web app. A table, dashboard or file you cannot open in the web app, write-back cannot reach either.

You choose its limits at sign-in

When you click Allow, you also choose how much of your access this sign-in may use. The choice sits on top of your own permissions: it can narrow what write-back does, never widen it. The browser page asks: What should this sign-in be allowed to do?

Option What it allows
Read only View data. Cannot change anything.
Read and write View and edit data. Cannot delete.
Advanced Choose read or write area by area. Greyed-out areas cannot be limited yet.

Important: during the beta, no option includes delete rights. Commands that delete will not run; do those in the web app.

See or change your choice

  • To see it, run dr whoami --server US. The Scope line shows Read only, Read and write, the areas you picked under Advanced, or unrestricted if no choice was made at sign-in. If the browser page did not offer these options, the sign-in is limited only by your own permissions.
  • To change it, run dr login --server US again and pick a different option.

When something is not allowed

Commands your sign-in does not allow are hidden from dr --help. If you run one anyway, write-back stops and names the permission it would need:

'dr <command>' is not available under this identity's credential scope (needs <area>:<action>); run 'dr whoami' to see the scopes this identity carries

Security

  • Independently tested — write-back has been through an independent penetration test.
  • No passwords — you sign in through your browser. Write-back never asks for your password.
  • Credentials stay on your machine — the sign-in is saved in your computer's secure store: Windows Credential Manager, macOS Keychain or the Linux keyring. It renews itself; you sign in again only if it expires or is revoked. Treat it like a password and never share it.
  • Sign out at any time — dr logout --server US removes the saved sign-in for that region. dr logout --all removes all of them.

Using Write-back with an AI Assistant

Once write-back is installed and you are signed in, an AI assistant on your computer (such as Claude Code, Gemini CLI or Codex CLI) can run dr commands for you. Ask in plain language, for example:

Which of my integrations failed to sync this week?
Add a KPI for total revenue to my Board dashboard.
Mark the bank reconciliation task as done for October.

The assistant runs as you, within the limits you chose at sign-in. It cannot do anything your sign-in does not allow, and it cannot delete during the beta.

Set up Claude

The installer copies the Datarails skill into Claude's skills folder (~/.claude/skills), so Claude already knows how to use write-back. You need a version of Claude that can run commands on your computer: the Code tab of the Claude desktop app, or Claude Code in a terminal. The regular Chat tab and claude.ai in the browser cannot run write-back.

  1. Install write-back and sign in (Steps 1–5 above).
  2. Download the Claude desktop app from claude.com/download and sign in. Claude Code needs a paid Claude plan (Pro, Max, Team or Enterprise).
  3. Open the Code tab and choose a folder to work in, for example a new empty folder called Datarails.
  4. Check the connection by asking: Which Datarails account am I signed in as? Claude runs dr whoami and reports your account and what your sign-in allows.
  5. Ask for what you need in plain language. Before Claude runs a command, it shows it and asks for approval. Read it, especially when it changes data, then click Allow.

If you use Claude Code in a terminal, run claude in any folder and ask in the same way.

Other assistants

  • Gemini CLI — the installer also adds the skill when a ~/.gemini folder already exists. If you install Gemini CLI later, run dr skill install ~.
  • Codex CLI and Gemini CLI, per project — run dr skill init-project in your project folder to add write-back instructions there.

Write-back and the Datarails Connector

Write-back works alongside the Datarails connector for Claude (the Datarails MCP connector) and does not replace it. Use the connector to ask questions about your data and analyze it in a Claude chat. Use write-back when you want Claude to act on your data from your computer.

  Datarails connector (MCP) Write-back
What it does Reads and analyzes your data Reads and updates your data
Where it works Claude chat, on the web or in the desktop app Your computer: the Code tab of the Claude desktop app, Claude Code, or a terminal
Setup Add the connector in Claude Install with one command and sign in (Steps 1–5)
Sign-in Connected once in Claude Signed in on your computer, with the permission choice described under Permissions
Best for Questions, analysis, reports Changes: workflows, dashboards, files, mappings, and repeated tasks

Both act as you, with your Datarails permissions. You can use either one, or both. In the Code tab of the Claude desktop app, Claude can use the connector to analyze your data and write-back to make the change you asked for.

Updating and Uninstalling

  • Update: run dr update. It installs the latest version and prints the new version number.
  • Uninstall: run dr logout --all to remove saved sign-ins, then npm uninstall -g @datarails-ai/dr-cli.

Best Practices

  • Start with Read only. Get used to write-back with a sign-in that cannot change anything, then sign in again with write access when you need it.
  • Grant write only where you need it. Use Advanced to allow writing only in the areas your task touches, for example workflows but not dashboards.
  • Review what an AI assistant is about to change. Ask it to describe the change first, and approve each command that writes data.
  • Check who you are before you write. Run dr whoami to confirm the account, organization and permissions, especially if you work with more than one Datarails account.
  • Use --json in scripts. Read results from JSON output, not from text meant for people, and re-test scripts after each update.
  • Keep it up to date. Run dr update regularly during the beta.
  • Sign out on shared computers. Run dr logout --all when you finish.

Troubleshooting

"dr" is not recognized or "command not found"

Problem: The terminal does not find the dr command after installing.

Solution:

  • Close the terminal and open a new one.
  • Check that the install finished without errors, and run it again if it did not.
  • If you installed with npm, make sure npm's global folder is on your PATH (npm prefix -g shows where it is).

The install is blocked

Problem: The install command fails with a security, policy or permission error.

Solution:

  • Your company may restrict installing software or running scripts. Ask your IT team to allow the install, or to install Node.js 18+ for you so you can use the npm install -g @datarails-ai/dr-cli line.
  • If your company uses a web proxy, ask IT to allow drcli.datarails.com and the npm registry.

The browser does not open when signing in

Problem: dr login runs but no browser page appears.

Solution:

  • Copy the link printed after If the browser doesn't open, visit: and open it in your browser.
  • If the terminal shows a User code, check that the browser page shows the same code.

"the login was refused, expired, or already used"

Problem: The sign-in did not complete in time, or Allow was not clicked.

Solution: Run dr login --server US again and finish the browser steps within a few minutes.

"too many logins from this address"

Problem: Several sign-ins were started in a short time.

Solution: Wait a minute, then run dr login again.

"not logged in"

Problem: A command says you are not logged in.

Solution:

  • Check that you used the same --server value you signed in with.
  • Run dr login --server US again. Sign-ins renew themselves, but expire if unused for a long time or if they are revoked.

"is not available under this identity's credential scope"

Problem: The command needs a permission your sign-in does not include.

Solution:

  • Run dr whoami --server US to see what your sign-in allows.
  • If you need more, run dr login --server US again and pick Read and write, or add the area under Advanced.
  • If the command deletes something, it is not available during the beta. Use the web app.

A command is missing from the help

Problem: A command from this article does not appear in dr --help.

Solution:

  • Add your region: dr --help --server US lists everything your sign-in allows.
  • Commands your sign-in does not allow are hidden. See the previous item.
  • Run dr update; the command may be newer than your version.

Data is missing or looks wrong

Problem: You see no data, or data from an organization you did not expect.

Solution:

  • Check the region against your web app address (Step 3).
  • Run dr whoami to confirm the account and organization.
  • Check that you can see the same item in the web app. Write-back shows only what your account can see, and some areas work only if your organization uses that part of Datarails.

Claude does not know about Datarails

Problem: Claude says it cannot access Datarails, or does not use the dr command.

Solution:

  • Make sure you are in the Code tab of the Claude desktop app, or in Claude Code. The Chat tab and claude.ai in the browser cannot run commands on your computer.
  • Close and reopen the Claude app, then start a new session. Claude loads skills when a session starts.
  • Run dr skill install ~ in a terminal to copy the Datarails skill again, then start a new session.
  • Ask Claude to run dr whoami --server US. If that fails, fix the sign-in first (see "not logged in" above).

A script stopped working after an update

Problem: A command's name, options or output changed.

Solution: Check dr <command> --help for the current form, update the script and re-test. Use --json output to reduce the effect of changes.

Frequently Asked Questions

Does write-back cost anything?
No. It is another way to use Datarails, with your existing account. There is no separate charge.

Does an admin need to turn it on?
No. Any Datarails user can install it and sign in.

Can write-back do more than I can in the web app?
No. It acts as you, with your permissions. The choice you make at sign-in can only narrow that.

Can it, or my AI assistant, delete data?
Not during the beta. No sign-in includes delete rights.

Which AI assistants work with it?
Any assistant that can run commands on your computer, such as Claude Code, Gemini CLI and Codex CLI. The installer adds a Datarails skill to supported assistants it finds.

I already use the Datarails connector in Claude. Do I still need write-back?
Only if you want Claude to make changes in Datarails. The connector reads and analyzes your data; write-back also updates it. They work side by side, so keep the connector for questions and analysis. See Write-back and the Datarails Connector above.

Can I use write-back from claude.ai or the Claude Chat tab?
No. Write-back runs on your computer, so Claude needs to be able to run commands there. Use the Code tab of the Claude desktop app, or Claude Code.

Will Claude change data without asking me?
By default, Claude asks for your approval before it runs each command and shows you what it is about to run. You can also sign in with Read only, so nothing can be changed at all.

Where does my data go?
Write-back talks only to Datarails. When an AI assistant runs it, the assistant reads the results, so that data is handled under your organization's agreement with the assistant's provider.

Where are my credentials stored?
In your computer's secure store: Windows Credential Manager, macOS Keychain or the Linux keyring. Write-back never stores or asks for your password.

How do I see what my sign-in allows?
Run dr whoami --server <region> and look at the Scope line.

How do I change what it may do?
Run dr login --server <region> again and choose a different option.

Why does the sign-in page say "Datarails CLI"?
That is the technical name of the write-back tool during the beta. It is the same thing.

How do I get help or give feedback?
Use the same support as for the web app: email support@datarails.com or open a ticket at support.datarails.com. Include the command you ran and the message you saw.




© Datarails Ltd. All rights reserved.

Updated

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request