Skip to content

SASjs CLI Documentation

The SASjs Command-Line-Interface is a swiss-army knife with a flexible set of options and utilities for Dev Ops on SAS Viya, SAS 9 EBI, and SASjs Server

Core functionalities:

  • Creation of a SAS GIT repository in an 'opinionated' way.
  • Compilation each service, including all the dependent macros / macro variables and pre / post code.
  • Build - creation of the master SAS deployment, including build macros, macro variables, and pre/post code.
  • Deployment - execute an array of local scripts and remote SAS programs to create your app on the SAS Server.
  • Test - create unit test for macros, jobs & services, check your test coverage, generate test reports
  • Documentation - generate a doxygen site with data lineage, homepage, and project logo, all from the sasjsconfig.json file

There is also a feature to let you deploy your frontend as a streaming app, bypassing the need to access the SAS Web Server.


Command Description
add Provides a series of prompts used to define a SAS target along with the relevant connection details (if SAS Viya)
auth Provides the prompts for authentication against a SAS target (SAS 9 or Viya)
build takes all of the input jobs and services and creates a build pack
cbd A shortcut to compile, build and deploy your project with one command!
compile Extracts all the dependencies and input programs for each service / job and includes them in a single file ready for deployment
context List, export, create, edit, and delete SAS Compute contexts
create Initialise a SASjs repository, either in plain form or using a range of templates
deploy Perform the actual deployment of a SASjs project to a SAS Server location
doc Generate HTML documentation based on the Doxygen headers used in the SAS Macros, Programs, Jobs & Services.
flow SAS job scheduler that takes a JSON file as input, and submit all the jobs sequentially, logging the results to an output CSV file
folder Management of logical Viya folders
job Manage & Execute SAS Jobs
lint Lint your SAS code and identify commmon problems / undesirable coding practices
request Execute SASjs web services from the commandline
run Run arbitrary SAS code directly from the terminal (or commandline session)
servicepack The SASjs Service Pack is a collection of services and folder objects. The servicepack command lets you deploy them easily
snippets Generate a snippets file for autocompletion of your SAS Macros in VS Code
test Execute SAS unit tests and collect results in json/csv formats together with logs