Query ServiceNow records from the command line — jsn

Query any ServiceNow table with encoded queries, limits, counts, and JSON output using the JSN CLI.

How do I query ServiceNow records from a terminal? Query any ServiceNow table with encoded queries, limits, counts, and JSON output using the JSN CLI. JSN gives you a direct terminal workflow instead of requiring the ServiceNow web interface for every inspection or change.
CommandWhat it does
jsn records list --table incident --limit 4Query any table with styled output
jsn records list --table incident --query "priority=1" --jsonEncoded queries, JSON for pipes
jsn records list
jsn records list --table incident --limit 4

4 incident(s)


number          short_description                                 priority        state       assigned_to      
--------------  ------------------------------------------------  --------------  ----------  ---------------  
INC0000014      Missing my home directory test-1                  1 - Critical    Closed      Bud Richman      
INC0000601      The USB port on my PC stopped working             5 - Planning    Closed                       
INC0009004      Defect tracking tool is down.                     3 - Moderate    Closed                       
INC0000005      CPU load high for over 10 minutes                 1 - Critical    Closed      Bud Richman      

  → create: jsn inc create --description "..." — Create a new incidents
  → filter: jsn inc list --query "priority=1" — Filter: critical only
  → next: jsn inc list --limit 4 --offset 4 — Next page (offset 4)

Get started

Install, point it at your instance, then run this feature.

npm install -g @jacebenson/jsn
jsn setup
jsn records list --table incident --limit 4
Full setup guide & skill docs →

← All features