Script Editor Appearance
Wherever you type a PowerShell script in Athena — the Execute Command screen, Command Templates, a Compliance Rule's detection or remediation script, or a Scan Definition — you're using the same built-in code editor. Its look and feel is configurable server-wide: the colour theme, font size, tab size, word wrap, line numbers, and the minimap, plus an optional custom theme that lets you pick your own editor and syntax-highlight colours. This page explains each option, its default, and how to set it.
The editor appearance is a server configuration value, not a per-user preference and not a
toggle on the Settings screen. You change it in the MonacoEditor section of
appsettings.json (or the matching environment variables) and restart the server.
The setting applies to every operator who signs in. See
Configuration for how the config file and environment
variables work.
Where the editor appears#
The same code editor is embedded in every place you author a script, so one appearance setting covers all of them:
- Execute Command — the ad-hoc script box you use to run PowerShell against one or more agents. See Remote Command Execution.
- Command Templates — the saved-script editor. See Command Templates.
- Compliance Rules — the detection and remediation script boxes. See Compliance & Baselines.
- Scan Definitions — the custom scan script editor under the agent scan settings. See Scans.
Each place loads the same editor appearance settings when it opens, so changing them once updates the editor everywhere at the next sign-in.
Editor options#
These six values control the core look and behaviour of the editor. All of them live directly
under the MonacoEditor section.
| Setting | Default | Choices | What it does |
|---|---|---|---|
Theme |
vs |
vs (light), vs-dark (dark), hc-black (high-contrast) |
The built-in colour scheme for the editor. Ignored when a custom theme is enabled, which takes over instead. |
FontSize |
14 |
Whole number of pixels | Size of the code font in the editor. |
TabSize |
4 |
Whole number of spaces | How many spaces a tab is worth for indentation. |
WordWrap |
true |
true / false |
When on, long lines wrap to fit the editor width instead of scrolling horizontally. |
LineNumbers |
true |
true / false |
Show or hide the line-number gutter down the left side. |
Minimap |
false |
true / false |
Show the miniature scrollable overview of the whole script on the right edge. |
Out of the box, Athena ships with a custom theme enabled
(athena-light, based on the light vs theme). Because the custom
theme is on, it — not the plain Theme value — is what you see until you either
edit the custom theme or turn it off.
Custom theme#
For full control over colours, enable a custom theme under
MonacoEditor:CustomTheme. A custom theme inherits from one of the built-in
themes and then overrides individual editor colours and syntax-highlight (token) colours. When
it is enabled, it replaces the plain Theme value entirely.
| Setting | Default | What it does |
|---|---|---|
CustomTheme:Enabled |
false (in code) — shipped as true |
Turns the custom theme on. When off, the plain Theme value is used. |
CustomTheme:Name |
athena-custom |
An internal name for your theme. Any short identifier works. |
CustomTheme:Base |
vs-dark |
The built-in theme to inherit from — vs, vs-dark, or
hc-black. Colours you don't override fall back to this base. |
CustomTheme:Colors |
— | A map of editor UI colour keys to hex values (for example the editor background, foreground, cursor, and line-number colours). Any key you omit keeps the base theme's value. |
CustomTheme:TokenColors |
see below | The syntax-highlight colours applied to script tokens such as comments, keywords, and strings. |
Syntax-highlight (token) colours#
Under CustomTheme:TokenColors you set the colour for each category of PowerShell
syntax. Values are hex colours (with or without a leading #). These eight
categories are what you can tune:
| Token | Default | Applies to |
|---|---|---|
Comment | #6c7086 | Comments. |
Keyword | #cba6f7 | Language keywords such as if, foreach, and function. |
String | #a6e3a1 | Quoted strings. |
Number | #fab387 | Numeric literals. |
Function | #89b4fa | Function and cmdlet names (for example Get-Process, Write-Host). |
Variable | #f5c2e7 | Variables such as $_, $env:, and $var. |
Operator | #89dceb | Operators and delimiters such as brackets and braces. |
Type | #f9e2af | Type names and attributes. |
Each token colour is applied across the related PowerShell syntax variants automatically, so you only set eight values to re-colour the whole editor.
Setting it in appsettings.json#
Add or edit the MonacoEditor section in appsettings.json. The example
below turns off the custom theme and uses the built-in dark theme with a larger font, a visible
minimap, and no word wrap:
"MonacoEditor": {
"Theme": "vs-dark",
"FontSize": 16,
"TabSize": 4,
"WordWrap": false,
"LineNumbers": true,
"Minimap": true,
"CustomTheme": {
"Enabled": false
}
}
This next example keeps a custom theme, inheriting from the dark base and giving it your own editor and syntax colours:
"MonacoEditor": {
"Theme": "vs-dark",
"FontSize": 14,
"WordWrap": true,
"LineNumbers": true,
"Minimap": false,
"CustomTheme": {
"Enabled": true,
"Name": "athena-dark",
"Base": "vs-dark",
"Colors": {
"editor.background": "#0b0f18",
"editor.foreground": "#e6edf5",
"editorLineNumber.foreground": "#6e7681"
},
"TokenColors": {
"comment": "#6c7086",
"keyword": "#cba6f7",
"string": "#a6e3a1",
"number": "#fab387",
"function": "#89b4fa",
"variable": "#f5c2e7",
"operator": "#89dceb",
"type": "#f9e2af"
}
}
}
Restart the server for the change to take effect, then reload the console. Operators pick up the new appearance the next time they open a script editor.
Setting it with environment variables#
Like the rest of the server configuration, these values can be supplied as environment variables
instead of editing the file. Join the section and key names with a double underscore
(__) — handy for Docker or Compose deployments. See
Configuration for how overrides are layered.
# Simple options
MonacoEditor__Theme=vs-dark
MonacoEditor__FontSize=16
MonacoEditor__WordWrap=false
MonacoEditor__Minimap=true
# Custom theme on/off and its token colours
MonacoEditor__CustomTheme__Enabled=true
MonacoEditor__CustomTheme__Base=vs-dark
MonacoEditor__CustomTheme__TokenColors__Keyword=#cba6f7
MonacoEditor__CustomTheme__TokenColors__String=#a6e3a1
These settings change how scripts look while you edit them — they do not change how scripts run, what they can do, or who is allowed to run them. Execution permissions and behaviour are governed by Roles & Permissions and the command execution pipeline.
Related#
- Remote Command Execution — the Execute Command screen where you'll spend the most time in the editor.
- Command Templates — save and reuse scripts written in the same editor.
- Compliance & Baselines — detection and remediation scripts authored in the editor.
- Scans — custom scan definitions authored in the editor.
- Configuration — how
appsettings.jsonand environment-variable overrides work. - General Settings — other console-wide display preferences.