GitHub Template

How to create a DevRail-compliant repository from the GitHub template.

The GitHub repo template provides a ready-to-use starting point for DevRail-compliant projects hosted on GitHub.

Creating a Repository

From the GitHub Web UI

  1. Navigate to github.com/devrail-dev/github-repo-template
  2. Click “Use this template” > “Create a new repository”
  3. Enter your repository name and settings
  4. Click “Create repository”
  5. Clone the new repository to your machine

From the GitHub CLI

# Create a new repository from the DevRail template
gh repo create my-project --template devrail-dev/github-repo-template --public
cd my-project

File Inventory

The template includes the following files:

DevRail Configuration

FilePurpose
MakefileUniversal execution interface with two-layer delegation pattern
.devrail.ymlLanguage declaration and project settings
.editorconfigEditor formatting rules (indent, line endings, whitespace)
.gitignoreStandard ignore patterns
.pre-commit-config.yamlPre-commit hook configuration for local enforcement

Documentation

FilePurpose
DEVELOPMENT.mdCanonical development standards (single source of truth)
CHANGELOG.mdChangelog in Keep a Changelog format
LICENSEMIT license
README.mdProject README template

Agent Instruction Files

FilePurpose
CLAUDE.mdInstructions for Claude Code
AGENTS.mdGeneric agent instructions
.cursorrulesInstructions for Cursor
.opencode/agents.yamlInstructions for OpenCode

CI/CD

FilePurpose
.github/workflows/lint.ymlLint job – runs make lint
.github/workflows/format.ymlFormat job – runs make format
.github/workflows/security.ymlSecurity job – runs make security
.github/workflows/test.ymlTest job – runs make test
.github/workflows/docs.ymlDocs job – runs make docs
.github/PULL_REQUEST_TEMPLATE.mdPR description template
.github/CODEOWNERSCode ownership for review assignment

Customization

Step 1: Configure Languages

Edit .devrail.yml to match your project:

# .devrail.yml -- configure for your project
languages:
  - python
  - bash

Step 2: Update README

Replace the template README content with your project’s description, maintaining the DevRail-standard structure:

  • Title and one-line description
  • Badges
  • Quick start (3 steps max)
  • Usage (make help output)
  • Configuration
  • Contributing (link to DEVELOPMENT.md)
  • License

Step 3: Customize CI Workflows

The GitHub Actions workflows are pre-configured to run each make target in a separate job using the dev-toolchain container. Adjust the workflow triggers if your branching strategy differs from the default (PRs to main).

Step 4: Set Up Code Owners

Edit .github/CODEOWNERS to reflect your team’s ownership structure:

# .github/CODEOWNERS
* @your-org/your-team

Common Customization Patterns

Adding a Language

To add a language to your project, edit .devrail.yml:

languages:
  - python
  - bash
  - terraform  # Added terraform

The Makefile automatically adjusts which tools run based on this list. No other file changes are needed.

Changing the Container Version

To pin a specific container version:

# In your Makefile, override the default image
DEVRAIL_IMAGE ?= ghcr.io/devrail-dev/dev-toolchain:v1.3.2

Adjusting CI Triggers

By default, CI workflows run on pull requests to main. To change this:

# In .github/workflows/*.yml
on:
  pull_request:
    branches: [main, develop]  # Add additional branches