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 transactionlineThe argument is one of:
stale: every stale section (the default)all: every section in the cachereports,searches,periods,subsidiaries,booksorrecordtypes: that one sectionfields <table>: the field metadata for one tableprofile: 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:doctorThe 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 -1Then run it with Node:
node <path it printed> helpThe examples below shorten that to nsx.
Examples
nsx helpLists every command.
nsx reports search agingSearches the cached report list for "aging". No NetSuite call.
nsx fields transaction --grep amountLists the cached fields of transaction that match "amount".
nsx results agg r_7f3a2c --by entity --sum amount --top 20Groups a saved result by entity, sums amount, and shows the top 20.
nsx results head r_7f3a2c 10 --sort amountShows the first 10 rows of a saved result, largest amount first.
nsx results export r_7f3a2c --xlsxExports 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 exportWrites 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:
| Command | What it does |
|---|---|
nsx doctor | The same checks as /su-ns-harness:doctor, without the connector call. --preflight stops after Node, the cache key and the data dir |
nsx cache status | Every cache section with its count, status (including stale), age, TTL and source tool |
nsx periods --open | Open accounting months, earliest first (six by default, --max N for more) |
nsx results list | Saved 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 amount | A pivot table from a saved result |
nsx results diff <idA> <idB> --on account --cols amount | Compares 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 show | Current settings and where each value came from |
nsx audit tail | The 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.
/plugin marketplace add suiteutils/suiteutils-netsuite-claude-harness/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.