Skip to content

Commit c70f16c

Browse files
committed
Refactor README to clarify project purpose and workflow
Update project description, positioning, and documentation to better articulate the unique value proposition of poorcoder as a lightweight AI coding assistant toolkit
1 parent 8b7a6e5 commit c70f16c

File tree

1 file changed

+58
-78
lines changed

1 file changed

+58
-78
lines changed

README.md

Lines changed: 58 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
1-
# Minimalistic AI Coding Assistant
1+
# poorcoder
22

3-
A collection of lightweight Bash scripts to enhance your coding workflow with AI assistance. These tools integrate seamlessly with your terminal workflow, allowing you to leverage AI models without disrupting your development process.
3+
A collection of lightweight Bash scripts to enhance your coding workflow with AI assistance. These tools bridge the gap between web-based AI interfaces and your terminal, allowing you to leverage subscription-based LLMs (like Claude.ai or Grok) without disrupting your development process.
44

55
## Overview
66

77
This repository contains three main tools:
88

9-
1. **`context`** - Extracts code context to send to an LLM
9+
1. **`context`** - Extracts code context from your project to send to an LLM
1010
2. **`apply-md`** - Applies code changes from LLM's markdown response
1111
3. **`git-context`** - Generates git context for AI-assisted commit messages
1212

13+
## Why poorcoder?
14+
15+
Unlike IDE-integrated solutions (Cursor, aider, Claude Code, etc.), poorcoder is designed to work with your existing web-based LLM subscriptions (~$20/month) while maintaining your terminal workflow. This approach:
16+
17+
- Is more cost-effective than dedicated API usage
18+
- Leverages the polished UX of web/mobile LLM interfaces
19+
- Preserves your terminal-based development workflow
20+
- Follows Unix philosophy (small tools doing one thing well)
21+
1322
## Installation
1423

1524
Simply clone this repository and make the scripts executable:
1625

1726
```bash
18-
git clone https://github.com/yourusername/ai-coding-assistant.git
19-
cd ai-coding-assistant
27+
git clone https://github.com/vgrichina/poorcoder.git
28+
cd poorcoder
2029
chmod +x context apply-md git-context
2130
```
2231

@@ -26,27 +35,31 @@ You can either use the scripts directly from this folder or add them to your PAT
2635

2736
### 1. `context` - Code Context Generator
2837

29-
Generates contextual information from a codebase to send to an LLM.
38+
Extracts relevant code context from your project to send to a web-based LLM.
3039

3140
```bash
32-
# Using file patterns
33-
./context --include="src/*.js" --exclude="*.test.js" > context.md
41+
# Copy context directly to clipboard (macOS)
42+
./context --include="src/*.js" --exclude="*.test.js" | pbcopy
3443

3544
# Using direct patterns as arguments
36-
./context "src/*.js" "README.md" > context.md
45+
./context "src/*.js" "README.md" | pbcopy
3746

3847
# Including git information
39-
./context --include="src/*.js" --git > context.md
48+
./context --include="src/*.js" --git | pbcopy
4049
```
4150

4251
[See full documentation for context](./docs/context.md)
4352

4453
### 2. `apply-md` - Markdown Code Applier
4554

46-
Extracts code blocks from markdown and applies changes to your filesystem.
55+
Extracts code blocks from markdown (typically LLM responses) and applies changes to your filesystem.
4756

4857
```bash
49-
cat llm_response.md | ./apply-md --dry-run --verbose
58+
# Paste LLM response from clipboard (macOS)
59+
pbpaste | ./apply-md --dry-run --verbose
60+
61+
# Apply changes and create missing files
62+
pbpaste | ./apply-md --create-missing
5063
```
5164

5265
[See full documentation for apply-md](./docs/apply-md.md)
@@ -56,105 +69,72 @@ cat llm_response.md | ./apply-md --dry-run --verbose
5669
Generates git-related context to help LLMs create meaningful commit messages.
5770

5871
```bash
59-
./git-context --recent-commits=5 --prompt=prompts/conventional_commit.txt > commit_context.txt
72+
# Generate context, then use with API-based LLM via CLI tool
73+
git commit -am "$(./git-context | llm -m openrouter/anthropic/claude-3.5-haiku)" -e
6074
```
6175

6276
[See full documentation for git-context](./docs/git-context.md)
6377

6478
## Usage Workflows
6579

66-
### Unix-style Pipelines
80+
### Dual Modality Approach
6781

68-
These tools are designed to work seamlessly in Unix pipelines, allowing you to create powerful workflows with minimal effort:
82+
poorcoder supports two primary workflows:
83+
84+
#### 1. Web UI LLM + Terminal
85+
86+
Ideal for complex interactions and leveraging your LLM subscription:
6987

