Getting Started: CLI (exploratory.io only)

From a terminal or an AI agent (such as Claude Code or Codex), you can read and total the data, notes and dashboards published on exploratory.io. You do not need Exploratory Desktop.

What you need: Node.js 20 or later, an exploratory.io account

If you use Exploratory Desktop

expl comes with Desktop. Read the note Getting Started: CLI (Exploratory Desktop users) instead.

Steps

1. Install

Check that Node.js 20 or later is installed. npm comes with Node.js. If you have not installed it yet, install it from the Node.js website first.

In a terminal, run this command.

npm install -g @exploratory/cli

❶ Run the command.

If the terminal returns to the prompt with no errors, the install is done. Open a new terminal and run this command.

expl --version

If the first line shows “expl” and a version number (❶), it worked.

2. Sign in

Run this command.

expl server login

Your browser opens. Sign in to Exploratory and allow access.

❶ Allow access.

After you allow access, go back to the terminal and run this command.

expl server status

If the server, your user name (❶) and the sign-in method are shown, it worked.

If your computer cannot open a browser

For example, on a remote server, run expl server login --no-browser. The steps are in “If something goes wrong” below.

3. Search, read and aggregate

First, search for data. Type the search term right after the command.

expl server search "Sales Orders (Line Items)" --scope all --type data

❶ You will use this ID in the next step.

Use the ID in the result (here lJv6ZiJ3px) to read the data. The commands below use the ID and the column names of this example data (Sales Orders (Line Items)). To try other data, replace the data ID and the column names with those from your own search result and get-schema result.

expl server fetch lJv6ZiJ3px --json

Next, check the column names and types.

expl server dataframe get-schema lJv6ZiJ3px --detail light --json

If you see the column names (❶) and types (❷), it worked.

Now total the sales (sales) by region (region), and show the top 5 from largest to smallest.

expl server dataset query lJv6ZiJ3px --mode aggregate --dimensions '[{"column":"region"}]' --metrics '[{"function":"sum","column":"sales","alias":"sales"}]' --sort '[{"field":"sales","direction":"desc"}]' --limit 5 --json

If the sales totals by region (❶) appear from largest to smallest, it worked.

❷ The result also shows the data version and the update time.

Tip

Put single quotes (’) around the whole JSON part. Without them, the terminal removes the double quotes (“) and the command fails.

Warning

The result shows the data version and the update time. When you use a total, check which data it came from by looking at the version and the update time (❷).

4. Let an AI agent use it

An AI agent that can run shell commands can use expl directly. You do not need to set up MCP. In Claude Code, for example, ask like this. It works the same way with Codex, Antigravity and Cursor. For how to use it, see the CLI documentation.

Use expl server to show the sales total by region for "Sales Orders (Line Items)" in descending order. Also show me the commands you used.

If the AI agent runs expl server commands and returns the sales total by region, it worked. Claude Code runs the expl server commands it needs and answers from the results.

Tip

An AI agent can list the available command names with expl server tools list --json. To check the arguments of one command, run expl server tools describe <tool_name>.

Record of operations (access log)

Each time expl runs, the server keeps a record of what was done (an access log). What is recorded, and for how long, is described under “What the server records” on the Sign in page of the documentation.

Try it yourself

Run these commands to go through the same flow as in step 3 again.

expl server search "Sales Orders (Line Items)" --scope all --type data

Total the sales by channel (channel).

expl server dataset query lJv6ZiJ3px --mode aggregate --dimensions '[{"column":"channel"}]' --metrics '[{"function":"sum","column":"sales","alias":"sales"}]' --json

A request you can paste into Claude Code:

Use expl server to show the sales total by category for "Sales Orders (Line Items)". Check the column names with get-schema first.

If something goes wrong

  • Your computer cannot open a browser (such as a remote server): Run expl server login --no-browser. Open the URL that is shown in a browser on another device, and allow access. The browser then shows a page that looks like an error. Copy the URL in the address bar (it starts with http://127.0.0.1/callback?code=), paste it into the terminal and press Enter. When “Logged in to … as …” appears, you are signed in. The code expires in 60 seconds, so paste it right away.
  • expl: command not found appears: Open a new terminal and try again.
  • Your sign-in has expired (exit code 4): Run expl server login again.