cobolx-2
v1.2.4
Published
[](#development) [](#release) [](#vs-code-extension)
Readme
COBOL-X
COBOL-X is a modern COBOL-inspired programming platform for readable business logic, deterministic tooling, and backend-oriented workflows. This repository ships a TypeScript-based compiler toolchain, runtime, package manager layer, editor integration, and release validation flow.
Features
- Working compiler pipeline with lexer, parser, AST, semantic analysis, HIR, MIR, optimization, and JavaScript backend emission
- CLI workflows for build, run, check, test, bench, debug, dev, docs, code generation, migrations, visualization, deploy, and package management
- CargoX manifest, dependency graph, lockfile, install, update, and local publish support
- Runtime modules for scheduling, actors, events, distributed service discovery, observability, workflows, self-healing, and versioned state
- Time-travel debugging support with trace recording and rewind playback
- LSP and VS Code extension support for
.cbx,.cob, and.col
Installation
npm install cobolx-2Build from source
npm install
npm run build
npm run validateHelper scripts are available in install.ps1 and install.sh.
Quick Start
node cli/cobolx-cli/dist/index.js new my-service api
cd my-service
node ..\cli\cobolx-cli\dist\index.js add ledger 1.2.3
node ..\cli\cobolx-cli\dist\index.js install
node ..\cli\cobolx-cli\dist\index.js run
node ..\cli\cobolx-cli\dist\index.js debug --rewindCOBOL-X Example
PROGRAM Payments
ENUM Result:
OK(value)
ERR(message)
END
FUNCTION add(left, right)
BEGIN
RETURN left + right
END-FUNCTION
BEGIN
LET subtotal = add(20, 22)
DISPLAY subtotal
ENDRepository Layout
cobolx/
├── compiler/
├── runtime/
├── stdlib/
├── cli/
├── cargox/
├── lsp/
├── vscode-extension/
├── formatter/
├── linter/
├── debugger/
├── profiler/
├── examples/
├── tests/
├── benchmarks/
├── docs/
├── LICENSE
├── CONTRIBUTING.md
├── CHANGELOG.md
└── .gitignoreCLI
cobolx buildcobolx runcobolx checkcobolx testcobolx benchcobolx add <pkg> <version>cobolx installcobolx updatecobolx publishcobolx devcobolx doccobolx replcobolx visualizecobolx deploy
VS Code Extension
The publishable extension lives in vscode-extension. It includes language registration, syntax highlighting, snippets, LSP-backed diagnostics/hover/completions, and VS Code commands for run, build, REPL, and debug.
VS Code Marketplace:
Packaging flow:
cd vscode-extension
npm install -g vsce
npx @vscode/vsce package
vsce login Magnexis
vsce publishExamples
Runnable example apps live under examples:
- examples/api-server
- examples/distributed-system
- examples/workflow-engine
- examples/event-system
- examples/parallel-processing
- examples/debugging-demo
Screenshots:
docs/screenshots/cli-build.pngdocs/screenshots/debug-rewind.pngdocs/screenshots/vscode-extension.png
Development
npm install
npm run build
npm run check
npm run test
npm run validateFurther reading:
