{"id":13592991,"url":"https://github.com/kristoferlund/duet-gpt","last_synced_at":"2025-04-30T15:24:02.482Z","repository":{"id":169327680,"uuid":"645245078","full_name":"kristoferlund/duet-gpt","owner":"kristoferlund","description":"A conversational semi-autonomous developer assistant. AI pair programming without the copypasta.","archived":false,"fork":false,"pushed_at":"2023-06-19T13:12:11.000Z","size":5752,"stargazers_count":169,"open_issues_count":1,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-17T18:23:04.860Z","etag":null,"topics":["agent","ai","assistant","cli","gpt","gpt-4","llm","openai"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/kristoferlund.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2023-05-25T08:27:01.000Z","updated_at":"2025-03-11T20:32:45.000Z","dependencies_parsed_at":"2024-01-06T20:46:00.522Z","dependency_job_id":"142d1cf7-8ec0-4c2f-8ae5-3d22df01a9f9","html_url":"https://github.com/kristoferlund/duet-gpt","commit_stats":null,"previous_names":["kristoferlund/duet-gpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristoferlund%2Fduet-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristoferlund%2Fduet-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristoferlund%2Fduet-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristoferlund%2Fduet-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kristoferlund","download_url":"https://codeload.github.com/kristoferlund/duet-gpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251240622,"owners_count":21557731,"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":["agent","ai","assistant","cli","gpt","gpt-4","llm","openai"],"created_at":"2024-08-01T16:01:15.443Z","updated_at":"2025-04-30T15:24:02.454Z","avatar_url":"https://github.com/kristoferlund.png","language":"TypeScript","funding_links":[],"categories":["Conversational / General Agents","工具","CLIs","Learning","Agent Categories","Tools"],"sub_categories":["代理","Repositories","\u003ca name=\"Unclassified\"\u003e\u003c/a\u003eUnclassified","Agents"],"readme":"# DuetGPT\n\n**🎉 News:** DuetGPT no longer uses langchain but instead [OpenAI functions](https://openai.com/blog/function-calling-and-other-api-updates). This means a significant improvement in reliability and performance.\n\nDuetGPT is an experimental AI powered CLI tool and semi-autonomous agent that helps developers with coding tasks and file system tasks. The developer describes tasks to the AI who then issues commands or follow-up questions for clarification. After approval by the developer, **DuetGPT automatically executes the commands issued by the AI.**\n\nDuetGPT also does really well as a general bash helper.\n\nWorks with OpenAI models:\n\n- gpt-3.5-turbo-0613 (does not produce any great code though)\n- gpt-4-0613\n\nExample tasks:\n\n- Refactor index.js: add inline comments, improve variable naming.\n- Write a bash script that lists all cars in the database.\n- Find all files in current directory and subdirectories that contain the word \"DuetGPT\"\n- Write a PR description based on the commit messages in the PR.\n\nDuetGPT builds on OpenAI's GPT-4 language model and uses its conversational capabilities to engage in a two-way conversation with the developer. It uses the newly released feature of the OpenAI API that allows the AI to make [function calls](https://openai.com/blog/function-calling-and-other-api-updates).\n\n### ⚠️ DuetGPT has no guardrails! Make sure you understand the commands given by the AI before executing them. ⚠️\n\nHere is a 30 second demo, use DuetGPT to build a Node.js app that draws a mandelbrot fractal using ASCII characters to the console:\n\nhttps://github.com/kristoferlund/duet-gpt/assets/9698363/147bdf9d-28df-4421-9297-05abfeb53142\n\n## Setup\n\nInstall the DuetGPT CLI tool globally using npm:\n\n```bash\nnpm install -g duet-gpt\n```\n\n## Usage\n\nTo start DuetGPT, run the following command:\n\n```bash\nduet-gpt\n```\n\nYou will be prompted to enter your OpenAI API key. You can find your API key on the [OpenAI dashboard](https://platform.openai.com/account/api-keys).\n\n```bash\n     _            _              _\n    | |          | |            | |\n  __| |_   _  ___| |_ __ _ _ __ | |_\n / _` | | | |/ _ \\ __/ _` | '_ \\| __|\n| (_| | |_| |  __/ || (_| | |_) | |_\n \\__,_|\\__,_|\\___|\\__\\__, | .__/ \\__|\n                      __/ | |\n                     |___/|_|\n\n┌  DuetGPT\n│\n◆  Please enter your OpenAI API key:\n│  sk-XXX…\n└\n```\n\n## Setup for development\n\n1. Clone the repository.\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Run DuetGPT using yarn:\n\n```bash\nnpm start\n```\n\n## Sample interaction\n\nFor the purposes of illustrating how interactions work, I chose a super simple task. Let's say you want to add `.yarn/cache` to `.gitignore`. Here is how to ask DuetGPT to help you with that:\n\n```\n     _            _              _\n    | |          | |            | |\n  __| |_   _  ___| |_ __ _ _ __ | |_\n / _` | | | |/ _ \\ __/ _` | '_ \\| __|\n| (_| | |_| |  __/ || (_| | |_) | |_\n \\__,_|\\__,_|\\___|\\__\\__, | .__/ \\__|\n                      __/ | |\n                     |___/|_|\n\n┌  DuetGPT\n│\n◇  LLM and memory started\n│\n┌ 🤖 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐\n│                                                                                                                            │\n│                                                                                                                            │\n│    My mission is to collaborate with you as a developer by providing specific bash or file modification commands to help   │\n│    you complete your development-related tasks, while effectively engaging in two-way interactions.                        │\n│                                                                                                                            │\n│                                                                                                                            │\n└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘\n│\n◇  What would you like to do?\n│  Add .yarn/cache to .gitignore\n│\n◇  AI response received\n│\n┌ 🤖 ────────────────────────────────────────────────────────────────────────┐\n│                                                                            │\n│                                                                            │\n│    First, I need to check if .gitignore exists in the current directory.   │\n│                                                                            │\n│     § BASH                                                                 │\n│                                                                            │\n│     1 ls .gitignore                                                        │\n│                                                                            │\n│                                                                            │\n└────────────────────────────────────────────────────────────────────────────┘\n│\n◇  What would you like to do?\n│  Run command\n│\n┌ 💻 ────────────┐\n│                │\n│   .gitignore   │\n│                │\n└────────────────┘\n│\n◇  AI response received\n│\n┌ 🤖 ────────────────────────────────────────────────────────────────────┐\n│                                                                        │\n│                                                                        │\n│    I will now append '.yarn/cache' to your existing .gitignore file.   │\n│                                                                        │\n│     § BASH                                                             │\n│                                                                        │\n│     1 echo \".yarn/cache\" \u003e\u003e .gitignore                                 │\n│                                                                        │\n│                                                                        │\n└────────────────────────────────────────────────────────────────────────┘\n│\n◇  What would you like to do?\n│  Run command\n│\n┌ 💻 ────┐\n│        │\n│   OK   │\n│        │\n└────────┘\n│\n◆  What would you like to do?\n│  Not sure\n└\n\n```\n\n## Known issues\n\n- When proposing changes to large files, the AI may return incomplete results. The gpt-4 context window is limited, DuetGPT works best with small files - one function per file is ideal.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## Author\n\n- [kristofer@fmckl.se](mailto:kristofer@fmckl.se)\n- Twitter: [@kristoferlund](https://twitter.com/kristoferlund)\n- Discord: kristofer#1475\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristoferlund%2Fduet-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkristoferlund%2Fduet-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristoferlund%2Fduet-gpt/lists"}