Skip to content
cloudcellPublic

About

VS Code extension for OM Core — open-source multidimensional modeling with cubes, rules, interactive grids, and financial models.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

207 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OM Core

OM Core for VS Code

A grid GUI for OM Core, a multidimensional modeling engine (dimensions, cubes, rules, views), inside VS Code.

Preview. This is an early version. Only the core workflow works: open a model, browse it, edit values and see the results recalculate, save. Everything else is visible but disabled (see Not available in this preview).

The engine is bundled inside the extension (a WebAssembly build of the OM Core engine): there is nothing to install or start yourself. An external om-core (Python) runtime can still be used instead — see Using an external runtime.

Requirements

  • VS Code 1.80 or newer

Nothing else. Git and uv are needed only for Using an external runtime.

Install

Download om-tools-<version>.vsix from the Releases page, then in VS Code: Extensions panel → … menu (top right of the panel) → Install from VSIX… → choose the file.

Or from a terminal, in the folder with the downloaded file:

code --install-extension om-tools-<version>.vsix

(On macOS, code works in a terminal only after Shell Command: Install 'code' command in PATH in the VS Code command palette.)

Check that everything is ready

Click the OM Core icon in the activity bar (the left edge of the window). The side panel shows the state; before the first start it looks like this:

Row Should show
Runtime Not running · wasm://embedded
GUI Not open

A row that is not green says what is wrong; hover over it for details. See also Troubleshooting.

Quick start: a five-year financial model

The example models live in the examples folder of an om-core checkout (see Using an external runtime for how to get one — the checkout is only needed for its example files here). This one is a five-year model of a fictional company (NZ Gadgets & Widgets), with views for drivers, profit and loss, balance sheet, cash flow and valuation. The statements are calculated by rules from the drivers, so changing a driver changes the results.

