# Unit: A Visual Programming Language Based on Graphs of Connected Nodes

> Unit is an open-source visual programming language and environment where programs are represented as graphs of Multi Input Multi Output finite state machines. The programming environment is a web application, and Unit can also be used as a JavaScript library or served from a local Node.js server.

**samuelmtimbo/unit** — Next Generation Visual Programming System

- Repository: https://github.com/samuelmtimbo/unit
- Website: https://unit.software
- Stars: 4,917 · Forks: 170
- Language: TypeScript
- License: MIT
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/samuelmtimbo-unit

## Programs as Graphs Instead of Files

Unit addresses the problem of writing software through text files with rigid syntax. The README describes Unit as 'a General Purpose Visual Programming Language and Environment built with a primary focus on Developer Experience.' Instead of writing function definitions in a text editor, a developer in Unit draws a graph where each node is a unit and each edge is a connection between an input and an output.

The README compares Unit to the Unix shell: 'for a seasoned programmer, Unit should feel like the 2D evolution of the Command Line Interface (CLI) where units' (commands) inputs and outputs (stdin/stdout/stderr) can be piped together into a graph (script).'

The primary audience is software developers who want to experiment with a graph-based approach to programming, particularly in the context of web applications. The environment runs in a web browser and is designed for both desktop and mobile input, including touch and gesture.

## MIMO Finite State Machines and the Graph Data Model

The formal model underlying Unit programs is the Multi Input Multi Output (MIMO) Finite State Machine. Each unit in a program has a fixed set of named inputs and outputs. Connecting a unit's output to another unit's input defines the data flow. The README states that 'formally, units are Multi Input Multi Output (MIMO) Finite State Machines (FSM). A program in Unit is represented as a Graph.'

This model is influenced by Live programming, Data Flow programming, Reactive programming, Functional programming, and Object Oriented Programming, as the README lists. The practical result is that programs have no sequential execution order imposed by the graph structure itself; units fire when their inputs are satisfied.

A unit JSON bundle stores the program as a serializable data structure. The README includes an example bundle that illustrates the schema: units identified by UUID, a spec defining their connections, and a component section for units that render to the DOM. This serialization format means programs can be shared, versioned, and embedded in web pages without a compile step.

## Running the Unit Environment Locally

The quickest way to start a local Unit environment is with npx, without cloning the repository:

```bash
npx @_unit/unit
```

Then visit http://localhost:4000. To specify a different port:

```bash
npx @_unit/unit --port 8042
```

To set up a full development environment from source, the README gives these steps:

```bash
git clone git@github.com:samuelmtimbo/unit.git
cd unit
npm install
npm run setup
npm start
```

For active development with file watching:

```bash
npm run watch
```

The package.json requires Node.js 20.9 or higher. The setup step, npm run setup, builds the library and client bundles before serving. This build step is separate from npm install and must complete before npm start will serve a working environment.

## Using Unit as a JavaScript Library

Unit can also be embedded as a library in any JavaScript project, on both the web and Node.js. Install the package:

```sh
npm install --save @_unit/unit
```

To install globally and use the CLI:

```sh
npm install --global @_unit/unit
```

The README shows rendering a unit bundle directly into a DOM element:

```js
import { renderBundle } from '@_unit/unit/client/platform/web/render'

const root = document.getElementById('root')
const bundle = {
  spec: {
    units: {
      helloworld: {
        id: 'a9cbed12-9a53-11eb-8c2e-f3146b36128d',
      },
    },
    render: true,
    component: {
      subComponents: { helloworld: {} },
      children: ['helloworld'],
    },
  },
}
const [system, graph] = renderBundle(root, bundle)
```

For Node.js, the README shows booting a system and instantiating a unit to run a sort algorithm:

```js
import { boot } from '@_unit/unit/client/platform/node/boot'
import { fromBundle } from '@_unit/unit/spec/fromBundle'

export const [system] = boot()
const MergeSort = fromBundle(bundle, _specs, {})
const mergeSort = new MergeSort(system)
mergeSort.play()
mergeSort.push('a', [2, 1])
console.log(mergeSort.take('a')) // [1, 2]
```

The library exports can be imported as CommonJS or ESM modules, as the exports field in package.json specifies both .js and .d.ts paths under the lib/ directory.

## Current Limitations of the Unit System

The README describes the Unit programming environment as beta. The official environment at unit.land is described as 'fully local' and the tools marketplace at unit.tools is also described as beta. The README notes that the direction of growth is 'ensuring a robust basic UI/UX and feature parity with Web and a subset of NodeJS (not native to the Web), like TCP and HTTP.'

