Skip to main content

Templates

Create reusable templates for structured memory creation.

Overview

Templates provide pre-formatted content for common memory types like meeting notes, standups, and todos. They help maintain consistency and save time when creating structured memories.

Command aliases: template, tpl

Built-in Templates

Trix includes several built-in templates for common use cases:

Simple Templates

TemplateDescriptionUse Case
standupDaily standup formatTrack daily progress and blockers
meetingMeeting notes templateDocument meetings with attendees and action items
ideaIdea capture templateRecord ideas with context and next steps
bugBug report templateTrack bugs with reproduction steps and expected behavior
todoTodo list templateStructured task lists with priorities

Structured Templates (NEW)

Structured templates have defined fields with validation, default values, and options. They guide you through creating well-formed memories with consistent structure.

TemplateDescriptionRequired Fields
adrArchitecture Decision Recordtitle, status, context, decision, owner
meeting-notesStructured meeting notestitle, date, attendees, discussion
bug-reportBug report with severitytitle, severity, environment, steps, expected, actual
project-statusProject status updateproject, period, status, accomplishments, next_week
retrospectiveSprint retrospectivetitle, date, went_well, improvements, action_items

Structured templates validate your input and provide helpful prompts. Use trix templates list --structured to see all structured templates.

Listing Templates

# List all available templates
trix templates list

# Shows both built-in and custom templates
trix tpl list

# List only structured templates with field info
trix templates list --structured

# JSON output
trix templates list -o json

Viewing Templates

# Show template content
trix templates show standup

# View meeting template
trix templates show meeting

# View custom template
trix tpl show weekly-report

Using Templates

Use templates with the remember command:

# Use built-in standup template
trix remember --template standup

# Use template with space and tags
trix remember --template meeting --space work --tags "team,weekly"

# Interactively pick a template
trix remember --template-pick
trix remember -T

When you use a template, Trix opens your editor with the template structure pre-filled. You can then fill in the placeholders and save.

Using Structured Templates

Structured templates can be used interactively (with prompts) or non-interactively using --field flags:

# Interactive mode - prompts for each field
trix remember --template adr

# Non-interactive mode with --field flags
trix remember --template adr \
  --field title="Use PostgreSQL for User Data" \
  --field status=approved \
  --field context="We need a reliable database for user data" \
  --field decision="PostgreSQL provides ACID compliance" \
  --field owner="Sarah Chen"

# Partial fields - remaining are prompted
trix remember --template bug-report \
  --field title="Login button unresponsive" \
  --field severity=high

# With space and tags
trix remember --template meeting-notes \
  --field title="Q1 Planning" \
  --field date="2026-01-15" \
  --field attendees="Sarah, Marcus, Elena" \
  --field discussion="Discussed Q1 roadmap priorities" \
  --space work --tags planning,q1

Field Options

Some structured template fields have predefined options:

TemplateFieldOptions
adrstatusproposed, approved, rejected, deprecated, superseded
bug-reportseveritycritical, high, medium, low
project-statusstatuson-track, at-risk, blocked, completed

Creating Custom Templates

Basic Creation

# Create a new template
trix templates create weekly-report

# Opens your $EDITOR with initial content
# Edit the template structure and save

Template Placeholders

Templates support placeholders that can be filled in when used:

# Example template with placeholders
# Weekly Report - {{.Week}}

## Accomplishments
{{.Accomplishments}}

## Challenges
{{.Challenges}}

## Next Week
{{.NextWeek}}

## Notes
{{.Notes}}

Example Templates

# Example 1: Project Update Template
trix templates create project-update

Template content:

# Project Update: {{.ProjectName}}
Date: {{.Date}}
Status: {{.Status}}

## Progress
- Completed: {{.Completed}}
- In Progress: {{.InProgress}}
- Blocked: {{.Blocked}}

## Key Metrics
- {{.Metrics}}

## Next Steps
- {{.NextSteps}}

## Risks and Issues
{{.Risks}}
# Example 2: Code Review Template
trix templates create code-review

Template content:

# Code Review: {{.PRNumber}}

**Author:** {{.Author}}
**Reviewer:** {{.Reviewer}}
**Date:** {{.Date}}

## Summary
{{.Summary}}

## Changes Reviewed
- {{.Files}}

## Feedback
### Positives
- {{.Positives}}

### Concerns
- {{.Concerns}}

### Suggestions
- {{.Suggestions}}

## Verdict
[ ] Approved
[ ] Request Changes
[ ] Comment

**Decision:** {{.Decision}}
**Notes:** {{.Notes}}
# Example 3: 1-on-1 Meeting Template
trix templates create one-on-one

Template content:

# 1-on-1: {{.ManagerName}} & {{.EmployeeName}}
Date: {{.Date}}

## Check-in
**How are you feeling?**
{{.Feeling}}

**What's on your mind?**
{{.OnMind}}

## Discussion Topics
### From Last Time
- {{.FollowUps}}

### New Topics
- {{.NewTopics}}

## Career Development
- {{.CareerNotes}}

## Action Items
- [ ] {{.ActionItems}}

## Next Meeting
**Date:** {{.NextMeeting}}
**Topics:** {{.NextTopics}}

Editing Templates

# Edit an existing custom template
trix templates edit weekly-report

# Use specific editor
EDITOR=nano trix templates edit project-update

# Edit opens your $EDITOR with current content
# Make changes and save

Only user-created custom templates can be edited. Built-in templates are read-only. To customize a built-in template, create a new template with a different name.

Deleting Templates

# Delete a custom template
trix templates delete old-template

# Short alias
trix tpl delete temporary-template

Built-in templates cannot be deleted. Deletion only affects user-created custom templates.

Best Practices

Naming Conventions

  • Use lowercase with hyphens: weekly-report, code-review
  • Be descriptive: project-update not update
  • Group related templates: meeting-standup, meeting-planning

Template Structure

  • Start with a clear title using a heading
  • Use placeholders ({{.Field}}) for variable content
  • Include helpful comments or instructions
  • Use consistent formatting (Markdown works great)
  • Add empty sections for freeform content

Organization

  • Create templates for frequently-used memory structures
  • Combine templates with spaces for project-specific workflows
  • Use templates with tags for consistent categorization
  • Version your templates (e.g., standup-v2)

Sharing Templates

# Export a template
trix templates show weekly-report > weekly-report-template.md

# Share the file with your team

# Others can import by creating a template
# and pasting the content

Command Reference

CommandDescription
templates listList all available templates (built-in and custom)
templates show <name>Display template content
templates create <name>Create a new custom template
templates edit <name>Edit an existing custom template
templates delete <name>Delete a custom template

Next Steps