A command-line interface for ServiceNow. Type jsn and start working — no web UI needed.
Works standalone or with AI agents (Claude Code, OpenCode, Hermes, Cursor, Copilot).
npm install -g @jacebenson/jsnNode.js 18+. macOS, Linux, Windows.
The install also copies an AI agent skill file to ~/.agents/skills/servicenow/SKILL.md.
jsn setup # Interactive first-time setup
jsn auth login https://dev12345.service-now.com
jsn incidents list --query "priority=1" # Critical incidentsjsn talks to the ServiceNow REST API. Read, create, update, delete — tickets, users, groups, records on any table. Inspect flows and business rules. Export update sets. Run background scripts.
Everything outputs JSON when piped, styled tables in a terminal.
# Core ticket work
jsn incidents list --query "active=true^priority=1"
jsn incidents INC0010001
jsn incidents create --description "Server down" --priority 1
# Admin tasks
jsn flows list # Interactive picker with pagination
jsn flows show "Assign Task" # Full flow detail
jsn rules list --query "collection=incident"
jsn updatesets set "My Feature"
# Generic table access
jsn records list --table incident --limit 50 --json | jq '.[].number'
jsn records create --table incident --data '{"short_description":"test"}'
# Script execution
jsn eval "gs.info('Hello World')"Run jsn for the full grouped list. Commands are organized by ServiceNow domain:
Core — incidents, changes, requests, tasks, tickets
Automation — flows, actions, rules, scrapi, updatesets, eval, rest
Access — acls, roles, scopes, properties, privileges
User Experience — forms, lists, clientscripts, uipolicies, uiactions
Data — records, tables, columns, includes, import, logs, users, groups
Every command supports --json, --query, and --help.
Switch between instances without re-authenticating.
jsn auth login https://dev12345.service-now.com
jsn profiles list
jsn profiles use dev12345
jsn profiles show| Flag | When to use |
|---|---|
| (default) | Terminal — styled tables |
--json |
Pipelines, scripts |
--markdown |
Documentation |
--quiet / -q |
Data only, no envelope |
OAuth 2.0 with PKCE. Credentials in ~/.config/servicenow/credentials/.
jsn auth login https://dev12345.service-now.comFor CI/CD, set environment variables:
export SERVICENOW_INSTANCE_URL="https://dev12345.service-now.com"
export SERVICENOW_OAUTH_TOKEN="***"
jsn incidents listjsn ships with a skill file that tells AI agents how to use it. Installed automatically to ~/.agents/skills/servicenow/SKILL.md.
jsn skill show # View the skill
jsn skill install # Install to Hermes
jsn skill install --target all # All supported agentsgit clone https://github.com/jacebenson/jsn.git
cd jsn
npm install
npm testReleases: npm run release -- patch (or minor, major). Tags, pushes, and publishes to npm via GitHub Actions.
MIT