Unit is not a traditional debugger-friendly environment. The README states that the environment is 'designed to be learnable by Experimentation and Exploration' and that documentation is accessed through an Info Mode within the environment rather than through a separate documentation site. Teams accustomed to IDE tooling, breakpoints, and static analysis will find the Unit environment unfamiliar.

The build system is complex. The npm run setup step runs multiple sub-scripts including build:system, build:client, and build:web. The package.json shows a long list of custom scripts using npm-run-all (run-p, run-s). A build failure partway through the setup process can leave the environment in a partially working state.

The library API is also still in flux. The package.json shows version 1.0.132, but the README describes the unit.land environment as beta. There is no stability guarantee on the renderBundle API or the JSON bundle schema between releases. Teams embedding Unit as a library should pin the @_unit/unit version and review the changelog before upgrading, because schema changes in the bundle format would require updating any serialized programs.

The npm package size is not documented in the README. Loading the full @_unit/unit library in a browser context will include the system's specification files and all built-in units, which may be larger than expected for applications that only need a small subset of the Unit capability.

## Unit vs Node-RED: Web-Focused Graphs vs IoT Flow Graphs

Node-RED is the most widely deployed open-source visual programming environment for flow-based programming. It targets IoT, home automation, and server-side event processing. Nodes in Node-RED communicate through a message-passing model over a wire, and the environment runs as a Node.js server with a browser-based editor.

Unit's graph model is more general-purpose and web-focused. It targets software developers building web applications, not IoT engineers wiring hardware events. The MIMO FSM formalism in Unit supports bidirectional connections and multiple simultaneous input and output pins per unit, which is more expressive than Node-RED's single-input single-output wire model. Unit also runs the environment itself in the browser as a web application, not as a server with a browser-based UI.

The practical difference is ecosystem and use case. Node-RED has a large library of hardware and protocol nodes for IoT. Unit has no equivalent node library, and the README's roadmap focuses on web and Node.js parity, not hardware integration.

## Maintenance Status, License, and the Beta Ecosystem

The last push to the repository was on 2026-09-21. The npm package version is 1.0.132. The repository has no GitHub releases; version tracking is through npm.

The license is MIT. The LICENCE file in the repository root covers the source code. The package is available under the @_unit scope on npm.

The README lists several related web applications maintained by the same project: unit.software (landing page), unit.land (fully local environment), unit.tools (marketplace for open units), and unit.moe (a debugging tool for wrapping any URL in the Unit graph editor). The broader vision described in the README is 'a simple and approachable Web Operating System, which is sandboxed by default.' The CONTRIBUTING.md in the repository root describes guidelines for pull requests and the code of conduct that applies to all contributions. The project welcomes forks and open source collaboration, and the README describes the codebase as 'the official channel for Open Source collaboration.'

## Conclusion

Developers interested in exploring visual programming as an alternative to text-based code, particularly in a web context, will find Unit the most fully built open-source system in this space. It supports Node.js and browser targets, ships a standalone environment at unit.land, and can be embedded as a JavaScript library. The environment is described as beta, and the README itself notes that the direction of growth is 'ensuring a robust basic UI/UX and feature parity with Web and a subset of NodeJS.' Teams that need a stable visual programming tool for production workflows should verify the current state of the feature they need before building on it. The package is at version 1.0.132 on npm, and the last push was on 2026-09-21.

## FAQ

### What is the Unit visual programming language?

Unit is a visual programming language where programs are graphs of connected nodes called units. Each unit is a Multi Input Multi Output finite state machine with named inputs and outputs. Programs are stored as JSON bundles and can run in a web browser, as a Node.js server, or be embedded as a JavaScript library.

### What are examples of visual programming like Unit?

The README mentions that Unit is similar in concept to Unix shell scripting in two dimensions. The related searches for this project include Flyde and Nodebase as comparable graph-based visual programming environments, and Nevalang as another visual language in the same space.

### How do I start the Unit programming environment locally?

Run npx @_unit/unit to start a local Unit server on port 4000 without cloning the repository. Alternatively, clone the repository, run npm install, npm run setup, and npm start. The setup step builds the client and system bundles before the server can serve them.

## Sources

- [Issues](https://github.com/samuelmtimbo/unit/issues)
- [License: MIT](https://github.com/samuelmtimbo/unit/blob/main/LICENSE)
- [Project website](https://unit.software)
- [README](https://github.com/samuelmtimbo/unit/blob/main/README.md)
- [samuelmtimbo/unit on GitHub](https://github.com/samuelmtimbo/unit)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/samuelmtimbo-unit
