Suite Utils

Commands

The three su-ns-harness slash commands, and the nsx CLI Claude uses for cache lookups, saved results, SuiteQL linting and audit exports.

On this page

Slash commands

Claude runs all three by itself: init when the cache is empty, refresh when a section it needs is stale, and doctor when the plugin looks broken, for example when results come back with no [su-ns-harness] line. You can also type them.

/su-ns-harness:init

First-time setup. Fills the cache and builds the Profile Card. See the Quickstart for each step.

/su-ns-harness:init
/su-ns-harness:init --skip-probes

--skip-probes skips the profile queries (periods, base currency, approvals, revenue) and only fills the catalog cache.

/su-ns-harness:refresh

Refreshes cache sections. With no argument it refreshes the stale ones.

/su-ns-harness:refresh
/su-ns-harness:refresh all
/su-ns-harness:refresh fields transactionline

The argument is one of:

  • stale: every stale section (the default)
  • all: every section in the cache
  • reports, searches, periods, subsidiaries, books or recordtypes: that one section
  • fields <table>: the field metadata for one table
  • profile: the profile probes, periods and consolidated revenue

Refresh only re-reads catalog data and changes nothing in NetSuite. Afterwards Claude tells you what changed, for example "reports 412 → 415". After widening the connector role's permissions, run /su-ns-harness:refresh recordtypes to pick up the tables it can now see.

/su-ns-harness:doctor

Checks Node, settings, hooks, cache freshness and whether the connector answers. It makes one ns_getSubsidiaries call and changes nothing in NetSuite. The result is a short ✓/✗ checklist with one fix per ✗.

/su-ns-harness:doctor

The nsx CLI

Claude drives nsx itself, and you can run it too. It reads the data the hooks create, so start one Claude Code session with the plugin enabled first.

Find it

nsx isn't on your PATH. Find the newest installed copy with:

ls -dt ~/.claude/plugins/cache/*/su-ns-harness/*/scripts/nsx.mjs | head -1

Then run it with Node:

node <path it printed> help

The examples below shorten that to nsx.

Examples

nsx help

Lists every command.

nsx reports search aging

Searches the cached report list for "aging". No NetSuite call.

nsx fields transaction --grep amount

Lists the cached fields of transaction that match "amount".

nsx results agg r_7f3a2c --by entity --sum amount --top 20

Groups a saved result by entity, sums amount, and shows the top 20.

nsx results head r_7f3a2c 10 --sort amount

Shows the first 10 rows of a saved result, largest amount first.

nsx results export r_7f3a2c --xlsx

Exports a saved result to ./exports/ as an Excel file. --csv works too.

nsx sql lint "SELECT entity, SUM(foreigntotal) FROM transaction WHERE ROWNUM <= 100 GROUP BY entity"

Runs the SuiteQL checker on a query without sending it.

nsx audit export

Writes the audit log of NetSuite calls to a CSV file, ./exports/netsuite-audit-<date>.csv by default. --out <file> picks another path.

Exit codes

The sql lint example above exits with status 1 on purpose, because that query has the ROWNUM bug the checker catches. It prints ERROR [rownum-with-aggregate], a WARN [sum-mixed-currency] line and a suggested fix. A query with warnings and no errors exits 0.

Unknown commands, unknown flags, extra arguments and non-numeric counts exit with status 2 and a suggestion. A typo like --were gets "Did you mean --where?".

Other commands

nsx help prints the full list. The ones you'll reach for most:

CommandWhat it does
nsx doctorThe same checks as /su-ns-harness:doctor, without the connector call. --preflight stops after Node, the cache key and the data dir
nsx cache statusEvery cache section with its count, status (including stale), age, TTL and source tool
nsx periods --openOpen accounting months, earliest first (six by default, --max N for more)
nsx results listSaved results for the current account
nsx results filter <id> --where "amount>10000"Rows of a saved result that match a condition
nsx results pivot <id> --rows entity --cols period --sum amountA pivot table from a saved result
nsx results diff <idA> <idB> --on account --cols amountCompares two saved results key by key
nsx results concat <id1> <id2>Joins pages of one query in page order and flags any missing page
nsx sql fix-rownum "<sql>"Rewrites a ROWNUM cap to FETCH FIRST where that's safe
nsx config showCurrent settings and where each value came from
nsx audit tailThe latest audit log entries

sql lint and sql fix-rownum take a query as a file path or a quoted string. Pass - to read it from stdin.

Install su-ns-harness

Run both inside Claude Code, then /reload-plugins. Version 0.5.1, free and open source.

  1. /plugin marketplace add suiteutils/suiteutils-netsuite-claude-harness
  2. /plugin install su-ns-harness@suiteutils

Page last updated 2026-09-28. NetSuite is a trademark of Oracle. Claude is a trademark of Anthropic. Suite Utils is not affiliated with either.