Skip to content

Commit eeb1610

Browse files
committed
docs: enhance README with demo GIF and installation guide
1 parent e3d6adc commit eeb1610

File tree

3 files changed

+61
-16
lines changed

3 files changed

+61
-16
lines changed

README.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
# <img src="./assets/gitai-cli-logo.jpg" alt="GitAI CLI" width="8%" /> GitAI CLI
1+
<h1 align="center">GitAI CLI</h1>
2+
<p align="center">Smart CLI for AI-driven Git commit & PR generation.</p>
3+
4+
<p align="center"><code>npm i -g @lastwhisper-dev/gitai-cli</code></p>
5+
6+
![demo1](./assets/gitai-cli-example-1.gif)
7+
8+
<video src="https://github.com/user-attachments/assets/f8151846-9825-409a-a99f-fa5103246d22" width="320" height="240" controls>
9+
</video>
210

311
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
412

513
A vibe-coding project. ✨
614

15+
![excalidraw-animate](./assets/gitai-cli-outline.png)
16+
717
> [!Note]
818
>
919
> **GitAI CLI is your intelligent Git assistant, supercharging your workflow with AI-powered command generation. Craft perfect commit messages and pull request descriptions in seconds!**
1020
11-
![excalidraw-animate](./assets/gitai-cli-outline.png)
12-
13-
![demo1](./assets/gitai-cli-example-1.gif)
14-
1521
> [!Tip]
1622
>
1723
> For Chinese version, please refer to [中文文档](./README_CN.md)
@@ -35,7 +41,7 @@ npm i -g @lastwhisper-dev/gitai-cli # OR: pnpm add -g @lastwhisper
3541

3642
# 2. Bootstrap a repo
3743
cd ~/my-project
38-
gitai init # creates .gitai/ with default config
44+
gitai init # creates .gitai/ with default config & .env-example
3945

4046
# 3. Add your keys ➜ copy .env-example > .env and fill the blanks
4147
cp .env-example .env
@@ -51,6 +57,22 @@ gitai commit -n 3 # returns 3 commit-message suggestions
5157
gitai pr -t main # writes .gitai/pr_docs/<ts>-feature.md
5258
```
5359

60+
> [!Tip]
61+
>
62+
> If you have permission issues, try:
63+
>
64+
> ```bash
65+
> # For macOS & Linux
66+
> sudo npm i -g @lastwhisper-dev/gitai-cli
67+
> # For Windows, use PowerShell/CMD in admin mode
68+
> ```
69+
>
70+
> If you have network issues, try:
71+
>
72+
> ```bash
73+
> npm config set registry https://registry.npmmirror.com
74+
> ```
75+
5476
### Install from source
5577
5678
```bash
@@ -65,7 +87,7 @@ Now you can use `gitai` commands anywhere on your system.
6587

6688
1. **Set up API Keys (Environment Variables):**
6789

68-
GitAI CLI needs API keys for the LLM providers you intend to use. Create a `.env` file in your project root or set these globally in your shell environment. See `.env-example` for a template:
90+
GitAI CLI needs API keys for the LLM providers you intend to use. Create a `.env` file in your project root or set these globally in your shell environment. See `.env-example` for a template (created by `gitai init`):
6991

7092
```env
7193
OPENAI_API_KEY="Your OpenAI API Key"
@@ -131,7 +153,7 @@ Now you can use `gitai` commands anywhere on your system.
131153
- **`gitai commit`**:
132154
- Automatically generates commit messages based on your staged changes.
133155
- Provides multiple suggestions for you to choose from.
134-
- Adheres to Conventional Commits format by default.
156+
- Adheres to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format by default.
135157
- Allows custom prompts for tailored message styles.
136158
- **`gitai pr`**:
137159
- Generates comprehensive Pull Request titles and descriptions.

README_CN.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
# <img src="./assets/gitai-cli-logo.jpg" alt="GitAI CLI 标志" width="8%" /> GitAI CLI
1+
<h1 align="center">GitAI CLI</h1>
2+
<p align="center">Smart CLI for AI-driven Git commit & PR generation.</p>
3+
4+
<p align="center"><code>npm i -g @lastwhisper-dev/gitai-cli</code></p>
5+
6+
![demo1](./assets/gitai-cli-example-1.gif)
7+
8+
<video src="https://github.com/user-attachments/assets/f8151846-9825-409a-a99f-fa5103246d22" width="320" height="240" controls>
9+
</video>
210

311
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
412

5-
Vibe-Coding Project✨
13+
A vibe-coding project. ✨
14+
15+
![excalidraw-animate](./assets/gitai-cli-outline.png)
616

717
> [!Note]
818
>
919
> **GitAI CLI 是你的智能 Git 助手,通过 AI 驱动的命令生成,为你的工作流超级加速。在几秒钟内打造完美的提交信息和拉取请求描述!**
1020
11-
![excalidraw-animate](./assets/gitai-cli-outline.png`)
12-
13-
![demo1](./assets/gitai-cli-example-1.gif)
1421

1522
> [!Tip]
1623
>
@@ -35,7 +42,7 @@ npm i -g @lastwhisper-dev/gitai-cli # 或: pnpm add -g @lastwhispe
3542

3643
# 2. 初始化一个仓库
3744
cd ~/my-project
38-
gitai init # 会创建包含默认配置的 .gitai/ 目录
45+
gitai init # 会创建包含默认配置的 .gitai/ 目录 & .env-example 文件
3946

4047
# 3. 添加你的密钥 ➜ 复制 .env-example 为 .env 并填写
4148
cp .env-example .env
@@ -51,6 +58,22 @@ gitai commit -n 3 # 返回 3 条提交信息建议
5158
gitai pr -t main # 会将 PR 内容写入 .gitai/pr_docs/<ts>-feature.md
5259
```
5360

61+
> [!Tip]
62+
>
63+
> 如果你有权限问题,可以尝试:
64+
>
65+
> ```bash
66+
> # For macOS & Linux
67+
> sudo npm i -g @lastwhisper-dev/gitai-cli
68+
> # For Windows, use PowerShell/CMD in admin mode
69+
> ```
70+
>
71+
> 如果你有网络问题,可以尝试:
72+
>
73+
> ```bash
74+
> npm config set registry https://registry.npmmirror.com
75+
> ```
76+
5477
### 从源码安装
5578
5679
```bash
@@ -65,7 +88,7 @@ npm run build && npm link # 创建全局符号链接以方便开发
6588

6689
1. **设置 API 密钥 (环境变量):**
6790

68-
GitAI CLI 需要你计划使用的 LLM 提供商的 API 密钥。在你的项目根目录创建一个 `.env` 文件,或者在你的 Shell 环境中全局设置这些变量。请参考 `.env-example` 文件作为模板:
91+
GitAI CLI 需要你计划使用的 LLM 提供商的 API 密钥。在你的项目根目录创建一个 `.env` 文件,或者在你的 Shell 环境中全局设置这些变量。请参考 `.env-example` 文件作为模板`gitai init` 会自动创建)
6992

7093
```env
7194
# OpenAI 配置
@@ -136,7 +159,7 @@ npm run build && npm link # 创建全局符号链接以方便开发
136159
- **`gitai commit`**
137160
- 根据你暂存的更改自动生成提交信息。
138161
- 提供多个建议供你选择(默认 3 个)。
139-
- 默认遵循 Conventional Commits 格式。
162+
- 默认遵循 [Conventional Commits 规范](https://www.conventionalcommits.org/en/v1.0.0/) 格式。
140163
- 允许使用**自定义提示词**来定制消息风格。
141164
- **`gitai pr`**
142165
- 生成全面的拉取请求标题和描述。

assets/gitai-cli-example-1.gif

22.2 KB
Loading

0 commit comments

Comments
 (0)