|
|
||
|---|---|---|
| .github/workflows | ||
| examples | ||
| src | ||
| .gitignore | ||
| deploy.mjs | ||
| deploy.ps1 | ||
| esbuild.config.mjs | ||
| LICENSE | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| styles.css | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
O-Tie
Build and edit risk bowtie diagrams in Obsidian with an interactive visual editor.
What is O-Tie?
O-Tie is an Obsidian plugin for bowtie risk analysis — a visual method used in process safety, operations, and HSE work to show how a hazard can lead to a top event (loss of control), which threats can cause it, which consequences may follow, and which barriers prevent or reduce harm.
Instead of drawing bowties in a separate tool, you create and maintain them as .bowtie files inside your vault. O-Tie provides a dedicated editor with pan/zoom, barrier stacks, escalation factors, undo/redo, and PNG export. Changes auto-save as you edit.
Features
- Interactive bowtie editor with fan-in/fan-out layout
- Threats, prevention barriers, top event, mitigation barriers, consequences, and hazard
- Escalation factors and escalation barriers
- Per-barrier analysis stacks (type, effectiveness, criticality, and custom rows)
- Toolbar: add elements, undo/redo, fit, zoom, PNG export, help
- Inspector panel for label, notes, and delete
- Pan and zoom on the canvas
- Auto-save to
.bowtiefiles
Bowtie structure
Threats → Prevention Barriers → Top Event → Mitigation Barriers → Consequences
↑
Hazard
Installation
From Obsidian Community Plugins
- Open Settings → Community plugins.
- Turn off Restricted mode if needed.
- Click Browse, search for O-Tie, and install.
- Enable the plugin.
Manual installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Copy them into
<vault>/.obsidian/plugins/o-tie/. - Reload Obsidian and enable O-Tie under Settings → Community plugins.
Usage
- Click the bowtie ribbon icon or run O-Tie: Create new bowtie.
- Enter a name — a
.bowtiefile opens in the editor. - Edit on the diagram:
- Toolbar: add threat, consequence, or barrier; fit; zoom; export; help
- Double-click a node or title to rename
- Click a node to inspect it in the bottom panel
- Right-click for context menus
- Hover nodes for quick add/delete buttons
- Drag empty canvas space to pan; scroll to zoom
- Delete removes the selected node
- Ctrl+Z / Ctrl+Y for undo and redo
- Changes save automatically.
Settings
Open Settings → O-Tie to configure:
- Default folder for new bowties
- Column gap, row gap, node width, and node height
Commands
| Command | Description |
|---|---|
| Create new bowtie | Create a new .bowtie file |
| Open bowtie file | Open the active .bowtie file in the editor |
| Export bowtie as image | Export the diagram as PNG |
File format
.bowtie files are JSON. Example:
{
"name": "Defective Steamcracker",
"hazard": "High pressure ethylene",
"topEvent": "Loss of containment",
"threats": [{ "label": "Corrosion", "preventionBarriers": [] }],
"consequences": [{ "label": "Fire", "mitigationBarriers": [] }],
"view": { "zoom": 1, "panX": 0, "panY": 0 }
}
See examples/steamcracker.bowtie.
Development
npm install
npm run dev # watch mode
npm run build # production build
To deploy a local build into a vault:
# Unix / macOS / Git Bash
OBSIDIAN_PLUGIN_DIR="/path/to/vault/.obsidian/plugins/o-tie" npm run deploy
# Windows PowerShell
$env:OBSIDIAN_VAULT_PATH = "C:\path\to\vault"
.\deploy.ps1
Third-party licenses
This plugin bundles html-to-image (MIT) for PNG export.
License
MIT — see LICENSE.