Skip to main content

Lightweight Git-native tool for managing requirements in agile projects.

Project description

TReqs

Lightweight, Git-native requirements management for agile system development

Pipeline Status PyPI Python 3.9+ License: MIT GitLab

TReqs-NG brings requirements management into your development workflow by storing requirements as text files alongside your code. No vendor lock-in, no expensive licenses, no context switching between tools.

What is TReqs?

TReqs (Textual Requirements) is a command-line tool that enables agile teams to manage system requirements directly in Git. It treats requirements as first-class citizens in your repository, allowing you to:

  • Write requirements in plain text - Use Markdown files that live alongside your code
  • Track changes with Git - Requirements are versioned, reviewed, and merged just like code
  • Maintain traceability - Create and validate links between requirements, tests, and code
  • Scale with your team - Multiple developers can work on requirements in parallel

Why TReqs?

Traditional requirements tools don't integrate well with modern agile workflows:

Challenge TReqs Solution
Requirements tools are separate from development tools Requirements live in Git, reviewed in merge requests
Requirements become outdated quickly Teams update requirements alongside code changes
Poor version control and traceability Full Git history and automated traceability checking
Expensive licenses and vendor lock-in Open source, text-based, works with any editor
Doesn't scale for multiple teams Git-based parallel development and peer review

Quick Start

Installation

Install TReqs via pip:

pip install treqs-ng

Or install from source:

git clone https://github.com/treqs-on-git/treqs-ng.git
cd treqs-ng
pip install -e .

Basic Usage

  1. List all requirements in your project:

    treqs list
    
  2. Create a new requirement:

    treqs create --type requirement --prefix REQ >> requirements.md
    
  3. Check requirements validity:

    treqs check
    

Your First Requirement

Create a file requirements.md with:

## User Authentication

<treqs-element type="requirement" id="a3f2c8d14b5e4c9a8d7e1f2a3b4c5d6e">
The system shall authenticate users via username and password.
</treqs-element>

Run treqs list to see your requirement, and treqs check to validate it.

Key Features

Traceability Management

Link requirements to other requirements, tests, and code:

<treqs-element type="requirement" id="b8e9d2f36c7a4d1b9e8f2a3b4c5d6e7f">
User passwords shall be encrypted using bcrypt.
<treqs-link type="addresses" target="a3f2c8d14b5e4c9a8d7e1f2a3b4c5d6e"/>
</treqs-element>

TReqs validates that all links point to existing elements and follow your defined traceability rules.

Custom Validation Rules

Define your traceability model in ttim.yaml:

types:
  - name: requirement
    outlinks:
      - type: addresses
        target: stakeholderRequirement
      - type: hasParent
        target: requirement
    inlinks:
      - type: tests
        source: unittest

TReqs checks that your requirements conform to your model.

Git-Native Workflow

# Create feature branch
git checkout -b feature/new-auth

# Add requirement
echo "<treqs-element type='requirement' id='c9f1e3d47a8b4e2c9f1a3b4c5d6e7f8a'>..." >> requirements.md

# Commit and push
git add requirements.md
git commit -m "Add authentication requirement"
git push origin feature/new-auth

# Create merge request - requirements are reviewed alongside code

Flexible Element Types

TReqs supports any element types you define in your ttim.yaml configuration file. Common examples include stakeholder requirements, system requirements, tests, and documentation elements.

Documentation

Architecture

TReqs elements are embedded in text files using XML-like tags:

<treqs-element type="requirement" id="d1e2f3a48b9c4d5eaf1b2c3d4e5f6a7b">
Requirement text goes here.
<treqs-link type="addresses" target="e2f3a4b59c1d4e6fba2c3d4e5f6a7b8c"/>
</treqs-element>
  • Works in any text file: Markdown, source code comments, test files
  • Elements are identified by unique IDs
  • Traceability links are validated against your model (ttim.yaml)

Comparison with Alternatives

Tool TReqs Doorstop JIRA Traditional RE Tools
Git Integration Native Partial Via commits None
Human-Readable Storage Yes (Markdown) No (YAML) No No
Traceability Links Full support Basic Limited Full
License Cost Free (MIT) Free (LGPL) Paid Expensive
Parallel Development Yes Yes Limited No
Custom Validation Per-project Limited No Per-instance

Full comparison table

Requirements

  • Python 3.9 or higher
  • Git (for version control integration)

Contributing

We welcome contributions! TReqs-NG is the consolidated version of TReqs, integrating features from various variants. See CONTRIBUTING.md for details on previous versions and contributors.

Versioning

TReqs follows Semantic Versioning:

License

TReqs is released under the MIT License.

Research Background

TReqs is based on research into requirements engineering for large-scale agile system development:

The tool has been validated in industrial settings and continues to evolve based on real-world usage.

Get started today: pip install treqs-ng

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treqs_ng-1.6.3.tar.gz (47.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

treqs_ng-1.6.3-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file treqs_ng-1.6.3.tar.gz.

File metadata

  • Download URL: treqs_ng-1.6.3.tar.gz
  • Upload date:
  • Size: 47.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for treqs_ng-1.6.3.tar.gz
Algorithm Hash digest
SHA256 cf84568b4a12a6672110014f95cf749993b2b1f57e14448aae56a450d2f1746c
MD5 866196c63cf4e84b82a1af17c6020f4a
BLAKE2b-256 daa13dbb3f4d5796210136c4d00eadea5c7e03d15a449684026eaea3a489c709

See more details on using hashes here.

File details

Details for the file treqs_ng-1.6.3-py3-none-any.whl.

File metadata

  • Download URL: treqs_ng-1.6.3-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for treqs_ng-1.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c5f7f623640b79ff640ac933c81402e7a45cb7808c6941a33c25e1cb5f7402c
MD5 250b0ee0ac4afe4a331adf3378808bc1
BLAKE2b-256 b5bca9d7e398115f95816518f0e6f3fe74dd9b40851546d1c0bd62169073e4b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page