data
Netsuite CLI for AI Agents
Use the Netsuite CLI from KosmoKrator to call Netsuite tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Netsuite CLI Setup
Netsuite can be configured headlessly with `kosmokrator integrations:configure netsuite`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure netsuite --set access_token="$NETSUITE_ACCESS_TOKEN" --set url="$NETSUITE_URL" --enable --read allow --write ask --json
kosmokrator integrations:doctor netsuite --json
kosmokrator integrations:status --json Credentials
Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | NETSUITE_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | NETSUITE_URL | URL url | yes | REST API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call netsuite.netsuite_list_customers '{"limit":1,"offset":1}' --json kosmo integrations:netsuite netsuite_list_customers '{"limit":1,"offset":1}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs netsuite --json
kosmo integrations:docs netsuite.netsuite_list_customers --json
kosmo integrations:schema netsuite.netsuite_list_customers --json
kosmo integrations:search "Netsuite" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
netsuite.netsuite_list_customers
List customers from NetSuite ERP. Returns customer records with names, IDs, and basic details. Use limit and offset for pagination.
read - Parameters
- limit, offset
kosmo integrations:call netsuite.netsuite_list_customers '{"limit":1,"offset":1}' --json kosmo integrations:netsuite netsuite_list_customers '{"limit":1,"offset":1}' --json netsuite.netsuite_get_customer
Get detailed information for a single NetSuite customer by internal ID. Returns full customer record including contact details, addresses, and financial information.
read - Parameters
- id
kosmo integrations:call netsuite.netsuite_get_customer '{"id":"example_id"}' --json kosmo integrations:netsuite netsuite_get_customer '{"id":"example_id"}' --json netsuite.netsuite_create_customer
Create a new customer in NetSuite ERP. Provide at minimum the company name or first/last name. Additional fields like email, phone, subsidiary, and address can be included.
write - Parameters
- companyname, firstname, lastname, email, phone, subsidiary, entitystatus, currency, terms, addressbook
kosmo integrations:call netsuite.netsuite_create_customer '{"companyname":"example_companyname","firstname":"example_firstname","lastname":"example_lastname","email":"example_email","phone":"example_phone","subsidiary":"example_subsidiary","entitystatus":"example_entitystatus","currency":"example_currency"}' --json kosmo integrations:netsuite netsuite_create_customer '{"companyname":"example_companyname","firstname":"example_firstname","lastname":"example_lastname","email":"example_email","phone":"example_phone","subsidiary":"example_subsidiary","entitystatus":"example_entitystatus","currency":"example_currency"}' --json netsuite.netsuite_list_invoices
List invoices from NetSuite ERP. Returns invoice records with amounts, statuses, customer references, and dates. Use limit and offset for pagination.
read - Parameters
- limit, offset
kosmo integrations:call netsuite.netsuite_list_invoices '{"limit":1,"offset":1}' --json kosmo integrations:netsuite netsuite_list_invoices '{"limit":1,"offset":1}' --json netsuite.netsuite_list_sales_orders
List sales orders from NetSuite ERP. Returns sales order records with order details, line items, customer references, and statuses. Use limit and offset for pagination.
read - Parameters
- limit, offset
kosmo integrations:call netsuite.netsuite_list_sales_orders '{"limit":1,"offset":1}' --json kosmo integrations:netsuite netsuite_list_sales_orders '{"limit":1,"offset":1}' --json netsuite.netsuite_list_items
List items (products and services) from NetSuite ERP. Returns item records with names, IDs, types, and pricing. Use limit and offset for pagination.
read - Parameters
- limit, offset
kosmo integrations:call netsuite.netsuite_list_items '{"limit":1,"offset":1}' --json kosmo integrations:netsuite netsuite_list_items '{"limit":1,"offset":1}' --json netsuite.netsuite_get_current_user
Get the profile of the currently authenticated NetSuite user. Returns user details like name, email, role, and subsidiary.
read - Parameters
- none
kosmo integrations:call netsuite.netsuite_get_current_user '{}' --json kosmo integrations:netsuite netsuite_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
netsuite.netsuite_list_customers 2 parameters
kosmo integrations:schema netsuite.netsuite_list_customers --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of customers to return (default: 50, max: 1000). |
offset | integer | no | Zero-based offset for pagination. |
netsuite.netsuite_get_customer 1 parameters
kosmo integrations:schema netsuite.netsuite_get_customer --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The internal ID of the customer in NetSuite. |
netsuite.netsuite_create_customer 10 parameters
kosmo integrations:schema netsuite.netsuite_create_customer --json | Parameter | Type | Required | Description |
|---|---|---|---|
companyname | string | no | Company name for the customer (required for company customers). |
firstname | string | no | First name (required for individual customers). |
lastname | string | no | Last name (required for individual customers). |
email | string | no | Primary email address. |
phone | string | no | Primary phone number. |
subsidiary | string | no | Subsidiary internal ID or ref (required for OneWorld accounts). |
entitystatus | string | no | Customer status (e.g., "CUSTOMER-Closed", "CUSTOMER-Lost"). |
currency | string | no | Currency internal ID or ref (e.g., "1" for USD). |
terms | string | no | Payment terms internal ID or ref. |
addressbook | array | no | Array of address objects with addr1, city, state, zip, country fields. |
netsuite.netsuite_list_invoices 2 parameters
kosmo integrations:schema netsuite.netsuite_list_invoices --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of invoices to return (default: 50, max: 1000). |
offset | integer | no | Zero-based offset for pagination. |
netsuite.netsuite_list_sales_orders 2 parameters
kosmo integrations:schema netsuite.netsuite_list_sales_orders --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of sales orders to return (default: 50, max: 1000). |
offset | integer | no | Zero-based offset for pagination. |
netsuite.netsuite_list_items 2 parameters
kosmo integrations:schema netsuite.netsuite_list_items --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of items to return (default: 50, max: 1000). |
offset | integer | no | Zero-based offset for pagination. |
netsuite.netsuite_get_current_user 0 parameters
kosmo integrations:schema netsuite.netsuite_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.