{"id":24381921,"url":"https://github.com/dkmaker/aider-batch","last_synced_at":"2025-06-10T17:35:19.699Z","repository":{"id":271986477,"uuid":"915192792","full_name":"dkmaker/aider-batch","owner":"dkmaker","description":"A batch framwork that depends on Aider.Chat client","archived":false,"fork":false,"pushed_at":"2025-01-13T09:09:59.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T16:18:17.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkmaker.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}},"created_at":"2025-01-11T07:50:56.000Z","updated_at":"2025-01-13T09:10:02.000Z","dependencies_parsed_at":"2025-01-11T08:29:20.250Z","dependency_job_id":"4c50d868-8371-4fee-83b9-750392d20313","html_url":"https://github.com/dkmaker/aider-batch","commit_stats":null,"previous_names":["dkmaker/aider-batch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2Faider-batch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2Faider-batch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2Faider-batch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2Faider-batch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkmaker","download_url":"https://codeload.github.com/dkmaker/aider-batch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2Faider-batch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259118320,"owners_count":22807947,"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":[],"created_at":"2025-01-19T09:14:31.848Z","updated_at":"2025-06-10T17:35:19.680Z","avatar_url":"https://github.com/dkmaker.png","language":"JavaScript","readme":"# dkmaker-aider-batch\n\nA Node.js CLI tool for batch processing Aider commands using templates and configuration files.\n\n## Installation\n\n```bash\nnpx aider-batch create my-batch\n```\n\nThis will create a new directory with the following structure:\n\n```\n.aiderBatch_my-batch/\n  ├── prompt-template.md    # Template file with placeholders\n  └── batch-config.json     # Configuration file for batch processing\n```\n\nNote: Projects are created in a `.aiderBatch_` prefixed directory to keep them organized and easily identifiable.\n\n## Configuration\n\nThe `batch-config.json` file is created with example configuration that you can modify:\n\n```json\n{\n  \"global\": {\n    \"readFile\": [\n      \"docs/system-architecture.md\",    // System-wide documentation\n      \"docs/api-guidelines.md\",         // API standards\n      \"src/types/common.ts\"            // Shared type definitions\n    ],\n    \"file\": [\n      \"src/handlers/system.ts\"         // Reference implementation\n    ]\n  },\n  \"env\": {\n    \"ANTHROPIC_API_KEY\": \"your-api-key-here\"\n  },\n  \"params\": [\n    \"--no-suggest-shell-commands\",\n    \"--edit-format whole\",\n    \"--map-tokens 0\",\n    \"--cache-prompts\",\n    \"--no-stream\",\n    \"--no-auto-lint\",\n    \"--yes-always\",\n    \"--no-git\",\n    \"--no-auto-commits\"\n  ],\n  \"batches\": [\n    {\n      \"file\": [                        // Files to be modified\n        \"src/handlers/user.ts\",\n        \"src/handlers/admin.ts\"\n      ],\n      \"params\": [],\n      \"replaceVariables\": {            // Template variables\n        \"HandlerType\": \"System Handler\",\n        \"HandlerFile\": \"src/handlers/system.ts\",\n        \"Guidelines\": \"docs/api-guidelines.md\"\n      }\n    }\n  ]\n}\n```\n\nThis example configuration demonstrates a common use case: standardizing multiple system handlers based on a reference implementation and documentation.\n\n### Configuration Sections\n\n1. **global**: Settings that apply across all batch operations\n   - `readFile`: Array of files to be used as read-only context (matches Aider's --read argument)\n   - `file`: Array of files that may be modified (matches Aider's --file argument)\n   - Note: Read-only files can only be specified at the global level to prevent cache invalidation\n\n2. **env**: Environment variables set before invoking Aider\n   - These variables will be set in the environment before each Aider execution\n   - Common use case: setting API keys and other configuration\n\n3. **params**: Global parameters passed to every Aider invocation\n   - Default parameters that configure Aider's behavior\n   - These parameters are used for all batch operations\n   - Note: The --message-file parameter is handled internally by the tool\n\n4. **batches**: Array of file sets to process with the template\n   - `file`: Array of files to be modified (matches Aider's --file argument)\n   - `params`: Additional parameters for this set of files\n   - `replaceVariables`: Values to replace in the template for this set\n\n## Template File\n\nThe `prompt-template.md` file is created with example content that you can customize:\n\n```markdown\n# Update %%HandlerType%%\n\nPlease review and update the handler implementation in %%HandlerFile%% to ensure it follows our system architecture and API guidelines.\n\n## Context\nThe following files provide important context:\n- System Architecture: Explains our overall architecture and design principles\n- API Guidelines: Contains our API standards and best practices\n- Common Types: Shared type definitions used across handlers\n\n## Requirements\n1. Ensure the handler follows the structure shown in system.ts\n2. Apply the API guidelines from %%Guidelines%%\n3. Use appropriate types from common.ts\n4. Maintain consistent error handling patterns\n5. Add JSDoc comments for public methods\n\n## Task\nPlease analyze the implementation and:\n1. Update the code structure to match our standards\n2. Add proper type definitions\n3. Implement error handling\n4. Add documentation\n5. Ensure consistency with other handlers\n```\n\nThis example template provides clear instructions for standardizing handler implementations across a system.\n\n## Usage\n\n### Create a New Batch\n\n```bash\nnpx aider-batch create my-batch\n```\n\nThis will:\n1. Create a new `.aiderBatch_my-batch` directory\n2. Generate example configuration files\n3. Create a template with placeholders\n\nAfter creation, edit the batch-config.json file to configure your specific batch settings.\n\n### List Available Batches\n\n```bash\nnpx aider-batch list\n```\n\nShows all available batches in a table format with their locations.\n\n### Run a Batch\n\n```bash\nnpx aider-batch start my-batch\n```\n\nThis will:\n1. Load the batch configuration\n2. Set environment variables\n3. Process template variables\n4. Create LastMessage.txt with the processed template\n5. Execute Aider with the configured parameters and LastMessage.txt\n6. Clean up temporary files after completion\n\nNote: LastMessage.txt is used internally to pass the processed template to Aider. The file is overwritten on each batch operation and removed when processing completes.\n\n## Development and Testing\n\n### Local Development\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd dkmaker-aider-batch\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Create a symbolic link to test locally:\n```bash\nnpm link\n```\n\nNow you can use the tool locally with:\n```bash\naider-batch create test-batch\n```\n\n### Testing NPX Installation\n\n1. Create a test directory:\n```bash\nmkdir test-npx\ncd test-npx\n```\n\n2. Test the latest published version:\n```bash\nnpx aider-batch create test-batch\n```\n\n3. Test a specific version:\n```bash\nnpx aider-batch@1.0.0 create test-batch\n```\n\n### Testing Local Build with NPX\n\n1. Pack the project locally:\n```bash\nnpm pack\n```\n\n2. Create a test directory:\n```bash\nmkdir test-local-npx\ncd test-local-npx\n```\n\n3. Test the local package:\n```bash\nnpx ../dkmaker-aider-batch-1.0.0.tgz create test-batch\n```\n\n### Development Tips\n\n- After making changes, run `npm link` again to update the local installation\n- Use `npm pack` to test the package before publishing\n- Test all commands in a clean directory to ensure proper functionality\n- Check the generated .aiderBatch_ directories to verify correct file creation\n- Test with both relative and absolute paths in batch configurations\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkmaker%2Faider-batch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkmaker%2Faider-batch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkmaker%2Faider-batch/lists"}