Skip to content

Commit

Permalink
doc: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shellfly committed Mar 19, 2023
1 parent cb9bc17 commit f7a81be
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment if applicable (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]


**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
29 changes: 29 additions & 0 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: release-binary

on:
release:
types: [created]

jobs:
release-binary:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: "386"
goos: windows
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: 1.19
extra_files: LICENSE README.md
34 changes: 34 additions & 0 deletions README-cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Aoi (葵)

由 ChatGPT 驱动的 Ghost in the Shell

Aoi 是由 ChatGPT 驱动的基于人工智能的对话代理程序。使用 Aoi,可以在终端中与 AI 进行自然语言对话,它能够理解您的查询并执行适当的命令。

## 功能
Aoi 可以用作 ChatGPT 的终端版本,此外,Aoi 还带有几个内置功能提高使用效率:

- `/code` - 生成代码片段并复制到剪贴板,例如 `/code go generate random numbers`
- `/db` - 生成 SQL 并在数据库上执行,例如 `/db {url} list tables`
- `/shell` - 生成 shell 命令并执行,例如 `/shell view listening ports`
- `/ssh` - 生成远程 shell 命令并执行,例如 `/ssh {host} view listening tcp ports`
- `/tldr` - 获取命令的 tl;dr 格式的解释
- `/trans` - 将文本翻译为指定语言

## 入门指南
可以从 GitHub 的[发布页面](https://github.com/shellfly/aoi/releases)下载 Aoi。或者,可以使用 Go 在系统上安装 Aoi:

```bash
go install github.com/shellfly/aoi
```
将 OpenAI API 密钥设置为环境变量,然后运行 aoi 命令。

```bash

export OPENAI_API_KEY=<your_api_key>
aoi
```

## 演示

## 贡献
如果在使用 Aoi 时发现任何问题或有新功能的建议,请在 GitHub 存储库上创建问题或提交拉取请求。
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@

# Aoi (葵)

[中文说明](/README-cn.md)

Ghost in the Shell powered by ChatGPT

**Aoi** is an AI-based conversational agent powered by ChatGPT. With Aoi, you can have natural language conversations with an AI in the terminal that can understand your queries and execute appropriate commands.

## Features
You can use Aoi as a terminal version of ChatGPT, Besides, Aoi comes with several built-in features that can help you be more productive:

- `/code` - Generate code snippets and copy to the clipboard , e.g. `/code go generate random numbers`
- `/db` - Generate SQL and execute it on the database, e.g. `/db {url} list tables`
- `/shell` - Generate shell command and execute it, e.g. `/shell view listening ports`
- `/ssh` - Generate shell command and execute it on the remote host, e.g. `/ssh {host} view listening tcp ports`
- `/tldr` - Get a tl;dr explanation of a command
- `/trans` - Translate text to a specified language


## Getting Started
You can download Aoi from the GitHub [release page](https://github.com/shellfly/aoi/releases). Alternatively, you can use Go to install Aoi on your system:

```bash
go install github.com/shellfly/aoi
```

Set your OpenAI API key as an environment variable, and then run the `aoi` command.

```bash
export OPENAI_API_KEY=<your_api_key>
aoi
```

## Demos


## Contributing
If you find any issues with Aoi or have suggestions for new features, please feel free to create an issue or submit a pull request on the GitHub repository. Contributions from anyone and everyone are welcome!
2 changes: 1 addition & 1 deletion pkg/command/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (c *Code) Name() string {
}

func (c *Code) Help() string {
return "/code {lang} {question} - generate code snippet and write it to clipboard , e.g. /code go generate random number"
return "/code {lang} {question} - Generate code snippets and copy to the clipboard , e.g. /code go generate random number"
}

// Prompts expand input like "{lang} {question}" to code generation prompts
Expand Down
2 changes: 1 addition & 1 deletion pkg/command/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (c *DB) Name() string {
}

func (c *DB) Help() string {
return "/db - generate SQL and execute it on database, e.g. /db {url} show tables"
return "/db - Generate SQL and execute it on the database, e.g. /db {url} show tables"
}

// Prompt set terminal prompt for ssh command
Expand Down
2 changes: 1 addition & 1 deletion pkg/command/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (c *Ssh) Name() string {
}

func (c *Ssh) Help() string {
return "/ssh - generate shell command and execute it on {host}, e.g. /ssh {host} view listening tcp ports"
return "/ssh - Generate shell command and execute it on the remote host, e.g. /ssh {host} view listening tcp ports"
}

// Prompt set terminal prompt for ssh command
Expand Down
2 changes: 1 addition & 1 deletion pkg/command/tldr.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (c *TLDR) Name() string {
}

func (c *TLDR) Help() string {
return "/tldr {command} - explain command in tl;dr format"
return "/tldr {command} - Get a tl;dr explanation of a command"
}

// Prompts generate tldr prompt
Expand Down
2 changes: 1 addition & 1 deletion pkg/command/trans.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (c *Trans) Name() string {
}

func (c *Trans) Help() string {
return "/trans {lang code} {text} - translate {text } to {lang code}"
return "/trans {lang code} {text} - Translate text to a specified language"
}

// Run expand input like "{lang} {question}" to code generation prompts
Expand Down

0 comments on commit f7a81be

Please sign in to comment.