Search ServiceNow application code from the CLI — jsn

Search ServiceNow scripts, script includes, business rules, and other application code from the terminal.

How do I search ServiceNow application code from the command line? Search ServiceNow scripts, script includes, business rules, and other application code from the terminal. JSN gives you a direct terminal workflow instead of requiring the ServiceNow web interface for every inspection or change.
CommandWhat it does
jsn codesearch search GlideAjax --limit 5Search script and client-side artifacts
jsn codesearch search approval --scope x_my_app --limit 5Restrict a search to an application scope
jsn codesearch search
jsn codesearch search GlideAjax --limit 5 --json

5 code match(es) for "GlideAjax"

sys_ui_page  $pwd_change  .client_script
    var ga = new GlideAjax('PwdAjaxChangePassword');
sys_ui_page  $pwd_enrollment_form_container  .client_script
    function sendRequest() {
▼ next screen
jsn codesearch search approval --scope x_my_app --limit 5 --json

10 code match(es) for "approval"

sys_ui_page  approval_engines  .name
    approval_engines
sys_ui_page  approval_engines  .client_script
    var hasEngine = false;

Get started

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

npm install -g @jacebenson/jsn
jsn setup
jsn codesearch search GlideAjax --limit 5
Full setup guide & skill docs →

← All features