A JSON-backed ticket management system with full CRUD operations, status/priority filtering, prefix-based ID resolution, and test suite.
63 lines
1.6 KiB
Markdown
63 lines
1.6 KiB
Markdown
# Tickets
|
|
|
|
A lightweight CLI ticket tracker that stores tickets as JSON in your home directory (`~/.tickets/tickets.json`).
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
# Install in development mode
|
|
pip install -e ".[dev]"
|
|
|
|
# Run tests
|
|
pytest tests/ -v
|
|
```
|
|
|
|
## Commands
|
|
|
|
| Command | Alias | Description |
|
|
|----------------------|-------|------------------------|
|
|
| `tickets create` | `c` | Create a new ticket |
|
|
| `tickets list` | `ls` | List tickets |
|
|
| `tickets view <id>` | `v` | Show ticket details |
|
|
| `tickets update <id>`| `u` | Modify a ticket |
|
|
| `tickets delete <id>`| `rm` | Remove a ticket |
|
|
|
|
### Examples
|
|
|
|
```bash
|
|
# Create tickets
|
|
tickets create "Fix login bug" -d "Users can't sign in" -p high -a alice -t bug auth
|
|
tickets create "Add dark mode" -p low -t feature
|
|
|
|
# List all tickets
|
|
tickets list
|
|
|
|
# Filter by status or priority
|
|
tickets list -s todo
|
|
tickets list -p critical
|
|
|
|
# View details
|
|
tickets view abc12345
|
|
|
|
# Update a ticket
|
|
tickets update abc12345 -s done -a bob
|
|
tickets update abc12345 -t "Better title" -p critical
|
|
|
|
# Delete a ticket
|
|
tickets delete abc12345 -f
|
|
```
|
|
|
|
## Fields
|
|
|
|
- **title** — short summary (required)
|
|
- **description** — longer details (optional)
|
|
- **priority** — `low`, `medium` (default), `high`, `critical`
|
|
- **status** — `todo` (default), `in_progress`, `done`, `cancelled`
|
|
- **assignee** — who's working on it (optional)
|
|
- **tags** — list of labels (optional)
|
|
|
|
## Storage
|
|
|
|
All tickets are persisted to `~/.tickets/tickets.json`. Since this is a plain JSON file, you can version-control it with git or back it up easily.
|
|
|