shelfwood/project-prompt-generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shelfwood/project-prompt-generator

Composer 安装命令:

composer create-project shelfwood/project-prompt-generator

包简介

Generates a prompt for a given Laravel project you are viewing in the CLI

README 文档

README

This is a Laravel Zero CLI tool that uses GPT with OpenAI API to generate prompts and analyze project files. You need an OpenAI API key to use this tool.

Installation

To install the CLI tool globally via composer, run the following command:

composer global require shelfwood/project-prompt-generator

After installation, create a new project directory, and navigate to it in your terminal. Then, run the following command:

prompt install

This will install the necessary dependencies, create a database, and prompt you for a default projects to allow you to choose projects from a default directory. Handy for when you have multiple projects in a single directory that you want to analyze individually.

Usage

The .env contains the following variables, the necessary ones are set when running the prompt install command:

OPENAI_API_KEY=
PROJECT_DIRECTORY=
REMOTE=
IGNORE_PATHS=/app/Helpers/characters.json

The REMOTE variable is used to specify a remote directory to use instead of the current working directory. The IGNORE_PATHS variable is used to specify paths to ignore when analyzing files. This is mostly used during development to allow for easily running the tool on other project folders.

The IGNORE_PATHS variable can be set to a comma-separated list of file paths to ignore when analyzing files. database/database.sqlite is ignored by default.

Analyze Project

To analyze the current working directory's files and display counts for tokens and descriptions, use the following command:

prompt analyze [--remote]

The --remote option can be used to specify a remote directory instead of using the current working directory.

Clear Command

To clear all file descriptions from the database, use the following command:

project-cli clear

Copy Code Command

To concatenate the code from all files in the current project without newlines and count the number of tokens, use the following command:

project-cli copy:files [--remote]

The --remote option can be used to specify a remote directory instead of using the current working directory.

Copy Compressed Command

To concatenate all the compressed file descriptions for the current project and count the number of tokens, use the following command:

project-cli copy:compressed [--remote]

The --remote option can be used to specify a remote directory instead of using the current working directory.

The --remote option can be used to specify a remote directory instead of using the current working directory.

Generate Proposal Command

To generate a proposal based on the files in the current directory, use the following command:

project-cli generate:proposal [--remote]

The command retrieves the project directory and the project ID from the database and creates instances of FileAnalyzer, Describer, and DescriptionStorage to process the files in the directory and store the generated proposal. Finally, the command prompts the user to provide a description of the feature or request.

Readme Command

To generate a README.md file for the current project, use the following command:

project-cli readme [--remote]

The --remote option can be used to specify a remote directory instead of using the current working directory. The command uses Laravel's FileAnalyzer class to determine which files to scan for context information. It also uses an instance of ChatGPT to gather crucial information from each file to be used as context while writing the README.md file. Finally, the command prompts the user to provide any special instructions and then writes out the complete README.md in markdown format.

Contributing

If you would like to contribute to this project, please submit a pull request on GitHub or contact the project owner directly.

License

This project is licensed under the MIT license.

Credits

This project was created by Joris Schelfhout. Special thanks to Bit Academy for providing the resources to create this project.

shelfwood/project-prompt-generator 适用场景与选型建议

shelfwood/project-prompt-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 03 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「laravel」 「gpt」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 shelfwood/project-prompt-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 shelfwood/project-prompt-generator 我们能提供哪些服务?
定制开发 / 二次开发

基于 shelfwood/project-prompt-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 22
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-29