Skip to content
Ryan Rousseau edited this page Jun 29, 2014 · 1 revision

The scriptcs.opts file can store config settings that you would like to be used on each execution of your script.

File format

The settings are stored in JSON format.

{
    Modules: "module1,module2",
    Output: "output.txt",
    Cache: "True",
    LogLevel: "debug"
}

The -config flag

While "scriptcs.opts" is the default file name, this can be configured by using the -config flag when executing a script.

scriptcs script.csx -config scritpcs.config

Overriding opt file settings

You can override settings in the file with the corresponding command line flags. For example, if you are using the opts file above, you can change the log level by using the -loglevel flag.

scriptcs script.csx -loglevel info

Future improvements

PR #773 will add the ability to store settings in a global opts file that will be executed on each run without needing a local opts file.