@polka-codes/cli 0.9.46 → 0.9.48
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 +72 -50
- package/dist/index.js +71706 -77109
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://bun.sh)
|
|
8
8
|
[](https://www.typescriptlang.org)
|
|
9
9
|
|
|
10
|
-
The Polka Codes CLI provides a powerful command-line interface for interacting with AI-powered coding assistants. It offers features like
|
|
10
|
+
The Polka Codes CLI provides a powerful command-line interface for interacting with AI-powered coding assistants. It offers features like code generation, implementation planning, bug fixing, and pull request reviews.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -22,48 +22,66 @@ yarn global add @polka-codes/cli
|
|
|
22
22
|
bun add -g @polka-codes/cli
|
|
23
23
|
|
|
24
24
|
# Or run directly with npx
|
|
25
|
-
npx @polka-codes/cli
|
|
25
|
+
npx @polka-codes/cli "Your task description"
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## Commands
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
The primary way to use Polka is by providing a task description directly:
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
```bash
|
|
33
|
+
polka "implement user authentication"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The CLI will intelligently determine the best workflow to handle your request. For more specific tasks, you can use the following commands:
|
|
37
|
+
|
|
38
|
+
### `code`
|
|
39
|
+
|
|
40
|
+
Generate code based on a description.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
polka code "create a React component for a login form"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### `plan`
|
|
47
|
+
|
|
48
|
+
Create an implementation plan for a new feature or refactor.
|
|
33
49
|
|
|
34
50
|
```bash
|
|
35
|
-
polka
|
|
36
|
-
# or simply
|
|
37
|
-
polka
|
|
51
|
+
polka plan "refactor the database schema to support multi-tenancy"
|
|
38
52
|
```
|
|
39
53
|
|
|
40
|
-
###
|
|
54
|
+
### `epic`
|
|
41
55
|
|
|
42
|
-
|
|
56
|
+
Break down a large task into smaller, manageable sub-tasks.
|
|
43
57
|
|
|
44
58
|
```bash
|
|
45
|
-
polka
|
|
46
|
-
# or pipe input
|
|
47
|
-
echo "optimize database queries" | polka task
|
|
59
|
+
polka epic "build a new e-commerce platform"
|
|
48
60
|
```
|
|
49
61
|
|
|
50
|
-
###
|
|
62
|
+
### `fix`
|
|
51
63
|
|
|
52
|
-
|
|
64
|
+
Identify and fix bugs in your codebase.
|
|
53
65
|
|
|
54
66
|
```bash
|
|
55
|
-
polka
|
|
67
|
+
polka fix "the login button is not working on the mobile app"
|
|
56
68
|
```
|
|
57
69
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
70
|
+
### `review`
|
|
71
|
+
|
|
72
|
+
Review a pull request.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
polka review "https://github.com/my-org/my-repo/pull/123"
|
|
76
|
+
```
|
|
63
77
|
|
|
64
|
-
###
|
|
78
|
+
### `meta`
|
|
65
79
|
|
|
66
|
-
|
|
80
|
+
The `meta` command orchestrates complex workflows by running other commands in sequence. It's used internally by the CLI but can also be used for advanced use cases.
|
|
81
|
+
|
|
82
|
+
### `init`
|
|
83
|
+
|
|
84
|
+
Initialize Polka Codes configuration for your project.
|
|
67
85
|
|
|
68
86
|
```bash
|
|
69
87
|
# Create local config
|
|
@@ -75,23 +93,27 @@ polka init --global
|
|
|
75
93
|
|
|
76
94
|
### Git Integration
|
|
77
95
|
|
|
78
|
-
|
|
96
|
+
#### `commit`
|
|
97
|
+
|
|
98
|
+
Generate a commit message based on your staged changes.
|
|
79
99
|
|
|
80
100
|
```bash
|
|
81
101
|
# Generate commit message for staged changes
|
|
82
102
|
polka commit
|
|
83
103
|
|
|
84
|
-
# Generate commit message with context
|
|
104
|
+
# Generate commit message with additional context
|
|
85
105
|
polka commit "closes #123"
|
|
86
106
|
|
|
87
107
|
# Stage all changes and commit
|
|
88
108
|
polka commit -a
|
|
89
109
|
```
|
|
90
110
|
|
|
91
|
-
|
|
111
|
+
#### `pr`
|
|
112
|
+
|
|
113
|
+
Create a pull request with an AI-generated title and description.
|
|
92
114
|
|
|
93
115
|
```bash
|
|
94
|
-
# Create PR
|
|
116
|
+
# Create PR for the current branch
|
|
95
117
|
polka pr
|
|
96
118
|
|
|
97
119
|
# Create PR with additional context
|
|
@@ -156,41 +178,41 @@ rules: |
|
|
|
156
178
|
## Features
|
|
157
179
|
|
|
158
180
|
- 🤖 Multiple AI provider support
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
- 🔄 Git workflow integration
|
|
162
|
-
-
|
|
163
|
-
-
|
|
181
|
+
- 🧠 Intelligent workflow execution
|
|
182
|
+
- 💻 Code generation, planning, and bug fixing
|
|
183
|
+
- 🔄 Git workflow integration (commit messages and PRs)
|
|
184
|
+
- 🔎 Pull request reviews
|
|
185
|
+
- 📊 Project-specific configuration and commands
|
|
164
186
|
- 🔑 Secure API key management
|
|
165
187
|
- 📝 Detailed logging with `--verbose`
|
|
166
188
|
|
|
167
189
|
## Usage Tips
|
|
168
190
|
|
|
169
|
-
1.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
191
|
+
1. For general tasks, let Polka figure it out:
|
|
192
|
+
```bash
|
|
193
|
+
polka "add a dark mode toggle to the settings page"
|
|
194
|
+
```
|
|
173
195
|
|
|
174
|
-
2.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
196
|
+
2. Create a plan before implementing a large feature:
|
|
197
|
+
```bash
|
|
198
|
+
polka plan "migrate the frontend from Vue to React"
|
|
199
|
+
```
|
|
178
200
|
|
|
179
|
-
3.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
201
|
+
3. Combine with your git workflow:
|
|
202
|
+
```bash
|
|
203
|
+
git add . && polka commit && polka pr
|
|
204
|
+
```
|
|
183
205
|
|
|
184
|
-
4.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
206
|
+
4. Get help with a bug:
|
|
207
|
+
```bash
|
|
208
|
+
polka fix "users are reporting a 500 error on the checkout page" --verbose
|
|
209
|
+
```
|
|
188
210
|
|
|
189
211
|
## Requirements
|
|
190
212
|
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
- GitHub CLI (for
|
|
213
|
+
- Bun (v1.0.0+)
|
|
214
|
+
- `git` (for `commit` and `pr` commands)
|
|
215
|
+
- `GitHub CLI (gh)` (for `pr` command)
|
|
194
216
|
|
|
195
217
|
---
|
|
196
218
|
|