Skip to content
forked from wedow/ticket

Fast, powerful, git-native ticket tracking in a single bash script. Dependency graphs, priority levels, zero setup.

License

Notifications You must be signed in to change notification settings

mojotech/ticket

 
 

Repository files navigation

ticket

The git-backed issue tracker for AI agents. Rooted in the Unix Philosophy, tk is inspired by Joe Armstrong's Minimal Viable Program with additional quality of life features for managing and querying against complex issue dependency graphs.

tk was written as a full replacement for beads. It shares many similar commands but without the need for keeping a SQLite file in sync or a rogue background daemon mangling your changes. It ships with a migrate-beads command to make this a smooth transition.

Tickets are markdown files with YAML frontmatter in .tickets/. This allows AI agents to easily search them for relevant content without dumping ten thousand character JSONL lines into their context window.

Using ticket IDs as file names also allows IDEs to quickly navigate to the ticket for you. For example, you might run git log in your terminal and see something like:

nw-5c46: add SSE connection management

VS Code allows you to Ctrl+Click or Cmd+Click the ID and jump directly to the file to read the details.

MojoTech Fork

MojoTech fork of ticket project from original repo: https://github.com/wedow/ticket

Install

Devenv:

Add the following input to your devenv.yaml file:

inputs:
  ticket:
    url: github:mojotech/ticket

Then add ticket to your devshell.nix:

{ inputs, pkgs, ... }:
{
  packages = [
    inputs.ticket.packages.${pkgs.system}.default
  ];
}

Nix (flakes):

# Run directly
nix run github:mojotech/ticket

# Install to profile
nix profile install github:mojotech/ticket

# Or add to your flake.nix inputs

From source (auto-updates on git pull):

git clone https://github.com/mojotech/ticket.git
cd ticket && ln -s "$PWD/ticket" ~/.local/bin/tk

Or just copy ticket to somewhere in your PATH.

Requirements

tk is a portable bash script requiring only coreutils, so it works out of the box on any POSIX system with bash installed. The query command requires jq. Uses rg (ripgrep) if available, falls back to grep.

Agent Setup

Add this line to your CLAUDE.md or AGENTS.md:

This project uses a CLI ticket system for task management. Run `tk help` when you need to use it.

Claude Opus picks it up naturally from there. Other models may need additional guidance.

Usage

tk - minimal ticket system with dependency tracking

Usage: tk <command> [args]

Commands:
  create [title] [options] Create ticket, prints ID
    -d, --description      Description text
    --design               Design notes
    --acceptance           Acceptance criteria
    -t, --type             Type (bug|feature|task|epic|chore) [default: task]
    -p, --priority         Priority 0-4, 0=highest [default: 2]
    -a, --assignee         Assignee [default: git user.name]
    --external-ref         External reference (e.g., gh-123, JIRA-456)
    --parent               Parent ticket ID (advisory, for epic/subtask hierarchy)
    --dep                  Initial dependency (ticket must be completed first)
  start <id>               Set status to in_progress
  close <id>               Set status to closed
  reopen <id>              Set status to open
  status <id> <status>     Update status (open|in_progress|closed)
  dep <id> <dep-id>        Add dependency (id depends on dep-id)
  dep tree [--full] <id>   Show dependency tree (--full disables dedup)
  undep <id> <dep-id>      Remove dependency
  link <id> <id> [id...]   Link tickets together (symmetric)
  unlink <id> <target-id>  Remove link between tickets
  ls [--status=X]          List tickets
  ready                    List open/in-progress tickets with deps resolved
  blocked                  List open/in-progress tickets with unresolved deps
  closed [--limit=N]       List recently closed tickets (default 20, by mtime)
  show <id>                Display ticket
  edit <id>                Open ticket in $EDITOR
  add-note <id> [text]     Append timestamped note (or pipe via stdin)
  query [jq-filter]        Output tickets as JSON, optionally filtered
  migrate-beads            Import tickets from .beads/issues.jsonl
  --version, -V            Print version

Tickets stored as markdown files in .tickets/
Supports partial ID matching (e.g., 'tk show 5c4' matches 'nw-5c46')

Migrating from Beads

tk migrate-beads

# review new files if you like
git status

# check state matches expectations
tk ready
tk blocked

# compare against
bd ready
bd blocked

# all good, let's go
git rm -rf .beads
git add .tickets
git commit -am "ditch beads"

For a thorough system-wide Beads cleanup, see banteg's uninstall script.

License

MIT

About

Fast, powerful, git-native ticket tracking in a single bash script. Dependency graphs, priority levels, zero setup.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 92.3%
  • Nix 7.7%