@polka-codes/cli 0.9.46 → 0.9.47

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.
Files changed (3) hide show
  1. package/README.md +72 -50
  2. package/dist/index.js +71760 -77199
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Bun Version](https://img.shields.io/badge/Bun-v1.0.0+-brightgreen)](https://bun.sh)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue)](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 interactive chat, task execution, commit message generation, and pull request creation.
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
- ### Interactive Chat
30
+ The primary way to use Polka is by providing a task description directly:
31
31
 
32
- Start an interactive chat session with the AI assistant:
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 chat
36
- # or simply
37
- polka
51
+ polka plan "refactor the database schema to support multi-tenancy"
38
52
  ```
39
53
 
40
- ### Task Execution
54
+ ### `epic`
41
55
 
42
- Execute a specific task:
56
+ Break down a large task into smaller, manageable sub-tasks.
43
57
 
44
58
  ```bash
45
- polka task "improve error handling in auth module"
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
- ### Project Creation
62
+ ### `fix`
51
63
 
52
- Create a new project with AI assistance:
64
+ Identify and fix bugs in your codebase.
53
65
 
54
66
  ```bash
55
- polka create my-project
67
+ polka fix "the login button is not working on the mobile app"
56
68
  ```
57
69
 
58
- The command will:
59
- 1. Prompt for project location confirmation
60
- 2. Set up initial project structure
61
- 3. Configure basic dependencies
62
- 4. Generate starter code
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
- ### Configuration
78
+ ### `meta`
65
79
 
66
- Initialize Polka Codes configuration:
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
- Generate commit messages based on staged changes:
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
- Create pull requests with AI-generated details:
111
+ #### `pr`
112
+
113
+ Create a pull request with an AI-generated title and description.
92
114
 
93
115
  ```bash
94
- # Create PR with current branch changes
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
- - 💬 Interactive chat mode
160
- - 🎯 Task-focused commands
161
- - 🔄 Git workflow integration
162
- - 📊 Project analysis and configuration
163
- - 🛠️ Custom command integration
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. Use interactive mode for complex tasks:
170
- ```bash
171
- polka chat
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. Pipe tasks for automation:
175
- ```bash
176
- echo "update dependencies" | polka task
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. Combine with git workflow:
180
- ```bash
181
- git add . && polka commit && polka pr
182
- ```
201
+ 3. Combine with your git workflow:
202
+ ```bash
203
+ git add . && polka commit && polka pr
204
+ ```
183
205
 
184
- 4. Monitor AI usage:
185
- ```bash
186
- polka task "refactor auth" --verbose
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
- - Node.js 18+
192
- - Git (for commit/PR features)
193
- - GitHub CLI (for PR creation)
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