Skip to content

Commit 6000ef0

Browse files
authored
[docs] Update documentation for v1.8.0 (#85)
* [docs] Update documentation for v1.8.0 - Add rimba mcp and rimba completion to commands table in README - Document rimba mcp with MCP tools reference and setup snippets - Add --personal flag (init) and --no-push flag (sync) to command reference - Update sync description to document auto-push after sync - Update config examples to minimal form (worktree_dir/default_source auto-derived) - Remove worktree_dir and default_source from field reference table - Migrate .gitignore from .rimba.toml to .rimba/settings.local.toml - Add .rimba/settings.toml (migrated from .rimba.toml) * [docs] Update agent file templates and regenerate deployed files - Add MCP server mention to all 4 agent templates (AGENTS.md, copilot, cursor, claude) - Update copilot config shape to minimal (remove worktree_dir/default_source) - Add rimba mcp to cursor top commands and claude decision logic - Remove stale worktree_dir error from claude skill error table - Fix missing space in error table formatting - Regenerate all deployed agent files
1 parent 685ed93 commit 6000ef0

10 files changed

Lines changed: 95 additions & 25 deletions

File tree

.claude/skills/rimba/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ curl -sSfL https://raw.githubusercontent.com/lugassawan/rimba/main/scripts/insta
2929
| Run across worktrees | `rimba exec "<cmd>"` |
3030
| Check for conflicts | `rimba conflict-check` |
3131
| Check dependencies | `rimba deps status` |
32+
| Use MCP server | `rimba mcp` (stdio transport for AI agents) |
3233

3334
## JSON Output
3435

@@ -50,14 +51,13 @@ Commands supporting `--json`: `list`, `status`, `exec`, `conflict-check`, `deps
5051
| Error | Cause | Fix |
5152
|-------|-------|-----|
5253
| "not a git repository" | Not inside a git repo | `cd` into a git repo |
53-
| ".rimba.toml not found" | rimba not initialized | Run `rimba init` |
54-
| "worktree_dir must not be empty" | Bad config | Check `.rimba.toml` |
54+
| "config not found" | rimba not initialized | Run `rimba init` |
5555
| "branch already exists" | Task name in use | Pick a different task name |
5656
| "worktree has uncommitted changes" | Dirty worktree | Commit or stash changes, or use `--force` |
5757

5858
## Best Practices
5959

6060
- Prefer `rimba archive` over `rimba remove` to preserve branches
6161
- Use `--force` only when you understand the implications
62-
- Never modify `.rimba.toml` without asking the user
62+
- Never modify `.rimba/settings.toml` without asking the user
6363
- Always check `rimba status` before bulk operations

.cursor/rules/rimba.mdc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: rimba git worktree manager commands and workflows
33
globs:
44
- "*.go"
5-
- ".rimba.toml"
5+
- ".rimba/settings.toml"
66
alwaysApply: false
77
---
88

@@ -22,6 +22,7 @@ See AGENTS.md at the repo root for full documentation.
2222
8. `rimba archive <task>` — remove worktree, keep branch
2323
9. `rimba exec <cmd>` — run across all worktrees
2424
10. `rimba clean --merged` — remove merged worktrees
25+
11. `rimba mcp` — start MCP server for AI tool integration
2526

2627
## Workflow Recipes
2728

@@ -38,4 +39,4 @@ Envelope: `{"version", "command", "data"}` or `{"version", "command", "error", "
3839

3940
- Prefer `archive` over `remove` to keep branches for reference.
4041
- Use `--force` only when you understand the implications.
41-
- Never modify `.rimba.toml` without asking the user.
42+
- Never modify `.rimba/settings.toml` without asking the user.

.github/copilot-instructions.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ See AGENTS.md at the repo root for full rimba documentation.
1212
- `rimba merge <task>` — merge back to source branch
1313
- `rimba clean --merged` — remove merged worktrees
1414
- `rimba exec <cmd>` — run command across all worktrees
15+
- `rimba mcp` — start MCP server for AI tool integration
1516

16-
### Config Shape (`.rimba.toml`)
17+
### Config Shape (`.rimba/settings.toml`)
1718

1819
```toml
19-
worktree_dir = "../<repo>-worktrees"
20-
default_source = "main"
2120
copy_files = [".env", ".env.local", ".envrc", ".tool-versions"]
2221
post_create = []
2322
```

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ custom-gcl
3333
.env
3434

3535
# Rimba config (local to each repo)
36-
.rimba.toml
36+
.rimba/settings.local.toml
3737

3838
# Editor/IDE
3939
# .idea/
@@ -47,4 +47,4 @@ local.properties
4747
*local.json
4848

4949
# Worktrees
50-
.worktrees/
50+
.worktrees/

.rimba/settings.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
copy_files = ['.claude']
2+
3+
[open]
4+
ide = 'code .'
5+
agent = 'claude'

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# rimba — Git Worktree Manager
55

66
rimba manages parallel git worktrees so you can work on multiple tasks simultaneously.
7-
It is optional and detected via `.rimba.toml` in the repo root.
7+
It is optional and detected via `.rimba/settings.toml` in the repo root.
88

99
## Prerequisites
1010

@@ -25,6 +25,7 @@ curl -sSfL https://raw.githubusercontent.com/lugassawan/rimba/main/scripts/insta
2525
| Sync & merge | `rimba sync [task]`, `rimba merge <task>` |
2626
| Clean up | `rimba clean --merged`, `rimba archive <task>`, `rimba remove <task>` |
2727
| Cross-cutting | `rimba exec <cmd>`, `rimba conflict-check`, `rimba deps status` |
28+
| AI integration | `rimba mcp` (MCP server for AI coding agents) |
2829

2930
## Workflow Recipes
3031

@@ -57,6 +58,6 @@ Error: `{"version": "...", "command": "...", "error": "...", "code": "..."}`
5758

5859
- Prefer `rimba archive` over `rimba remove` to preserve branches for later reference
5960
- Use `--force` only when you understand the implications (skips dirty checks)
60-
- Never modify `.rimba.toml` programmatically without asking the user
61+
- Never modify `.rimba/settings.toml` programmatically without asking the user
6162

6263
<!-- END RIMBA -->

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ rimba remove my-feature
115115
| `rimba clean` | Prune stale references or remove merged/stale worktrees |
116116
| `rimba update` | Check for updates and replace the binary in place |
117117
| `rimba version` | Print version, commit, and build date |
118+
| `rimba mcp` | Start MCP server for AI tool integration |
119+
| `rimba completion` | Generate shell completion scripts (bash, zsh, fish, powershell) |
118120

119121
> See [docs/commands.md](docs/commands.md) for the full reference with all flags, examples, and notes.
120122
@@ -123,8 +125,6 @@ rimba remove my-feature
123125
`rimba init` creates a `.rimba/` directory with team-shared and personal config files:
124126

125127
```toml
126-
worktree_dir = '../myrepo-worktrees'
127-
default_source = 'main'
128128
copy_files = ['.env', '.env.local', '.envrc', '.tool-versions', '.vscode']
129129
post_create = ['./gradlew build']
130130

docs/commands.md

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ rimba init --agent-files # Also install AI agent instruction files
3131
| Flag | Description |
3232
|------|-------------|
3333
| `--agent-files` | Install AI agent instruction files (AGENTS.md, copilot, cursor, claude) |
34+
| `--personal` | Gitignore the entire `.rimba/` directory instead of just the local config file (for solo developers) |
3435

3536
---
3637

@@ -263,11 +264,12 @@ rimba merge auth --no-ff # Force merge commit
263264
264265
### rimba sync
265266

266-
Sync worktree(s) with the main branch by rebasing (default) or merging. Fetches the latest changes from origin first.
267+
Sync worktree(s) with the main branch by rebasing (default) or merging. Fetches the latest changes from origin first, then automatically pushes after a successful sync. Use `--no-push` to skip the push step.
267268

268269
```sh
269-
rimba sync my-feature # Rebase a single worktree onto main
270+
rimba sync my-feature # Rebase a single worktree onto main, then push
270271
rimba sync my-feature --merge # Use merge instead of rebase
272+
rimba sync my-feature --no-push # Sync without pushing
271273
rimba sync --all # Sync all eligible worktrees
272274
rimba sync --all --include-inherited # Include duplicate worktrees
273275
```
@@ -277,8 +279,9 @@ rimba sync --all --include-inherited # Include duplicate worktrees
277279
| `--all` | Sync all eligible worktrees (skips dirty and inherited by default) |
278280
| `--merge` | Use merge instead of rebase |
279281
| `--include-inherited` | Include inherited/duplicate worktrees when using `--all` |
282+
| `--no-push` | Skip pushing after sync (useful for local-only rebase/merge) |
280283

281-
> **Note:** Dirty worktrees are skipped with a warning. On conflict, the rebase is automatically aborted and a recovery hint is printed.
284+
> **Note:** Dirty worktrees are skipped with a warning. On conflict, the rebase is automatically aborted and a recovery hint is printed. After a successful sync, the branch is pushed to origin by default.
282285
283286
### rimba merge-plan
284287

@@ -419,6 +422,55 @@ rimba deps install my-feature
419422

420423
---
421424

425+
## AI Integration
426+
427+
### rimba mcp
428+
429+
Start a Model Context Protocol (MCP) server that exposes rimba's worktree management as tools for AI coding agents. The server runs over stdio and follows the MCP specification.
430+
431+
```sh
432+
rimba mcp # Start MCP server (stdio transport)
433+
```
434+
435+
#### Setup
436+
437+
**Claude Code** — add to `.mcp.json` or run:
438+
439+
```sh
440+
claude mcp add rimba rimba mcp
441+
```
442+
443+
**Cursor** — add to `.cursor/mcp.json`:
444+
445+
```json
446+
{
447+
"mcpServers": {
448+
"rimba": {
449+
"command": "rimba",
450+
"args": ["mcp"]
451+
}
452+
}
453+
}
454+
```
455+
456+
#### MCP Tools
457+
458+
| Tool | Description | Required Parameters |
459+
|------|-------------|---------------------|
460+
| `list` | List all worktrees with branch, path, and status ||
461+
| `add` | Create a new worktree for a task | `task` |
462+
| `remove` | Remove a worktree and optionally delete its branch | `task` |
463+
| `status` | Show worktree dashboard with summary stats and age info ||
464+
| `sync` | Sync worktree(s) with the main branch via rebase or merge, then push | `task` or `all` |
465+
| `merge` | Merge a worktree branch into main or another worktree | `source` |
466+
| `exec` | Run a shell command across matching worktrees in parallel | `command` |
467+
| `conflict-check` | Detect file overlaps between worktree branches ||
468+
| `clean` | Clean up stale references, merged branches, or stale worktrees | `mode` (prune, merged, stale) |
469+
470+
> **Note:** All tools return JSON responses. See `rimba mcp` help output for full parameter details.
471+
472+
---
473+
422474
## Maintenance
423475

424476
### rimba clean
@@ -474,3 +526,18 @@ Print version, commit, and build date.
474526
rimba version
475527
# rimba v0.1.0 (commit: abc1234, built: 2026-01-01T00:00:00Z)
476528
```
529+
530+
---
531+
532+
### rimba completion
533+
534+
Generate shell completion scripts for bash, zsh, fish, or PowerShell.
535+
536+
```sh
537+
rimba completion bash # Generate bash completions
538+
rimba completion zsh # Generate zsh completions
539+
rimba completion fish # Generate fish completions
540+
rimba completion powershell # Generate PowerShell completions
541+
```
542+
543+
> **Note:** Follow the printed instructions after generating to install the completions for your shell.

docs/configuration.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ Local settings override team settings. Fields omitted from the local file inheri
1616
### Team config (`.rimba/settings.toml`)
1717

1818
```toml
19-
worktree_dir = '../myrepo-worktrees'
20-
default_source = 'main'
2119
copy_files = ['.env', '.env.local', '.envrc', '.tool-versions', '.vscode']
2220

2321
# Post-create hooks (run in new worktree directory)
@@ -74,8 +72,6 @@ rimba init
7472

7573
| Field | Description | Default |
7674
|-------|-------------|---------|
77-
| `worktree_dir` | Directory for worktrees (relative to repo root) | `../<repo-name>-worktrees` |
78-
| `default_source` | Branch to create worktrees from | Default branch (e.g. `main`) |
7975
| `copy_files` | Files or directories to copy from repo root into new worktrees | `.env`, `.env.local`, `.envrc`, `.tool-versions` |
8076
| `post_create` | Shell commands to run in new worktrees after creation | (none) |
8177
| `open.<name>` | Named shortcut command for `rimba open --with <name>` | (none) |

internal/agentfile/content.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ curl -sSfL https://raw.githubusercontent.com/lugassawan/rimba/main/scripts/insta
3232
| Sync & merge | ` + "`" + `rimba sync [task]` + "`" + `, ` + "`" + `rimba merge <task>` + "`" + ` |
3333
| Clean up | ` + "`" + `rimba clean --merged` + "`" + `, ` + "`" + `rimba archive <task>` + "`" + `, ` + "`" + `rimba remove <task>` + "`" + ` |
3434
| Cross-cutting | ` + "`" + `rimba exec <cmd>` + "`" + `, ` + "`" + `rimba conflict-check` + "`" + `, ` + "`" + `rimba deps status` + "`" + ` |
35+
| AI integration | ` + "`" + `rimba mcp` + "`" + ` (MCP server for AI coding agents) |
3536
3637
## Workflow Recipes
3738
@@ -85,12 +86,11 @@ See AGENTS.md at the repo root for full rimba documentation.
8586
- ` + "`" + `rimba merge <task>` + "`" + ` — merge back to source branch
8687
- ` + "`" + `rimba clean --merged` + "`" + ` — remove merged worktrees
8788
- ` + "`" + `rimba exec <cmd>` + "`" + ` — run command across all worktrees
89+
- ` + "`" + `rimba mcp` + "`" + ` — start MCP server for AI tool integration
8890
8991
### Config Shape (` + "`" + `.rimba/settings.toml` + "`" + `)
9092
9193
` + "```" + `toml
92-
worktree_dir = "../<repo>-worktrees"
93-
default_source = "main"
9494
copy_files = [".env", ".env.local", ".envrc", ".tool-versions"]
9595
post_create = []
9696
` + "```" + `
@@ -130,6 +130,7 @@ See AGENTS.md at the repo root for full documentation.
130130
8. ` + "`" + `rimba archive <task>` + "`" + ` — remove worktree, keep branch
131131
9. ` + "`" + `rimba exec <cmd>` + "`" + ` — run across all worktrees
132132
10. ` + "`" + `rimba clean --merged` + "`" + ` — remove merged worktrees
133+
11. ` + "`" + `rimba mcp` + "`" + ` — start MCP server for AI tool integration
133134
134135
## Workflow Recipes
135136
@@ -183,6 +184,7 @@ curl -sSfL https://raw.githubusercontent.com/lugassawan/rimba/main/scripts/insta
183184
| Run across worktrees | ` + "`" + `rimba exec "<cmd>"` + "`" + ` |
184185
| Check for conflicts | ` + "`" + `rimba conflict-check` + "`" + ` |
185186
| Check dependencies | ` + "`" + `rimba deps status` + "`" + ` |
187+
| Use MCP server | ` + "`" + `rimba mcp` + "`" + ` (stdio transport for AI agents) |
186188
187189
## JSON Output
188190
@@ -204,8 +206,7 @@ Commands supporting ` + "`" + `--json` + "`" + `: ` + "`" + `list` + "`" + `, `
204206
| Error | Cause | Fix |
205207
|-------|-------|-----|
206208
| "not a git repository" | Not inside a git repo | ` + "`" + `cd` + "`" + ` into a git repo |
207-
| "config not found" | rimba not initialized | Run` + "`" + `rimba init` + "`" + ` |
208-
| "worktree_dir must not be empty" | Bad config | Check ` + "`" + `.rimba/settings.toml` + "`" + ` |
209+
| "config not found" | rimba not initialized | Run ` + "`" + `rimba init` + "`" + ` |
209210
| "branch already exists" | Task name in use | Pick a different task name |
210211
| "worktree has uncommitted changes" | Dirty worktree | Commit or stash changes, or use ` + "`" + `--force` + "`" + ` |
211212

0 commit comments

Comments
 (0)