7088
```bash
71-
# Copy code context directly to clipboard (macOS)
72-
./context --include="src/api/*.js" | pbcopy
89+
# 1. Generate context and copy to clipboard
90+
./context --include="src/components/*.js" | pbcopy
7391

74-
# Generate and apply code changes directly from clipboard (macOS)
75-
pbpaste | ./apply-md
92+
# 2. Paste into web UI (Claude.ai, Grok, etc.), ask for changes
93+
94+
# 3. Copy response and apply changes
95+
pbpaste | ./apply-md --create-missing
96+
```
7697

77-
# Auto-generate commit message using an LLM CLI tool
98+
#### 2. All-Terminal with CLI LLM
99+
100+
For quick operations or automation using LLM CLI tools:
101+
102+
```bash
103+
# Generate commit message using LLM CLI
78104
git commit -am "$(./git-context | llm -m openrouter/anthropic/claude-3.5-haiku)" -e
79105

80-
# Stream context to an LLM and apply changes in one command
81-
./context --include="src/components/Button.js" | llm "Refactor this component to use hooks" | ./apply-md
106+
# Fix a small issue directly in terminal
107+
./context --include="src/buggy-file.js" | llm "Fix the null reference bug" | ./apply-md
82108
```
83109

84-
### Scenario: Bug Fix Workflow
85-
86-
Let's walk through a complete workflow for fixing a bug:
110+
### Scenario: Bug Fix in a Complex Project
87111

88-
1. Identify the files involved in the bug:
112+
1. Gather relevant context:
89113
```bash
90-
# Generate context for the relevant files
91114
./context --include="src/utils/validation.js" --include="src/components/Form.js" | pbcopy
92115
```
93116

94-
2. Paste the context into your preferred AI assistant's web UI with your request:
95-
"There's a bug where form validation fails when empty strings are submitted. Please fix it."
117+
2. Paste into Claude.ai or Grok with your request:
118+
"There's a bug where form validation fails when empty strings are submitted. Fix it while maintaining our validation approach."
96119

97-
3. Copy the AI's response and apply the suggested changes:
120+
3. Copy the AI's response and apply changes:
98121
```bash
99122
pbpaste | ./apply-md --dry-run # Preview changes
100123
pbpaste | ./apply-md # Apply changes
101124
```
102125

103-
4. Generate an appropriate commit message:
126+
4. Generate a commit message:
104127
```bash
105-
# Auto-generate semantically meaningful commit message
106-
./git-context | llm "Generate a conventional commit message" | git commit -F -
107-
108-
# Or with manual editing
109-
git commit -am "$(./git-context | llm "Write a commit message")" -e
128+
git commit -am "$(./git-context | llm -m openrouter/anthropic/claude-3.5-haiku)" -e
110129
```
111130

112-
### Scenario: Code Refactoring with Git Integration
113-
114-
When working on larger refactoring tasks:
115-
116-
1. Generate context with git history for better understanding:
117-
```bash
118-
./context --include="src/utils/parser.js" --git > parser_context.txt
119-
```
120-
121-
2. Send the context to an LLM with your request (e.g., "Refactor this parser to improve performance")
122-
123-
3. Apply the suggested changes:
124-
```bash
125-
# Save LLM response to response.md or pipe directly
126-
cat response.md | ./apply-md --dry-run
127-
cat response.md | ./apply-md
128-
```
129-
130-
4. Generate commit context and message in one step:
131-
```bash
132-
git commit -am "$(./git-context --prompt=prompts/conventional_commit.txt | llm "Generate a detailed commit message")" -e
133-
```
134-
135-
## Customization
136-
137-
All prompts used in the scripts are stored in the `prompts/` directory as text files, making them easy to customize for your specific needs.
138-
139-
### Custom Prompts
140-
141-
You can create your own prompt templates for different scenarios:
142-
143-
```bash
144-
# Create a custom prompt for code review
145-
echo "Please review this code and identify potential bugs and security issues." > prompts/review_prompt.txt
146-
147-
# Use your custom prompt with the context generator
148-
./context --include="src/*.js" | cat - prompts/review_prompt.txt | llm
149-
```
150-
151-
### Integration with Other Tools
131+
## Integration with Other Tools
152132

153-
These scripts are designed to work with various LLM CLI tools and other Unix utilities:
133+
poorcoder works with various tools to create a seamless workflow:
154134

135+
- **Web LLMs**: Claude.ai, ChatGPT, Grok, etc.
155136
- **LLM CLI tools**: `llm`, `sgpt`, `chatgpt-cli`, etc.
156137
- **Clipboard utilities**: `pbcopy`/`pbpaste` (macOS), `xclip` (Linux)
157-
- **Text processing**: `sed`, `awk`, `grep`, etc.
158138
- **Version control**: `git`
159139

160140
## Contributing

0 commit comments

Comments
 (0)