The menus and panels in the steps below (File, Model Browser, Calculation Flow) are inside the OM Core tab, not the menus of VS Code itself.

  1. In the OM Core side panel, press Open GUI: the bundled engine starts by itself, the OM Core tab opens, and the Runtime row shows Running · wasm://embedded.
  2. In the File menu at the top of the OM Core tab, choose Open… and pick examples/DEMO-03--CALC-FLOW-20260623-0057-5Y-ONLY.json inside the om-core folder. (Or build a model in the GUI instead: Model → New Dimension, then a cube and a view.)
  3. In the Model Browser on the left of the tab, open Views → Drivers. These are the assumptions by year: prices, volumes, cost percentages and so on. PriceGadgets is 120 in every year.
  4. Open Views → PnL. For 2028, RevenueGadgets is 624000 and NetIncome is 158112.
  5. Go back to Drivers, double-click PriceGadgets for 2028, type 130, press Enter. In PnL, 2028 RevenueGadgets becomes 676000 and NetIncome becomes 164851.2. The other years do not change, because each year has its own price.
  6. Ctrl+Z undoes the change, Ctrl+Y (or Ctrl+Shift+Z) redoes it.
  7. Select a cell, for example NetIncome in PnL, and open the Calculation Flow tab in the bottom panel of the tab to see which cells it is calculated from.
  8. File → Save… (the tab's menu) saves the model as a .json file. File → Open… loads it again.

The other files in examples open the same way. Some of them use features this preview does not support yet, for example formatting.

When you are done, press Stop Runtime in the side panel. Closing VS Code also stops the engine that the extension started. Either way, changes that were not saved with File → Save… are lost.

The OM Core side panel

The rows at the top show the state; hover over a row for details. Some rows have a button that appears when you hover over the row (for example Start or Stop on Runtime, Open GUI or Reconnect on GUI, Manage Workspace Trust in Restricted Mode); the same actions, and more (choose or show the om-core folder), are in the row's right-click menu. The panel header has a refresh button and, in its … menu, Reconnect.

Below the rows, the Actions section has:

  • Start Runtime, which becomes Stop Runtime while the engine OM Tools started is running.
  • Open GUI, which becomes Close GUI while the tab is open.
  • Settings, which opens the OM Core settings.

The runtime and GUI buttons are independent. In embedded mode Open GUI opens the tab and starts the bundled engine automatically; in socket mode it only connects to an engine that is already running (it never starts one — without an engine the tab says disconnected and what to do). Closing the GUI does not stop the engine. Stopping the engine does not close the tab: it shows disconnected and connects by itself when you press Start Runtime again, with a new, empty model. An engine that was started outside OM Tools (a terminal, the om-core Qt GUI) has no Stop button: OM Tools cannot stop it.

Using an external runtime

By default the extension runs the bundled WebAssembly engine. To use the Python om-core runtime instead — for example for .openm scripts, or to share a runtime with the om-core Qt GUI — set omCore.engineMode to socket (or set omCore.runtimeEndpoint), and point the extension at an om-core checkout:

git clone https://github.com/cloudcell/om-core.git
cd om-core
git checkout 72a90ca   # the om-core version this extension was tested with; newer may work
uv sync                # do not skip: without it the first start is slower than the 20 s wait

Then set "omCore.omCorePath": "path/to/om-core" (or pick the folder with OM Core: Choose om-core Folder…). The side panel grows three more rows — Engine path, Dependencies, uv — each green when ready.

External-runtime mode needs:

  • Git

  • uv, which manages Python for om-core. It downloads the Python version om-core needs (3.12 or newer), so you do not need to install Python yourself.

    Windows (PowerShell): powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex". macOS / Linux: curl -LsSf https://astral.sh/uv/install.sh | sh. After installing uv, close all VS Code windows and start VS Code again — Reload Window is not enough to pick up the new PATH.

  • Restricted Mode: starting the Python runtime runs code from the checkout, so OM Tools will not start it in an untrusted workspace. The bundled embedded engine still works.

Commands

All of these are in the command palette (Ctrl+Shift+P).

Command What it does
OM Core: Start Runtime Starts the engine (bundled embedded engine, or uv running om-core from omCore.omCorePath in socket mode). Does not open the GUI; a GUI tab that is already open connects to it.
OM Core: Stop Runtime Stops the engine that the extension started, with everything it started. The model in it is lost unless it was saved.
OM Core: Open GUI Opens the grid GUI in an editor tab and connects it to the engine. In embedded mode the engine starts by itself; in socket mode it must already be running.
OM Core: Close GUI Closes the GUI tab. The engine keeps running and keeps the model.
OM Core: Reconnect to Runtime Reconnects the GUI to a running engine if it shows disconnected.
OM Core: Refresh Status Re-checks the state shown in the side panel (it also updates by itself).
OM Core: Choose om-core Folder… Picks the om-core folder and saves it to omCore.omCorePath in User settings.
OM Core: Open Settings Opens the OM Core settings.
OM Core: Reveal om-core Folder in File Explorer Shows the om-core folder in your file manager.
OM Core: MCP Server Info Shows the MCP server URL and copies a mcp.json registration snippet for external clients.

Settings

Setting Default Meaning
omCore.engineMode auto Which engine the GUI and MCP use: auto (embedded unless a runtime endpoint is configured), embedded (bundled WebAssembly engine), socket (an external om-core runtime).
omCore.enginePreload false Spawn the embedded engine when VS Code starts instead of on first use.
omCore.omCorePath empty Folder of the om-core clone (the one with main.py). Socket mode only; when empty, Start Runtime asks for the folder once.
omCore.runtimeEndpoint empty Address of the engine, e.g. tcp://127.0.0.1:17391. Socket mode only; empty means the default: local TCP port 17391 on Windows, the socket /tmp/openm-<user>.sock on macOS and Linux. Setting this makes auto resolve to socket mode.
omCore.showSystemElements false Show system elements (names starting with %) in the Model Browser, tabs and selectors.
omCore.mcp.enabled true Run an MCP server that lets AI agents query and edit the connected workspace (see below).
omCore.mcp.port 0 Port for the MCP server. 0 picks a free port automatically — recommended. Set a fixed port only if a client needs a stable URL.

MCP server (AI agents)

When omCore.mcp.enabled is on (the default), the extension serves an MCP server over Streamable HTTP at http://127.0.0.1:<port>/mcp. An AI agent connected to it shares the live workspace with the GUI: anything it changes appears in your open views, and anything you do is visible to it.

Two tools:

  • om_query({query_id, params}) — any om-core query (dimension_list, view_list, cell_range, selection_stats, rule_target_resolve, …).
  • om_command({command_id, params}) — any om-core command (create_dimension, set_cell_hardvalue_by_addr, set_rule, run_recalculation, undo, …). The tool description lists required-parameter gotchas.

On VS Code ≥ 1.102 the extension registers the server automatically — Copilot agent mode sees the om_query/om_command tools after the one-time consent prompt. On older versions or other clients, run OM Core: MCP Server Info to copy the URL or a .vscode/mcp.json snippet:

{ "servers": { "om-core": { "type": "http", "url": "http://127.0.0.1:<port>/mcp" } } }

The server binds localhost only, on an ephemeral port by default, and answers only POST /mcp — the same local-only/no-auth exposure class as the runtime's own socket. While no runtime is connected, the tools return a "not connected" error rather than failing calls. omCore.mcp.enabled: false closes the listener.

Not available in this preview

These items are visible but disabled, with the hint "Not available in this preview version":

  • Edit: Paste as New Cube, Convert Selection to Dimension Labels, Assign Item Labels from Selection, Delete Selected Dimension Items
  • Model: Add Group to Row/Col Dim; Add Group, Move Selection To Group, Ungroup, Add Aggregate Item in the grid context menu
  • View: Format Toolbox, Performance Watch, Timeline
  • Tools: Calculation Engine, Options
  • Window: New Window, Close Window
  • Formatting buttons in the toolbar (Bold, Italic, Underline, Fill, Font, Format)
  • Circular References tab in the bottom panel

Known limitations

  • Changes to rules and to the dimensions placed on the grid axes cannot be undone with Ctrl+Z. Ctrl+Z after such a change reverts the previous value edit instead. This comes from the engine, not from the extension.
  • Number formats are not applied in the grid yet.
  • The engine starts with a small placeholder model; File → Open… in the OM Core tab replaces it.
  • .openm script files cannot be opened from File → Open… in the OM Core tab. It reads .json models only. Run .openm scripts with the om-core command line (uv run python main.py --batch file.openm).

Troubleshooting

Engine path: "Not set". Socket mode only. Press Settings in the side panel and click Choose folder… (see Using an external runtime), or just press Start Runtime: it asks for the folder. Canceling that dialog gives "om-core path is not set".

"omCore.omCorePath does not exist: … — trying auto-detect". Socket mode only. The folder in the setting is gone or mistyped. OM Tools then asks for the folder; choose the om-core clone.

Engine path: "… — not an om-core folder". Socket mode only. The setting points to a folder without main.py (for example the parent folder). Choose the om-core folder itself.

Dependencies: ".venv missing — run uv sync". Socket mode only. Run uv sync in the om-core folder (see Using an external runtime), then press Start Runtime.

uv: "Not found" or "Not on PATH — restart VS Code". Socket mode only. Install uv (see Using an external runtime). If it is installed, close all VS Code windows and start VS Code again.

"This workspace is not trusted (Restricted Mode)…". You opened a folder that VS Code does not trust, and OM Tools does not run code from there — this only blocks the external (socket) runtime; the bundled engine still works. Press Manage Workspace Trust on the Runtime row and trust the folder, or open VS Code without a folder.

"Failed to start runtime: …". Socket mode only. The message ends with the engine's error output. The usual causes are the ones above: uv is not found, uv sync was not run, or the folder is not om-core.

The GUI shows "disconnected". If the engine is not running, press Start Runtime in the side panel: the tab connects by itself. If it is running, press Reconnect on the GUI row (or run OM Core: Reconnect to Runtime).

Another engine is already running. Socket mode only. If an engine is already running at the same address (on Windows, port 17391), for example the om-core Qt GUI or an earlier run, Open GUI connects to it and you see that engine's model, and Start Runtime does not start a second one. Stop that process where it was started: Stop Runtime only stops an engine that OM Tools started itself.

Links

Development

npm install
npm run build
npm run compile
npm test
npm run test:mcp   # MCP server end-to-end check — spawns its own throwaway runtime

npm test talks to a running OM Core runtime and changes the model in it: use a throwaway runtime, not one with your own model. npm run test:mcp spawns a private runtime on a temporary socket (needs OM_CORE_PATH or a ../om-core checkout) and leaves nothing running.

The runtime configuration and integration notes are in AGENTS.md. To use the extension, a compatible OM Core runtime is required.

Community and governance

License

OM Tools is distributed under the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later), as declared in package.json, except for separately licensed materials. See LICENSE, NOTICE, and third-party notices.

OM Core is a separate repository with its own contributor policies and notices; signing an OM Tools agreement does not automatically sign an agreement for OM Core.

Source, licensing and the bundled engine

The OM Tools GUI source is available under AGPL-3.0-or-later (LICENSE). The separately compiled Zig WebAssembly engine is supplied with its own binary licence; CORE-MATH attribution is in THIRD-PARTY-NOTICES.md. A binary licence is not an AGPL linking exception. Official integrated distributions require the additional copyright permissions described in ENGINE-DISTRIBUTION.md.

engine/PROVENANCE.json pins the distributed WASM. Rebuild and refresh with tools/sync-engine.sh and verify using node tools/verify-engine-artifacts.mjs. Before release, establish its exact source commit and the availability of corresponding source for the bundled TypeScript runtime components.

Commercial Licensing

Alternative commercial licensing arrangements are available upon request. Please contact Cloudcell Limited for licensing inquiries.

About

VS Code extension for OM Core — open-source multidimensional modeling with cubes, rules, interactive grids, and financial models.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages