Repository: rsaryev/auto-copilot-cli
Branch: main
Commit: f2a23c9b1619
Files: 39
Total size: 65.1 KB
Directory structure:
gitextract_i_a95qrx/
├── .eslintrc.json
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ └── npm-publish.yml
├── .gitignore
├── .prettierrc
├── LICENSE
├── README.md
├── cli.js
├── deployment/
│ └── deploy.bash
├── docs/
│ ├── chat.md
│ ├── code-chat.md
│ ├── code-review.md
│ ├── config.md
│ ├── pre-commit.md
│ ├── refactor.md
│ ├── shell.md
│ ├── sql-translator.md
│ └── test.md
├── package.json
├── src/
│ ├── commands/
│ │ ├── chat.ts
│ │ ├── code-chat-command.ts
│ │ ├── code-review.ts
│ │ ├── generate-tests.ts
│ │ ├── pre-commit.ts
│ │ ├── refactor.ts
│ │ ├── shell.ts
│ │ └── sql-translator.ts
│ ├── config/
│ │ └── config.ts
│ ├── index.ts
│ ├── llm/
│ │ └── index.ts
│ ├── types.ts
│ └── utils/
│ ├── error.ts
│ ├── git.ts
│ ├── helpers.ts
│ ├── index.ts
│ ├── inquirer.ts
│ ├── language-extensions.ts
│ └── update.ts
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .eslintrc.json
================================================
{
"parser": "@typescript-eslint/parser",
"extends": ["plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint"],
"rules": {}
}
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: []
================================================
FILE: .github/workflows/npm-publish.yml
================================================
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
on:
release:
types: [created]
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
jobs:
publish-npm:
runs-on: ubuntu-latest
environment:
name: ohmyenv
url: https://github.com
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
================================================
FILE: .gitignore
================================================
/.idea/
/dist/
/node_modules/
/.env
/auto-copilot-cli.iml
/config.json
================================================
FILE: .prettierrc
================================================
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2,
"printWidth": 120,
"semi": true
}
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2023 Saryev Rustam
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
[](https://www.npmjs.com/package/auto-copilot-cli)
[](https://github.com/rsaryev/auto-copilot-cli/actions/workflows/npm-publish.yml)
[](https://github.com/transitive-bullshit/chatgpt-api/blob/main/license)
[](https://www.npmjs.com/package/auto-copilot-cli)
## Description
`auto-copilot-cli` is a versatile tool that offers several functionalities, including:
- AI chat help you quickly find and improve codebase and answer questions about codebase
- Code review
- Pre-commit for generating commit messages
- Code refactoring and linting structure of a folder or a file
- Test generation
- Shell command generation and execution
- Natural language to SQL translation
## Setup
1. Install `auto-copilot-cli` globally:
```bash
# using npm
npm install -g auto-copilot-cli
# using install script
curl -s https://raw.githubusercontent.com/rsaryev/auto-copilot-cli/main/deployment/deploy.bash | bash
```
2. Get an API key from [OpenAI](https://platform.openai.com/account/api-keys).
3. Refer to the [CLI usage](https://github.com/rsaryev/auto-copilot-cli/tree/main/docs) guide to learn how to use
the tool.
### Commands
- `code-chat ` - AI chat with codebase [usage](https://github.com/rsaryev/auto-copilot-cli/blob/main/docs/code-chat.md)
- Options:
- `-p, --prompt ` - Prompt for AI
- `code-review` - Perform code review [usage](https://github.com/rsaryev/auto-copilot-cli/blob/main/docs/code-review.md) - Perform code review
- `test ` - Generate test [usage](https://github.com/rsaryev/auto-copilot-cli/blob/main/docs/test.md)
- Options:
- `-p, --prompt ` - Prompt for AI
- `-o, --output ` - Output file
- `refactor ` - Refactor code [usage](https://github.com/rsaryev/auto-copilot-cli/blob/main/docs/refactor.md)
- Options:
- `-p, --prompt ` - Prompt for AI
- `-o, --output ` - Output file
- `sql-translator ` - Translate natural language to SQL [usage](https://github.com/rsaryev/auto-copilot-cli/blob/main/docs/sql-translator.md)
- Options:
- `-o, --output