Show HN: OM Core – 无需电子表格单元格公式的多维模型
Show HN: OM Core – multidimensional models without spreadsheet cell formulas

原始链接: https://github.com/cloudcell/om-core

大多数电子表格模型将结构、逻辑、布局和展示混合在一起,这往往会导致模型脆弱且容易出错。OM Core 提供了一种替代方案,通过多维建模引擎将这些要素分离。OM Core 不再依赖单元格坐标,而是使用维度、立方体、层级和语义规则来定义模型,并将网格和视图仅视为底层数据的投影。 通过基于模型轴线(而非特定的行或列地址)来定义业务关系(例如计算毛利率),OM Core 模型变得更容易审计、扩展和维护。 该项目目前处于 Alpha 阶段,提供了一个完整的技术栈,包括建模引擎、REPL、GUI/TUI 以及运行时环境。它专为那些希望构建超越传统电子表格限制、结构化且透明的财务和分析模型用户而设计。 该平台是开源的(AGPL v3.0)并处于活跃开发中,这意味着在 v1.0 版本发布之前,API 和文件格式可能会发生变化。用户可以通过[文档网站](https://cloudcell.github.io/om-docs/)探索该项目,其中包含安装指南、快速入门教程以及对模型驱动设计理念的详细解释。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Show HN: OM Core – 无需电子表格单元格公式的多维模型 (github.com/cloudcell) 3 点,由 cloudcell 发布于 1 小时前 | 隐藏 | 过往 | 收藏 | 1 条评论 帮助 cloudcell 1 小时前 [–] 我今天公开了 OM Core。 这是一个处于早期 Alpha 阶段的多维建模引擎。其核心理念是将模型与网格分离:使用维度、立方体、规则和视图,而不是电子表格的单元格公式。 我希望能收到那些曾构建或维护过电子表格模型的人的反馈,特别是关于这种抽象概念是否易于理解。 文档:https://cloudcell.github.io/om-docs/ 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

OM Core is an open-source reference implementation of a multidimensional modeling engine for structured financial, operational, and analytical models.

Instead of treating the spreadsheet grid as the model, OM Core represents the model using dimensions, cubes, groups, and rules. Grids and views are projections of that model, not the source of truth.

Alpha software: OM Core is under active development. APIs, command names, file formats, GUI behavior, and module boundaries may change before v1.0.

OM Core overview video

The main documentation site is here:

https://cloudcell.github.io/om-docs/

Start with:

Most spreadsheet models mix several things together:

  • model structure
  • business logic
  • layout
  • presentation
  • calculation flow
  • user interaction

OM Core separates these concerns.

The model is built from:

  • Dimensions — business axes such as Time, Account, Region, Product, Scenario, or Line Item.
  • Cubes — data stored over one or more dimensions.
  • Groups and hierarchies — structured collections and rollups.
  • Rules — calculations expressed over semantic model addresses instead of spreadsheet coordinates.
  • Views — grids and interfaces for inspecting and interacting with the model.

A rule should describe the business relationship, not the cell location. For example, a model should be able to express a relationship such as gross margin being derived from revenue and cost without making that relationship depend on a particular row, column, or copied formula.

This repository currently contains the full alpha application stack required to run OM Core.

That includes the modeling engine and supporting command, REPL, GUI/TUI, runtime, timeline, scripting, plugin, storage-adapter, examples, and test layers.

Some modules are internal implementation layers. They are included because the current alpha application depends on them. They should not yet be treated as stable public extension APIs.

The .om/ directory is intentionally committed.

It contains default OM Core application configuration, including toolbar settings required by the current alpha application. It is not a temporary cache directory or private local state.

Do not delete .om/ unless the application configuration system has been changed to load these defaults from another documented location.

OM Core currently runs from source.

git clone https://github.com/cloudcell/om-core.git
cd om-core
./start.sh

Use PowerShell:

git clone https://github.com/cloudcell/om-core.git
cd om-core
.\start.ps1

./start.sh or .\start.ps1 starts the GUI and asks whether to open a TUI in a separate terminal.

OM Core uses uv to manage its Python environment. Install uv, then run uv sync in the project root to create .venv and install dependencies. After that, the start scripts and test scripts use uv run automatically.

You can also start specific runtime modes:

# Linux / macOS
./start.sh --gui       # graphical interface only
./start.sh --tui       # terminal interface in the current terminal
./start.sh --runtime   # headless runtime only
./start.sh --repl      # REPL command shell in the current terminal
# Windows
.\start.ps1 --gui       # graphical interface only
.\start.ps1 --tui       # terminal interface in the current terminal
.\start.ps1 --runtime   # headless runtime only
.\start.ps1 --repl      # REPL command shell in the current terminal

For more detail, see the installation guide:

https://cloudcell.github.io/om-docs/start/installation/

Running ./start.sh (Linux / macOS) or .\start.ps1 (Windows) launches the GUI. You will be prompted to open a TUI in a separate terminal; accepting the default (Y) gives you a command shell alongside the GUI, as shown below.

Note: The first time you run ./start.sh or .\start.ps1, uv will create a Python virtual environment in the project folder (.venv) and install dependencies from uv.lock.

OM Core GUI and TUI running together

After starting OM Core, try the built-in help command:

You can ask for help on specific topics:

om> help rule
om> help calc

A minimal OM Core script looks like this:

# Dimensions
dim Month Jan Feb Mar

# Cube
cube Sales Month

# View
view SalesView = Sales::Month

# Rules
rule Sales::Month.Jan = 100
rule Sales::Month.Feb = Sales::Month.Jan * 1.1
rule Sales::Month.Mar = Sales::Month.Feb * 1.1

# Calculate
calc

Save that as hello.openm, then source it from the REPL or TUI:

For the full walkthrough, see:

https://cloudcell.github.io/om-docs/start/quickstart/

Run the test suite with the platform-specific script:

# Linux / macOS
./test.sh

OM Core is split into a session-scoped runtime layer, a command/query service layer, and multiple clients. The engine owns the canonical workspace state; the GUI, TUI, REPL, and CLI are clients that communicate through the message bus.

Target architecture overview

Why not just spreadsheets?

Spreadsheets are fast and flexible, but large models often become fragile because business logic is encoded in cell addresses, copied formulas, linked tabs, and implicit layout conventions.

OM Core uses a different level of abstraction. It makes the model explicit: dimensions describe the axes, cubes hold values, groups organize structure, rules define calculations, and views display the result.

The tradeoff is deliberate: you define more structure up front, and in return the model becomes easier to audit, extend, test, and maintain as it grows.

For the longer explanation, see:

https://cloudcell.github.io/om-docs/start/why-not-spreadsheets/

OM Core is currently alpha software.

Not yet promised before v1.0:

  • stable public API
  • stable plugin API
  • stable scripting API
  • stable file format
  • packaged desktop installer
  • production readiness for critical business use without independent validation

See also:

  • KNOWN_ISSUES.md
  • CHANGELOG.md
  • SECURITY.md

OM Core is distributed under the GNU Affero General Public License v3.0 unless otherwise stated.

See:

  • LICENSE
  • NOTICE
  • legal/THIRD-PARTY-NOTICES.md
  • legal/CONTRIBUTOR-CLA.md
  • legal/CONTRIBUTOR-SIGNOFFS.md

The OM Core name is governed separately from the software license.

See:

Contributions are welcome, especially small, focused improvements to examples, documentation, and clearly scoped engine behavior.

Please read:

  • CONTRIBUTING.md
  • legal/CODE_OF_CONDUCT.md
  • SECURITY.md

Security issues should not be reported through public GitHub issues. See SECURITY.md.

联系我们 contact @ memedata.com