{"id":29115631,"url":"https://github.com/Strawberry-Computer/poorcoder","last_synced_at":"2025-06-29T11:13:22.948Z","repository":{"id":282999467,"uuid":"950353683","full_name":"Strawberry-Computer/poorcoder","owner":"Strawberry-Computer","description":"DIY Poor Man's AI Coder","archived":false,"fork":false,"pushed_at":"2025-05-16T21:58:14.000Z","size":142,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-23T03:42:49.903Z","etag":null,"topics":["ai","aider","vibe-coding"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Strawberry-Computer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-18T03:06:21.000Z","updated_at":"2025-06-05T00:47:44.000Z","dependencies_parsed_at":"2025-04-26T01:42:33.603Z","dependency_job_id":"dc6d22b9-721a-4303-b580-f7f51c3413b1","html_url":"https://github.com/Strawberry-Computer/poorcoder","commit_stats":null,"previous_names":["vgrichina/poorcoder","strawberry-computer/poorcoder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Strawberry-Computer/poorcoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Computer%2Fpoorcoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Computer%2Fpoorcoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Computer%2Fpoorcoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Computer%2Fpoorcoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Strawberry-Computer","download_url":"https://codeload.github.com/Strawberry-Computer/poorcoder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strawberry-Computer%2Fpoorcoder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262581512,"owners_count":23331925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","aider","vibe-coding"],"created_at":"2025-06-29T11:13:10.752Z","updated_at":"2025-06-29T11:13:22.909Z","avatar_url":"https://github.com/Strawberry-Computer.png","language":"Shell","funding_links":[],"categories":["AI Coding Agents"],"sub_categories":["General Purpose"],"readme":"# poorcoder\n\nA 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.\n\n## Overview\n\nThis repository contains four main tools:\n\n1. **`context`** - Extracts code context from your project to send to an LLM\n2. **`apply-md`** - Applies code changes from LLM's markdown response\n3. **`git-context`** - Generates git context for AI-assisted commit messages\n4. **`autocommit`** - Automatically creates AI-generated commit messages using git-context\n\n## Workflow\n\nHere's how poorcoder fits into your development workflow:\n\n![poorcoder Workflow Diagram](./images/poorcoder-workflow-diagram.svg)\n\n## Why poorcoder?\n\nUnlike IDE-integrated solutions (Cursor, aider, Claude Code, etc.), poorcoder is designed to work with your existing web-based LLM subscriptions (~$20-30/month) while maintaining your terminal workflow. \n\n![poorcoder vs. Other AI Coding Tools](./images/poorcoder-comparison-table.svg)\n\nKey benefits:\n- Is more cost-effective than dedicated API usage (which can cost $100-500/month for heavy use)\n- Leverages the polished UX of web/mobile LLM interfaces\n- Preserves your terminal-based development workflow\n- Follows Unix philosophy (small tools doing one thing well)\n\n## Installation\n\n### Standard Installation\n\nSimply clone this repository and make the scripts executable:\n\n```bash\ngit clone https://github.com/vgrichina/poorcoder.git\ncd poorcoder\nchmod +x context apply-md git-context autocommit\n```\n\nYou can either use the scripts directly from this folder or add them to your PATH for global access.\n\n### Project-Specific Installation (Recommended)\n\nFor heavy usage, copy the scripts and prompts directory directly into your project:\n\n```bash\n# Clone the repository\ngit clone https://github.com/vgrichina/poorcoder.git\n# Copy essential files to your project\ncp poorcoder/{context,apply-md,git-context,autocommit} /path/to/your/project/\ncp -r poorcoder/prompts /path/to/your/project/\n# Make scripts executable\nchmod +x /path/to/your/project/{context,apply-md,git-context,autocommit}\n```\n\nThis approach lets you customize both the scripts and prompts for your specific project workflow. You can also create custom aliases or wrapper scripts, for example:\n\n```bash\n# Create a simple autocommit script\necho '#!/bin/bash\ngit commit -am \"$(./git-context | llm -m openrouter/anthropic/claude-3.5-haiku)\" -e' \u003e autocommit\nchmod +x autocommit\n```\n\n## Scripts\n\nHere's a detailed overview of each script in poorcoder:\n\n![poorcoder Script Details](./images/poorcoder-script-details.svg)\n\n### 1. `context` - Code Context Generator\n\nExtracts relevant code context from your project to send to a web-based LLM.\n\n```bash\n# Basic usage with specific files\n./context file1.js file2.js\n\n# Copy context directly to clipboard (macOS)\n./context --include=\"src/*.js\" --exclude=\"*.test.js\" | pbcopy\n\n# Using direct patterns as arguments\n./context \"src/*.js\" \"README.md\" | pbcopy\n\n# Including git information\n./context --include=\"src/*.js\" --git | pbcopy\n```\n\n[See full documentation for context](./docs/context.md)\n\n### 2. `apply-md` - Markdown Code Applier\n\nExtracts code blocks from markdown (typically LLM responses) and applies changes to your filesystem.\n\n```bash\n# Basic usage with markdown input\ncat response.md | ./apply-md\n\n# Paste LLM response from clipboard (macOS)\npbpaste | ./apply-md --dry-run --verbose\n\n# Apply changes and create missing files\npbpaste | ./apply-md --create-missing\n```\n\n[See full documentation for apply-md](./docs/apply-md.md)\n\n### 3. `git-context` - Git Context Generator\n\nGenerates git-related context to help LLMs create meaningful commit messages.\n\n```bash\n# Basic usage\n./git-context\n\n# Generate context, then use with API-based LLM via CLI tool\ngit commit -am \"$(./git-context | llm -m openrouter/anthropic/claude-3.5-haiku)\" -e\n```\n\n[See full documentation for git-context](./docs/git-context.md)\n\n### 4. `autocommit` - Automated AI Commit Message Generator\n\nAutomatically creates commits with AI-generated commit messages using git-context.\n\n```bash\n# Basic usage - commits all changes with an AI-generated message\n./autocommit\n\n# The script opens an editor to allow you to review/edit the message before finalizing\n```\n\nThe autocommit script is a simple wrapper that:\n1. Uses git-context to gather information about your changes\n2. Passes that context to an LLM via the llm CLI tool\n3. Uses the generated message for a git commit\n4. Opens your editor to let you review/edit the message before finalizing\n\nThis script requires the `llm` CLI tool to be installed and configured with an appropriate LLM model.\n\n## Component Interaction\n\nThe following diagram shows how the different components of poorcoder interact with each other and with external systems:\n\n```mermaid\nflowchart TB\n    subgraph \"Terminal Environment\"\n        context[\"context\\n(Extract Code Context)\"]\n        applymd[\"apply-md\\n(Apply Code Changes)\"]\n        gitcontext[\"git-context\\n(Generate Git Info)\"]\n        autocommit[\"autocommit\\n(AI Commit Messages)\"]\n        clipboard[(\"Clipboard\\n(pbcopy/pbpaste)\")]\n        files[(\"Project Files\")]\n        git[(\"Git Repository\")]\n    end\n    \n    subgraph \"Web Environment\"\n        llm[\"Web LLM\\n(Claude.ai, Grok, etc.)\"]\n    end\n    \n    subgraph \"Optional CLI\"\n        llmcli[\"LLM CLI Tool\\n(e.g., llm, sgpt)\"]\n    end\n    \n    %% Connections for Web Workflow\n    context --\u003e|\"Extract context\"| files\n    context --\u003e|\"Copy to clipboard\"| clipboard\n    clipboard --\u003e|\"Paste context\"| llm\n    llm --\u003e|\"Generate code\"| clipboard\n    clipboard --\u003e|\"Paste response\"| applymd\n    applymd --\u003e|\"Update files\"| files\n    \n    %% Connections for Git workflow\n    gitcontext --\u003e|\"Extract changes\"| git\n    gitcontext --\u003e|\"Generate context\"| llmcli\n    llmcli --\u003e|\"Generate message\"| git\n    \n    %% Autocommit workflow\n    autocommit --\u003e|\"Uses\"| gitcontext\n    autocommit --\u003e|\"Uses\"| llmcli\n    autocommit --\u003e|\"Commits to\"| git\n    \n    %% Direct CLI workflow\n    context -.-\u003e|\"Direct pipe\"| llmcli\n    llmcli -.-\u003e|\"Direct pipe\"| applymd\n    \n    %% Styling\n    classDef tool fill:#4b6584,stroke:#333,stroke-width:1px,color:white\n    classDef storage fill:#f5cd79,stroke:#333,stroke-width:1px\n    classDef external fill:#6a89cc,stroke:#333,stroke-width:1px,color:white\n    classDef cli fill:#78e08f,stroke:#333,stroke-width:1px\n    \n    class context,applymd,gitcontext,autocommit tool\n    class files,clipboard,git storage\n    class llm external\n    class llmcli cli\n```\n\n## Usage Workflows\n\n### Dual Modality Approach\n\npoorcoder supports two primary workflows:\n\n#### 1. Web UI LLM + Terminal\n\nIdeal for complex interactions and leveraging your LLM subscription:\n\n```bash\n# 1. Generate context and copy to clipboard\n./context --include=\"src/components/*.js\" | pbcopy\n\n# 2. Paste into web UI (Claude.ai, Grok, etc.), ask for changes\n\n# 3. Copy response and apply changes\npbpaste | ./apply-md --create-missing\n```\n\n#### 2. All-Terminal with CLI LLM\n\nFor quick operations or automation using LLM CLI tools:\n\n```bash\n# Generate commit message using LLM CLI\ngit commit -am \"$(./git-context | llm -m openrouter/anthropic/claude-3.5-haiku)\" -e\n\n# Or use the autocommit script for a simpler workflow\n./autocommit\n\n# Fix a small issue directly in terminal\n./context --include=\"src/buggy-file.js\" | llm \"Fix the null reference bug\" | ./apply-md\n```\n\n### Scenario: Bug Fix in a Complex Project\n\n1. Gather relevant context:\n   ```bash\n   ./context --include=\"src/utils/validation.js\" --include=\"src/components/Form.js\" | pbcopy\n   ```\n\n2. Paste into Claude.ai or Grok with your request:\n   \"There's a bug where form validation fails when empty strings are submitted. Fix it while maintaining our validation approach.\"\n\n3. Copy the AI's response and apply changes:\n   ```bash\n   pbpaste | ./apply-md --dry-run  # Preview changes\n   pbpaste | ./apply-md            # Apply changes\n   ```\n\n4. Generate a commit message using autocommit:\n   ```bash\n   ./autocommit  # Automatically generates commit message and opens editor\n   ```\n\n## Integration with Other Tools\n\npoorcoder works with various tools to create a seamless workflow:\n\n- **Web LLMs**: Claude.ai, ChatGPT, Grok, etc.\n- **LLM CLI tools**: `llm`, `sgpt`, `chatgpt-cli`, etc.\n- **Clipboard utilities**: `pbcopy`/`pbpaste` (macOS), `xclip` (Linux)\n- **Version control**: `git`\n\n## Contributing\n\nContributions are welcome! Feel free to submit a pull request or open an issue to suggest improvements.\n\n## License\n\nThe Unlicense (public domain)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStrawberry-Computer%2Fpoorcoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStrawberry-Computer%2Fpoorcoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStrawberry-Computer%2Fpoorcoder/lists"}