If you need to use CommandBox behind a corporate proxy, these settings will be necessary for it to successfully connect to the Internet.
proxy.server
string
This is the URL of the proxy server on your network.
config set proxy.server=myProxy.com
config show proxy.server
proxy.port
integer
This is the port to connect to on the proxy server.
proxy.user
string
This is the username to connect to the proxy server with, if required.
proxy.password
string
This is the password to connect to the proxy server with, if required.
Server Settings
These settings control how servers start in CommandBox.
server.defaults
struct
This struct can contain any . These settings are used as global default settings if there is not a corresponding setting provided by the user via a parameter to the start command or in the server's server.json
Module Settings
These settings affect how CommandBox loads modules.
ModulesExternalLocation
array
You can store CommandBox modules outside of the default installation directory. This may be useful to point to modules you are developing or to keep custom modules around even if CommandBox gets uninstalled.
config set server.defaults.web.rewrites.enable=true
config set server.defaults.openbrowser=false
config set server.defaults.jvm.heapsize=1024
config show server.defaults
modulesInclude
array
An array of module names to load. Be careful of using this setting as once you set it, no other modules will be loaded which includes all of CommandBox's core modules.
ModulesExclude
array
An array of module names NOT to load. This can be useful when you have an installed module that's erroring on load and preventing CommandBox from starting up.
modules.*
struct
When you install a CommandBox module, it may contain settings that affect how it works. Don't edit the CFML code in the module, instead use the config set command to create config settings that will override the module's defaults. The pattern is modules.moduleName.settingName.
When a module is loaded, the config settings (that exist) for that module are loaded as well. Any time you set a new module setting, that setting will be loaded into memory immediately for that module.
You can easily see what settings are set for our TestModule like so:
config set proxy.user=proxyUser
config show proxy.user
config set proxy.password=proxyPass
config show proxy.password
config set ModulesExternalLocation=[\"/var/my/external/modules\"]
config show ModulesExternalLocation
config set modulesInclude=[\"moduleName\",\"anotherModuleName\"]
config show modulesInclude
config set ModulesExclude=[\"moduleName\",\"anotherModuleName\"]
config show ModulesExclude
config set modules.TestModule.mySetting=overridden
config set modules.TestModule.somethingEnabled=false
config show modules.TestModule
Endpoint Settings
These settings are used to configure CommandBox's endpoints.
endpoints.forgebox.APIToken
string
The API Token provided to you when you signed up for ForgeBox.io. This will be set for you automatically when you use the forgebox register or forgebox login commands. This token will be sent to ForgeBox to authenticate you. Please do not share this secret token with others as it will give them permission to edit your packages!
endpoints.forgebox.APIURL
string
This is the URL of the ForgeBox REST API. Remove this setting to use the default. If you wish to test submitting package in an environment other than production, you may point to our staging server. Note, this will funnel ALL ForgeBox calls to the staging server where your APIToken may be different.
Misc Settings
These are some one-off settings that doen't really belong anywhere else.
nativeShell
string
This setting affects how CommandBox invokes the shell for the run command or when using the !binary shortcut. The default *nix shell used for the run command is /bin/sh but you can override it to use a custom shell. Set the full path to the shell binary.
tagVersion
boolean
Running the bump command from a Git repo will attempt to tag the repo unless you provide the tagVersion parameter. This setting provides a global default to prevent CommandBox from trying to tag Git repos.
tagPrefix
string
Running the bump command from a Git repo will tag the repo using the format v{version} such as v1.0.0 or v4.3.6. You can remove the v or swap it for another prefix using the tagPrefix parameter. Remember, another string like foo1.2.3 will not be parseable by CommandBox as a valid semver. This setting can be overriden by the tagPrefix parameter to the bump command.
artifactsDirectory
string
You can control where your artifact cache is stored with the artifactsDirectory config setting. This can be useful to keep your primary drive from filling up, or to point your files to a shared network drive that your coworkers can share.
config set endpoints.forgebox.APIToken=my-very-long-secret-key
config show endpoints.forgebox.APIToken
config set endpoints.forgebox.APIURL=https://forgebox.stg.ortussolutions.com/api/v1
config show endpoints.forgebox.APIURL
config set nativeShell=/bin/zsh
config show nativeShell
config set tagVersion=false
config show tagVersion
config set tagPrefix=''
config show tagPrefix
config set artifactsDirectory=/path/to/artifacts
config show artifactsDirectory
Config Settings
CommandBox has a global configuration file that stores user settings. It is located in ~/.CommandBox/CommandBox.json and can be used to customize core CommandBox behaviors as well as overriding module settings. Config settings are managed by the config set, config show, and config clear commands.
Set Config Settings
config set name=mySetting
Nested attributes may be set by specifying dot-delimited names or using array notation. If the set value is JSON, it will be stored as a complex value in the commandbox.json.
Set module setting
Set item in an array
Set multiple params at once
Override a complex value as JSON
Structs and arrays can be appended to using the "append" parameter. Add an additional settings to the existing list. This only works if the property and incoming value are both of the same complex type.
Show Config Settings
Output a setting:
Nested attributes may be accessed by specifying dot-delimited names or using array notation. If the accessed property is a complex value, the JSON representation will be displayed
Clear Config Setting
To Remove a setting out of the CommandBox.json use the config clear command. Nested attributes may be set by specifying dot-delimited names or using array notation.
config set modules.myModule.mySetting=foo
config set myArraySetting[1]="value"
config set setting1=value1 setting2=value2 setting3=value3