Skip to content

Commit c61a23d

Browse files
committed
Improve and fix documentation
1 parent d94b22a commit c61a23d

File tree

7 files changed

+57
-46
lines changed

7 files changed

+57
-46
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
fixit = "clippy --fix --allow-dirty --allow-staged"

README.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Inspired by [beans](https://github.com/hmans/beans) and [beads](https://github.c
88

99
## Features
1010

11-
- **Flat-file storage**: Issues stored as markdown with YAML frontmatter in `.peas/`
11+
- **Flat-file storage**: Issues stored as markdown with TOML frontmatter in `.peas/`
1212
- **GraphQL interface**: Query and mutate peas with GraphQL for AI agent integration
1313
- **Interactive TUI**: Browse and manage peas in a terminal UI
1414
- **Hierarchical structure**: Milestones, epics, features, bugs, and tasks
@@ -146,20 +146,25 @@ Or add to your `AGENTS.md`:
146146

147147
| Key | Action |
148148
|-----|--------|
149-
| `j`/`k` or arrows | Navigate up/down |
150-
| `Tab` | Next filter |
151-
| `Shift+Tab` | Previous filter |
149+
| ``/`` | Navigate up/down |
150+
| ``/`` | Previous/next page |
151+
| `Tab` | Switch between Tickets/Memory views |
152152
| `/` | Search |
153-
| `Space` | Toggle status |
154-
| `s` | Start (set in-progress) |
155-
| `d` | Done (set completed) |
153+
| `Enter` | Open detail view |
154+
| `Space` | Multi-select toggle |
155+
| `c` | Create new ticket |
156+
| `s` | Change status |
157+
| `t` | Change type |
158+
| `P` | Change priority |
159+
| `e` | Edit in $EDITOR |
156160
| `r` | Refresh |
161+
| `u` | Undo last operation |
157162
| `?` | Help |
158163
| `q` | Quit |
159164

160165
## Configuration
161166

162-
peas uses `.peas.toml` for configuration (also supports `.peas.yml`, `.peas.yaml`, or `.peas.json`):
167+
peas uses `.peas.toml` for configuration (also supports `.peas.yml`, `.peas.yaml`, or `.peas.json`, but TOML is preferred):
163168

164169
```toml
165170
[peas]
@@ -168,30 +173,28 @@ prefix = "peas-" # ID prefix
168173
id_length = 5 # Random ID length
169174
default_status = "todo"
170175
default_type = "task"
171-
frontmatter = "toml" # Frontmatter format: toml, yaml
176+
frontmatter = "toml" # Frontmatter format: toml, yaml, json (TOML preferred)
172177

173178
[tui]
174179
use_type_emojis = false # Enable emoji icons for ticket types in TUI
175180
```
176181

177182
## File Format
178183

179-
Peas are stored as markdown files with YAML frontmatter:
184+
Peas are stored as markdown files with TOML frontmatter (YAML and JSON also supported):
180185

181186
```markdown
182-
---
183-
id: peas-abc1
184-
title: Implement feature X
185-
type: feature
186-
status: in-progress
187-
priority: high
188-
tags:
189-
- backend
190-
- api
191-
parent: peas-xyz9
192-
created: 2024-01-15T10:30:00Z
193-
updated: 2024-01-15T14:22:00Z
194-
---
187+
+++
188+
id = "peas-abc1"
189+
title = "Implement feature X"
190+
type = "feature"
191+
status = "in-progress"
192+
priority = "high"
193+
tags = ["backend", "api"]
194+
parent = "peas-xyz9"
195+
created = "2024-01-15T10:30:00Z"
196+
updated = "2024-01-15T14:22:00Z"
197+
+++
195198

196199
Detailed description of the feature goes here.
197200

src/cli/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct Cli {
1313
#[command(subcommand)]
1414
pub command: Commands,
1515

16-
/// Path to config file (searches upward for .peas.yml by default)
16+
/// Path to config file (searches upward for .peas.toml by default)
1717
#[arg(long, global = true)]
1818
pub config: Option<String>,
1919

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! # Peas - A CLI-based, flat-file issue tracker
22
//!
3-
//! Peas is a lightweight issue tracker that stores issues as markdown files with YAML frontmatter.
3+
//! Peas is a lightweight issue tracker that stores issues as markdown files with TOML frontmatter.
44
//! It provides a CLI interface for humans and a GraphQL API for AI agents and automation.
55
//!
66
//! ## Features
@@ -45,7 +45,7 @@ pub mod cli;
4545

4646
/// Configuration loading and management.
4747
///
48-
/// Handles `.peas.yml` configuration files and project discovery.
48+
/// Handles `.peas.toml` configuration files and project discovery.
4949
pub mod config;
5050

5151
/// Error types and result aliases.
@@ -65,7 +65,7 @@ pub mod model;
6565

6666
/// File-based storage layer.
6767
///
68-
/// Handles reading/writing peas as markdown files with YAML frontmatter.
68+
/// Handles reading/writing peas as markdown files with TOML frontmatter.
6969
pub mod storage;
7070

7171
/// Terminal user interface.

src/storage/markdown.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ pub fn parse_markdown_with_format(content: &str, format: FrontmatterFormat) -> R
8181
Ok(pea)
8282
}
8383

84-
/// Renders a pea to markdown with YAML frontmatter (default).
84+
/// Renders a pea to markdown with TOML frontmatter (default).
8585
pub fn render_markdown(pea: &Pea) -> Result<String> {
86-
render_markdown_with_format(pea, FrontmatterFormat::Yaml)
86+
render_markdown_with_format(pea, FrontmatterFormat::Toml)
8787
}
8888

8989
/// Renders a pea to markdown with the specified frontmatter format.
@@ -274,7 +274,7 @@ This is a TOML frontmatter body.
274274
)
275275
.with_body("Task description here.".to_string());
276276

277-
let rendered = render_markdown(&pea).unwrap();
277+
let rendered = render_markdown_with_format(&pea, FrontmatterFormat::Yaml).unwrap();
278278
assert!(rendered.starts_with("---\n"));
279279
assert!(rendered.contains("id: peas-xyz9"));
280280
assert!(rendered.contains("title: My Task"));

src/storage/mod.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
//! File-based storage layer for peas.
22
//!
3-
//! Peas are stored as markdown files with YAML frontmatter in the `.peas/` directory.
3+
//! Peas are stored as markdown files with TOML frontmatter in the `.peas/` directory.
44
//!
55
//! ## File Format
66
//!
77
//! ```markdown
8-
//! ---
9-
//! id: peas-1234
10-
//! title: Fix login bug
11-
//! type: bug
12-
//! status: in-progress
13-
//! priority: high
14-
//! tags: [auth, urgent]
15-
//! created: 2024-01-15T10:30:00Z
16-
//! updated: 2024-01-15T14:20:00Z
17-
//! ---
8+
//! +++
9+
//! id = "peas-1234"
10+
//! title = "Fix login bug"
11+
//! type = "bug"
12+
//! status = "in-progress"
13+
//! priority = "high"
14+
//! tags = ["auth", "urgent"]
15+
//! created = "2024-01-15T10:30:00Z"
16+
//! updated = "2024-01-15T14:20:00Z"
17+
//! +++
1818
//!
1919
//! Description of the bug and any additional notes.
2020
//! ```

src/tui/mod.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@
1010
//!
1111
//! ## Keybindings
1212
//!
13-
//! - `j/k` or `↓/↑`: Navigate list
14-
//! - `Tab`: Cycle filters (All, Open, In Progress, etc.)
13+
//! - `↑/↓`: Navigate up/down
14+
//! - `←/→`: Previous/next page
15+
//! - `Tab`: Switch between Tickets/Memory views
1516
//! - `/`: Search
16-
//! - `Enter/Space`: Toggle status
17-
//! - `s`: Start (mark in-progress)
18-
//! - `d`: Done (mark completed)
17+
//! - `Enter`: Open detail view
18+
//! - `Space`: Multi-select toggle
19+
//! - `c`: Create new ticket
20+
//! - `s`: Change status
21+
//! - `t`: Change type
22+
//! - `P`: Change priority
23+
//! - `e`: Edit in $EDITOR
1924
//! - `r`: Refresh
25+
//! - `u`: Undo last operation
2026
//! - `?`: Help
2127
//! - `q`: Quit
2228

0 commit comments

Comments
 (0)