Command-Line Tool Options and Arguments
Each action requires the argument specifying the path to the main Mosel file that contains the model directive or the Python source code that defines the Insight app class. For Python projects, the main file is python_source/application.py. Other possibilities may be added in future.
build action
The build action creates an app .zip file suitable for uploading to Insight. This is created in the project root folder, overwriting any previous .zip file. By default, the code is compiled for production deployment with debugging disabled.
The syntax of the build action is as follows:
xpwinsightcmd build [--base path/to/project] [-g | -G] path/to/main/file
- --base dir: (optional) the project root directory, defaults to working directory (see above).
- path/to/main/file: (required) the main file (see above).
- -g or -G: the debugging level flag to pass to the Mosel compiler.
publish action
The publish action will create or update an app on the Insight server. By default, Mosel code is compiled for debugging rather than production use by passing the -G option to the compiler; you can use the --prod option to override this default.
By default, the action assumes the target Insight is version 5 or later and will acquire credentials from the OS as described in Equipping Workbench with Credentials to Publish. If the Insight server is version 4.x, then this must be specified using the --insight-4
option, and the credentials passed in the command line.
xpwinsightcmd publish [--base path/to/project] path/to/main/file --to URL
[--app-name app-name] [--app-id app-id] [--create-if-missing] [--full]
[--prod] [--exec-env name] [--insight-4 --user userid --pw pw]
- --base dir
- (Optional) The project root directory, defaults to working directory (see above).
- path/to/main/file
- (Required) The main file (see above).
- --to URL
- (Required) The root URL of the Insight server.
- --app-name name
- (Optional) The name of the app to create or update (see --create-if-missing).
- --app-id id
- (Optional) The UUID of the app to update.
- --create-if-missing
- (Optional) When used with --app-name, updates any existing app of that name; otherwise creates a new app.
- --full
- (Optional) Perform a full rather than partial publish.
- --prod
-
(Optional) Publishes for production use rather than debugging. This option overrides the
-G option that is passed to the compiler by default.
Note: A partial publish might skip compiling some files. If you have built previously using different debug levels, use the --full option along with --prod to make sure all published content has the same debug level.
- --exec-env name
- (Optional, Insight 5.8 and later only) Update the name of the app's execution environment.
- --insight-4 --user user --pw pw
- (Optional) Specify Insight version as 4.x and supply user ID and password.
Specifying an existing app (if any)
If only the required arguments are used, a new app will be created each publish. To specify an existing app, the simplest method is to use the --app-name
option. If this is combined with the --create-if-missing
option, then the app will be created if it does not already exist. The two options can be used together so the first publish will create the app, and subsequent ones will update it in-place.
![]() |
Note: If the name of the app as specified by the model source or companion file does not match the supplied name, then upon publish the name of the app on the server will be updated to match it. This means subsequent publishes will then be able to find the app by name.
|
Alternatively, the user can also identify the app to update by app id. The app id is immutable and provides a stable reference when the name may have changed (for instance via Insight's auto-rename to avoid a name collision).
console.log(JSON.parse(atob(location.hash.substring(1))).project)
This will print out the app id.
Full vs partial publish
By default, xpwinsightcmd will behave like the Workbench UI and use its last known publish timestamp to determine what to compile and what to include in the publish payload. If you specify the --full
option, then everything will be recompiled, and all resources will be re-published.
Insight Execution Environment
This can be specified via the --exec-env
argument. See Configuring the Execution Environment for details about Insight Execution Environments.
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.