rela

module
v0.0.0-...-466d959 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0

README

Rela

A database layer on top of markdown. Define entities, link them together, and query their relationships—all stored as human-readable, version-controllable markdown files.

Rela lets you model any domain where traceability matters:

  • Architecture — Link requirements to decisions to components
  • Compliance — Connect controls to evidence and audit findings
  • Risk Management — Trace risks through mitigations to controls
  • Product Development — Map features to user stories to tasks
  • Knowledge Bases — Relate concepts, documents, and references
  • Project Governance — Track goals through milestones to deliverables

Define your own entity types and relationships in a simple YAML metamodel. Rela handles the rest: ID generation, bidirectional linking, orphan detection, coverage analysis, and graph export.

Quick Start

# Initialize a project
rela init

# Create entities
rela create requirement --title "System must support 1000 users"
rela create decision --title "Use PostgreSQL for persistence"

# Link them together
rela link DEC-001 addresses REQ-001

# View the relationship
rela show REQ-001

# Launch the interactive TUI
rela tui

# Work with a project in a different directory
rela -p /path/to/project list
export RELA_PROJECT=/path/to/project && rela list

Features

  • Entity Management - Create, update, delete entities
  • Relationship Tracing - Link entities and trace dependencies
  • Quality Analysis - Find orphans, check coverage, detect gaps
  • Graph Export - Export to Graphviz DOT format
  • Interactive TUI - Full-featured terminal interface
  • MCP Server - Expose rela to AI assistants via Model Context Protocol
  • Markdown Storage - Human-readable, version-controllable files

Installation

go install github.com/Sourcehaven-BV/rela/cmd/rela@latest

Or build from source:

git clone https://github.com/Sourcehaven-BV/rela.git
cd rela
go build -o rela ./cmd/rela

Documentation

Document Description
Getting Started Installation, first project, core workflow
Concepts Architecture traceability fundamentals
CLI Reference Complete command reference
Metamodel Reference Configure entity types and relations
Views - Declarative Context Generation Declarative views, CI integration
Export Guide Export, import, and data integration
Best Practices Maintenance tips and team workflows
MCP Server AI assistant integration via MCP
Data Entry Web App Config-driven web UI for entity management
Lua Scripting Programmable automation with embedded Lua
Tutorials
Tutorial Description
Tutorial: Building an ISO 27001 ISMS with Rela Build a complete Information Security Management System
Tutorial: Hybrid Project Management with Rela Build a hybrid project management system
Scenarios
Scenario Description
Scenario: DevOps/SRE Runbooks & Infrastructure Operations DevOps/SRE runbooks and infrastructure operations
Scenario: ISO 27001 Information Security Management System ISO 27001 Information Security Management System
Scenario: Hybrid Project Management Hybrid project management documentation

Project Structure

After running rela init:

your-project/
├── metamodel.yaml       # Entity types and relations config
├── entities/            # Markdown entity files (by type)
│   ├── requirements/
│   ├── decisions/
│   └── ...
├── relations/           # Markdown relation files
├── templates/           # Optional: templates for new entities/relations
│   ├── entities/        # One template per entity type
│   └── relations/       # One template per relation type
└── .rela/               # Cache (gitignored)

Core Traceability Chain

Requirement ──addresses──> Decision ──implements──> Solution ──realizes──> Component

Use rela analyze coverage to check for gaps in this chain.

License

AGPL-3.0 - See LICENSE for details.

Directories

Path Synopsis
cmd
rela command
rela-desktop command
rela-desktop runs the data entry application as a native desktop app using Wails.
rela-desktop runs the data entry application as a native desktop app using Wails.
rela-server command
rela-server runs the data entry web application as a standalone HTTP server.
rela-server runs the data entry web application as a standalone HTTP server.
internal
attachment
Package attachment provides content-addressable storage for file attachments.
Package attachment provides content-addressable storage for file attachments.
automation
Package automation provides a trigger-action engine for entity lifecycle events.
Package automation provides a trigger-action engine for entity lifecycle events.
cli
conflict
Package conflict provides detection and resolution of git merge conflicts in entity and relation markdown files.
Package conflict provides detection and resolution of git merge conflicts in entity and relation markdown files.
dataentry
Package dataentry provides a config-driven data entry web application built on top of rela's metamodel system.
Package dataentry provides a config-driven data entry web application built on top of rela's metamodel system.
dataentryconfig
Package dataentryconfig contains the configuration types and validation logic for the data-entry web application.
Package dataentryconfig contains the configuration types and validation logic for the data-entry web application.
desktop
Package desktop provides desktop-specific functionality for the Wails desktop app, including user preferences persistence.
Package desktop provides desktop-specific functionality for the Wails desktop app, including user preferences persistence.
git
Package git provides git operations for the data entry app.
Package git provides git operations for the data entry app.
htmlutil
Package htmlutil provides HTML post-processing utilities.
Package htmlutil provides HTML post-processing utilities.
importer
Package importer provides functionality to import entities and relations from JSON, YAML, and CSV files into rela projects.
Package importer provides functionality to import entities and relations from JSON, YAML, and CSV files into rela projects.
lua
Package lua provides markdown AST manipulation functions for Lua scripts.
Package lua provides markdown AST manipulation functions for Lua scripts.
mcp
coverage-ignore: MCP prompt handlers - tested via integration tests
coverage-ignore: MCP prompt handlers - tested via integration tests
migration
Package migration provides schema migration support for rela project files.
Package migration provides schema migration support for rela project files.
natsort
Package natsort provides natural sorting for strings containing numbers.
Package natsort provides natural sorting for strings containing numbers.
pattern
Package pattern provides glob pattern parsing, validation, and regex conversion.
Package pattern provides glob pattern parsing, validation, and regex conversion.
repository
Package repository provides a high-level domain API for entity, relation, cache, metamodel, and template persistence.
Package repository provides a high-level domain API for entity, relation, cache, metamodel, and template persistence.
schema
Package schema provides analysis and cleanup utilities for metamodel schemas.
Package schema provides analysis and cleanup utilities for metamodel schemas.
search
Package search provides full-text search using Bleve.
Package search provides full-text search using Bleve.
storage
Package storage provides filesystem abstraction for rela's file I/O operations.
Package storage provides filesystem abstraction for rela's file I/O operations.
validation
Package validation provides custom validation rule checking for entities.
Package validation provides custom validation rule checking for entities.
workspace
Package workspace provides a stateful domain session that owns the repository, graph, metamodel, and automation engine.
Package workspace provides a stateful domain session that owns the repository, graph, metamodel, and automation engine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL