im-pickle-rick 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +242 -0
- package/bin.js +3 -0
- package/dist/pickle +0 -0
- package/dist/worker-executor.js +207 -0
- package/package.json +53 -0
- package/src/games/GameSidebarManager.test.ts +64 -0
- package/src/games/GameSidebarManager.ts +78 -0
- package/src/games/gameboy/GameboyView.test.ts +25 -0
- package/src/games/gameboy/GameboyView.ts +100 -0
- package/src/games/gameboy/gameboy-polyfills.ts +313 -0
- package/src/games/index.test.ts +9 -0
- package/src/games/index.ts +4 -0
- package/src/games/snake/SnakeGame.test.ts +35 -0
- package/src/games/snake/SnakeGame.ts +145 -0
- package/src/games/snake/SnakeView.test.ts +25 -0
- package/src/games/snake/SnakeView.ts +290 -0
- package/src/index.test.ts +24 -0
- package/src/index.ts +141 -0
- package/src/services/commands/worker.test.ts +14 -0
- package/src/services/commands/worker.ts +262 -0
- package/src/services/config/index.ts +2 -0
- package/src/services/config/settings.test.ts +42 -0
- package/src/services/config/settings.ts +220 -0
- package/src/services/config/state.test.ts +88 -0
- package/src/services/config/state.ts +130 -0
- package/src/services/config/types.ts +39 -0
- package/src/services/execution/index.ts +1 -0
- package/src/services/execution/pickle-source.test.ts +88 -0
- package/src/services/execution/pickle-source.ts +264 -0
- package/src/services/execution/prompt.test.ts +93 -0
- package/src/services/execution/prompt.ts +322 -0
- package/src/services/execution/sequential.test.ts +91 -0
- package/src/services/execution/sequential.ts +422 -0
- package/src/services/execution/worker-client.ts +94 -0
- package/src/services/execution/worker-executor.ts +41 -0
- package/src/services/execution/worker.test.ts +73 -0
- package/src/services/git/branch.test.ts +147 -0
- package/src/services/git/branch.ts +128 -0
- package/src/services/git/diff.test.ts +113 -0
- package/src/services/git/diff.ts +323 -0
- package/src/services/git/index.ts +4 -0
- package/src/services/git/pr.test.ts +104 -0
- package/src/services/git/pr.ts +192 -0
- package/src/services/git/worktree.test.ts +99 -0
- package/src/services/git/worktree.ts +141 -0
- package/src/services/providers/base.test.ts +86 -0
- package/src/services/providers/base.ts +438 -0
- package/src/services/providers/codex.test.ts +39 -0
- package/src/services/providers/codex.ts +208 -0
- package/src/services/providers/gemini.test.ts +40 -0
- package/src/services/providers/gemini.ts +169 -0
- package/src/services/providers/index.test.ts +28 -0
- package/src/services/providers/index.ts +41 -0
- package/src/services/providers/opencode.test.ts +64 -0
- package/src/services/providers/opencode.ts +228 -0
- package/src/services/providers/types.ts +44 -0
- package/src/skills/code-implementer.md +105 -0
- package/src/skills/code-researcher.md +78 -0
- package/src/skills/implementation-planner.md +105 -0
- package/src/skills/plan-reviewer.md +100 -0
- package/src/skills/prd-drafter.md +123 -0
- package/src/skills/research-reviewer.md +79 -0
- package/src/skills/ruthless-refactorer.md +52 -0
- package/src/skills/ticket-manager.md +135 -0
- package/src/types/index.ts +2 -0
- package/src/types/rpc.ts +14 -0
- package/src/types/tasks.ts +50 -0
- package/src/types.d.ts +9 -0
- package/src/ui/common.ts +28 -0
- package/src/ui/components/FilePickerView.test.ts +79 -0
- package/src/ui/components/FilePickerView.ts +161 -0
- package/src/ui/components/MultiLineInput.test.ts +27 -0
- package/src/ui/components/MultiLineInput.ts +233 -0
- package/src/ui/components/SessionChip.test.ts +69 -0
- package/src/ui/components/SessionChip.ts +481 -0
- package/src/ui/components/ToyboxSidebar.test.ts +36 -0
- package/src/ui/components/ToyboxSidebar.ts +329 -0
- package/src/ui/components/refactor_plan.md +35 -0
- package/src/ui/controllers/DashboardController.integration.test.ts +43 -0
- package/src/ui/controllers/DashboardController.ts +650 -0
- package/src/ui/dashboard.test.ts +43 -0
- package/src/ui/dashboard.ts +309 -0
- package/src/ui/dialogs/DashboardDialog.test.ts +146 -0
- package/src/ui/dialogs/DashboardDialog.ts +399 -0
- package/src/ui/dialogs/Dialog.test.ts +50 -0
- package/src/ui/dialogs/Dialog.ts +241 -0
- package/src/ui/dialogs/DialogSidebar.test.ts +60 -0
- package/src/ui/dialogs/DialogSidebar.ts +71 -0
- package/src/ui/dialogs/DiffViewDialog.test.ts +57 -0
- package/src/ui/dialogs/DiffViewDialog.ts +510 -0
- package/src/ui/dialogs/PRPreviewDialog.test.ts +50 -0
- package/src/ui/dialogs/PRPreviewDialog.ts +346 -0
- package/src/ui/dialogs/test-utils.ts +232 -0
- package/src/ui/file-picker-utils.test.ts +71 -0
- package/src/ui/file-picker-utils.ts +200 -0
- package/src/ui/input-chrome.test.ts +62 -0
- package/src/ui/input-chrome.ts +172 -0
- package/src/ui/logger.test.ts +68 -0
- package/src/ui/logger.ts +45 -0
- package/src/ui/mock-factory.ts +6 -0
- package/src/ui/spinner.test.ts +65 -0
- package/src/ui/spinner.ts +41 -0
- package/src/ui/test-setup.ts +300 -0
- package/src/ui/theme.test.ts +23 -0
- package/src/ui/theme.ts +16 -0
- package/src/ui/views/LandingView.integration.test.ts +21 -0
- package/src/ui/views/LandingView.test.ts +24 -0
- package/src/ui/views/LandingView.ts +221 -0
- package/src/ui/views/LogView.test.ts +24 -0
- package/src/ui/views/LogView.ts +277 -0
- package/src/ui/views/ToyboxView.test.ts +46 -0
- package/src/ui/views/ToyboxView.ts +323 -0
- package/src/utils/clipboard.test.ts +86 -0
- package/src/utils/clipboard.ts +100 -0
- package/src/utils/index.test.ts +68 -0
- package/src/utils/index.ts +95 -0
- package/src/utils/persona.test.ts +12 -0
- package/src/utils/persona.ts +8 -0
- package/src/utils/project-root.test.ts +38 -0
- package/src/utils/project-root.ts +22 -0
- package/src/utils/resources.test.ts +64 -0
- package/src/utils/resources.ts +92 -0
- package/src/utils/search.test.ts +48 -0
- package/src/utils/search.ts +103 -0
- package/src/utils/session-tracker.test.ts +46 -0
- package/src/utils/session-tracker.ts +67 -0
- package/src/utils/spinner.test.ts +54 -0
- package/src/utils/spinner.ts +87 -0
package/README.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Pickle Rick 🥒
|
|
2
|
+
|
|
3
|
+
## 📥 Installation
|
|
4
|
+
|
|
5
|
+
### From npm
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g im-pickle-rick
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### From Source
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/galz10/pickle-rick-extension.git
|
|
15
|
+
cd pickle-rick-extension/cli
|
|
16
|
+
bun install
|
|
17
|
+
bun link
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 📋 Prerequisites
|
|
21
|
+
|
|
22
|
+
- **[Bun](https://bun.sh/)**: Version `>= 1.0.0` - JavaScript runtime
|
|
23
|
+
- **Git**: Required for worktree isolation
|
|
24
|
+
- **AI Provider**: Gemini CLI, OpenCode, or another supported provider
|
|
25
|
+
|
|
26
|
+
> [!WARNING]
|
|
27
|
+
> **USE AT YOUR OWN RISK.** This CLI orchestrates autonomous AI coding agents that modify files and execute commands. While sessions run in isolated git worktrees, the agent may behave unexpectedly and consume significant tokens. Always review changes before merging.
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
> "I turned myself into a CLI tool, Morty! I'm Pickle Riiiiick!"
|
|
32
|
+
|
|
33
|
+
Pickle Rick is an autonomous coding agent orchestrator with a beautiful TUI (Terminal UI) dashboard. Point it at a task, walk away, and let a hyper-intelligent AI work through your coding problems using a structured engineering workflow - all running safely in isolated git worktrees.
|
|
34
|
+
|
|
35
|
+
## 🚀 Overview
|
|
36
|
+
|
|
37
|
+
Pickle Rick executes complex coding tasks through an iterative AI agent loop:
|
|
38
|
+
|
|
39
|
+
1. **PRD** - Draft Product Requirements Document
|
|
40
|
+
2. **Breakdown** - Create atomic tickets from requirements
|
|
41
|
+
3. **Research** - Analyze codebase patterns and data flows
|
|
42
|
+
4. **Plan** - Design technical implementation approach
|
|
43
|
+
5. **Implement** - Execute with rigorous testing
|
|
44
|
+
6. **Refactor** - Cleanup and eliminate "AI slop"
|
|
45
|
+
|
|
46
|
+
## 🥒 The Pickle Rick Method
|
|
47
|
+
|
|
48
|
+
This CLI implements the **Pickle Rick technique** - an iterative, self-referential AI development loop where the agent continuously improves its work until completion.
|
|
49
|
+
|
|
50
|
+
### How It Works
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Launch the TUI dashboard
|
|
54
|
+
pickle
|
|
55
|
+
|
|
56
|
+
# Or run directly with a prompt
|
|
57
|
+
pickle "Implement JWT authentication"
|
|
58
|
+
|
|
59
|
+
# The agent automatically:
|
|
60
|
+
# 1. Creates an isolated git worktree
|
|
61
|
+
# 2. Works through the task phases
|
|
62
|
+
# 3. Iterates until completion
|
|
63
|
+
# 4. Offers to merge changes back
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Core Concepts
|
|
67
|
+
|
|
68
|
+
- **Git Worktree Isolation**: Each session runs in a separate worktree, preventing conflicts with your main branch
|
|
69
|
+
- **State Persistence**: Session state saved to disk, allowing resume after interruption
|
|
70
|
+
- **Streaming Output**: Real-time progress updates in the TUI
|
|
71
|
+
- **Multi-Provider Support**: Works with Gemini, Claude, OpenCode, Cursor, and more
|
|
72
|
+
|
|
73
|
+
## 🛠️ Usage
|
|
74
|
+
|
|
75
|
+
### Launch TUI Dashboard
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pickle
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Opens the interactive terminal interface where you can:
|
|
82
|
+
- Enter prompts for new coding tasks
|
|
83
|
+
- View and manage existing sessions
|
|
84
|
+
- Monitor task progress in real-time
|
|
85
|
+
|
|
86
|
+
### Run with a Prompt
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pickle "Your task description here"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Examples:**
|
|
93
|
+
```bash
|
|
94
|
+
pickle "Add unit tests for the authentication module"
|
|
95
|
+
pickle "Refactor the database layer to use connection pooling"
|
|
96
|
+
pickle "Fix the bug where users can't logout on mobile"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Command Options
|
|
100
|
+
|
|
101
|
+
| Option | Description | Default |
|
|
102
|
+
|--------|-------------|---------|
|
|
103
|
+
| `-m, --max-iterations <n>` | Maximum agent iterations | `20` |
|
|
104
|
+
| `-r, --resume <path>` | Resume an existing session | - |
|
|
105
|
+
| `--completion-promise <text>` | Stop when this text appears | `"I AM DONE"` |
|
|
106
|
+
| `--tui` | Force TUI mode | `false` |
|
|
107
|
+
|
|
108
|
+
### Additional Commands
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# List all sessions
|
|
112
|
+
pickle sessions
|
|
113
|
+
|
|
114
|
+
# Validate settings file
|
|
115
|
+
pickle validate-settings
|
|
116
|
+
|
|
117
|
+
# Auto-fix common settings issues
|
|
118
|
+
pickle validate-settings --fix
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## ⚙️ Configuration
|
|
122
|
+
|
|
123
|
+
Settings are stored at `~/.pickle/settings.json`:
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"model": {
|
|
128
|
+
"provider": "gemini",
|
|
129
|
+
"model": "gemini-2.0-flash"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Supported Providers
|
|
135
|
+
|
|
136
|
+
| Provider | Value | Description |
|
|
137
|
+
|----------|-------|-------------|
|
|
138
|
+
| Gemini | `"gemini"` | Google Gemini CLI (default) |
|
|
139
|
+
| OpenCode | `"opencode"` | OpenCode CLI |
|
|
140
|
+
| Claude | `"claude"` | Anthropic Claude |
|
|
141
|
+
| Cursor | `"cursor"` | Cursor AI |
|
|
142
|
+
| Codex | `"codex"` | OpenAI Codex |
|
|
143
|
+
| Qwen | `"qwen"` | Alibaba Qwen |
|
|
144
|
+
| Copilot | `"copilot"` | GitHub Copilot |
|
|
145
|
+
|
|
146
|
+
## 🔍 Session Management
|
|
147
|
+
|
|
148
|
+
### Session Storage
|
|
149
|
+
|
|
150
|
+
Sessions are stored in:
|
|
151
|
+
- **Local**: `.pickle/sessions/<date-hash>/` in your project
|
|
152
|
+
- **Worktrees**: `.pickle/worktrees/session-<name>/` for isolated execution
|
|
153
|
+
- **Global**: `~/.gemini/extensions/pickle-rick/sessions/`
|
|
154
|
+
|
|
155
|
+
### Resuming Sessions
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Resume a specific session
|
|
159
|
+
pickle -r .pickle/sessions/2024-01-15-abc123/
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The agent continues from where it left off with full context preserved.
|
|
163
|
+
|
|
164
|
+
## 📂 Project Structure
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
cli/
|
|
168
|
+
├── docs/ # Documentation
|
|
169
|
+
│ ├── INSTALLATION.md # Setup guide
|
|
170
|
+
│ ├── USAGE.md # Command reference
|
|
171
|
+
│ ├── CONFIGURATION.md# Settings guide
|
|
172
|
+
│ └── ARCHITECTURE.md # Technical design
|
|
173
|
+
├── src/
|
|
174
|
+
│ ├── index.ts # CLI entry point
|
|
175
|
+
│ ├── services/
|
|
176
|
+
│ │ ├── config/ # State & settings management
|
|
177
|
+
│ │ ├── execution/ # Orchestrator loop logic
|
|
178
|
+
│ │ ├── git/ # Git operations (worktree, diff, PR)
|
|
179
|
+
│ │ └── providers/ # AI provider integrations
|
|
180
|
+
│ ├── ui/ # TUI components and views
|
|
181
|
+
│ ├── games/ # Easter egg games 🎮
|
|
182
|
+
│ └── utils/ # Utility functions
|
|
183
|
+
└── dist/ # Compiled output (after build)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## 🏗️ Development
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Install dependencies
|
|
190
|
+
bun install
|
|
191
|
+
|
|
192
|
+
# Run in development mode
|
|
193
|
+
bun run dev
|
|
194
|
+
|
|
195
|
+
# Build production executable
|
|
196
|
+
bun run build
|
|
197
|
+
|
|
198
|
+
# Type check
|
|
199
|
+
bun run check
|
|
200
|
+
|
|
201
|
+
# Run tests
|
|
202
|
+
bun test
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## ✅ When to Use Pickle Rick
|
|
206
|
+
|
|
207
|
+
**Good for:**
|
|
208
|
+
- Well-defined tasks with clear success criteria
|
|
209
|
+
- Tasks requiring iteration and refinement
|
|
210
|
+
- Greenfield features where you can walk away
|
|
211
|
+
- Tasks with automatic verification (tests, linters)
|
|
212
|
+
|
|
213
|
+
**Not good for:**
|
|
214
|
+
- Tasks requiring human judgment mid-execution
|
|
215
|
+
- One-shot simple operations
|
|
216
|
+
- Tasks with unclear success criteria
|
|
217
|
+
- Production debugging
|
|
218
|
+
|
|
219
|
+
## 🛡️ Safety & Sandboxing
|
|
220
|
+
|
|
221
|
+
Pickle Rick executes code autonomously. Safety features include:
|
|
222
|
+
|
|
223
|
+
- **Git Worktree Isolation**: Changes happen in separate worktrees
|
|
224
|
+
- **No Auto-Push**: Changes are never pushed without explicit action
|
|
225
|
+
- **Merge Review**: Always review changes before merging to main
|
|
226
|
+
|
|
227
|
+
For additional safety, run in a sandboxed environment (Docker, VM) for untrusted tasks.
|
|
228
|
+
|
|
229
|
+
## 📚 Documentation
|
|
230
|
+
|
|
231
|
+
- [Installation & Build](./docs/INSTALLATION.md) - Prerequisites and setup
|
|
232
|
+
- [Usage & Commands](./docs/USAGE.md) - Full CLI reference
|
|
233
|
+
- [Configuration](./docs/CONFIGURATION.md) - Settings and providers
|
|
234
|
+
- [Architecture](./docs/ARCHITECTURE.md) - Technical design
|
|
235
|
+
|
|
236
|
+
## ⚖️ License
|
|
237
|
+
|
|
238
|
+
MIT
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
> "Wubba Lubba Dub-Dub! 🥒"
|
package/bin.js
ADDED
package/dist/pickle
ADDED
|
Binary file
|