Skip to content

Commit 5364b3e

Browse files
authored
Merge pull request #2 from Arbitr-ary-ily/dev
feat: Stylistic Changes, Custom Filters, Error Handling
2 parents b83e25d + b56785f commit 5364b3e

File tree

9 files changed

+9230
-126
lines changed

9 files changed

+9230
-126
lines changed

README.md

Lines changed: 236 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,253 @@
1-
# Chameleon: Changelog Generator CLI
21

3-
A command-line tool that generates intelligent changelogs from your GitHub repository using [Greptile AI](https://greptile.com).
2+
# Chameleon: Modern Changelog Generator
43

5-
## Features
4+
65

7-
- 🤖 AI-powered changelog generation
8-
- 📅 Flexible date range selection (24h, 7d, 14d, 30d)
9-
- 🎯 Multiple changelog formats:
10-
- Internal (technical details for developers)
11-
- External (user-facing changes)
12-
- Mintlify (formatted for Mintlify documentation)
13-
- 🔍 Auto-detection of current repository
14-
- ⚡ Real-time progress indicator
6+
<p align="center">
157

16-
## Prerequisites
8+
<div align="center">
9+
<img src="https://image.pitchbook.com/r7i4Be6aH3XjC3Mg9RsbvFE0a7r1717776760562_200x200" alt="Chameleon Logo" width="400"/>
10+
</div>
1711

18-
Before using this tool, you'll need:
12+
</p>
1913

20-
- Node.js installed
21-
- GitHub Personal Access Token (https://github.com/settings/token)
22-
- Greptile API Key (https://app.greptile.com/settings/api)
14+
2315

24-
## Installation
16+
<p align="center">
2517

26-
1. Clone the repository
27-
2. Install dependencies:
18+
<b>A beautiful, modern CLI for generating intelligent changelogs from Git repositories</b>
19+
20+
</p>
21+
22+
23+
24+
<p align="center">
25+
26+
<img src="https://img.shields.io/badge/TypeScript-5.x-blue" alt="TypeScript">
27+
28+
<img src="https://img.shields.io/badge/Node.js-18.x%2B-green" alt="Node.js">
29+
30+
<img src="https://img.shields.io/badge/License-MIT-yellow" alt="License">
31+
32+
</p>
33+
34+
35+
36+
---
37+
38+
39+
40+
## ✨ Features
41+
42+
43+
44+
- 🎨 **Beautiful UI** - Modern terminal interface with colors, gradients, and stylish boxes
45+
46+
- 📋 **Clipboard Support** - Generated changelogs are automatically copied to your clipboard
47+
48+
- 📅 **Flexible Date Ranges** - Choose from preset ranges or select custom dates with a date picker
49+
50+
- 🖼️ **Image Display** - Show repository logos or any image directly in your terminal
51+
52+
- 💾 **Save to File** - Save generated changelogs to local files and open them afterward
53+
54+
- 🔄 **Multiple Formats** - Generate internal, external, or Mintlify-compatible changelogs
55+
56+
- 🤖 **AI-powered** - Uses Greptile AI to generate intelligent, context-aware changelogs
57+
58+
59+
60+
## 📦 Installation
61+
62+
63+
64+
```bash
65+
66+
# Clone the repository
67+
68+
git clone https://github.com/greptileai/chameleon.git
69+
70+
cd chameleon
71+
72+
73+
74+
# Install dependencies
75+
76+
npm install
77+
78+
79+
80+
# Run setup wizard
81+
82+
npm run setup
83+
84+
```
85+
86+
87+
88+
## 🔑 Prerequisites
89+
90+
91+
92+
You'll need the following API tokens:
93+
94+
95+
96+
- **GitHub Token** - For accessing GitHub repositories ([create one here](https://github.com/settings/tokens))
97+
98+
- **Greptile API Key** - For AI-powered changelog generation ([get it here](https://app.greptile.com/settings/api))
99+
100+
101+
102+
The setup wizard will guide you through obtaining and configuring these tokens.
103+
104+
105+
106+
## 🚀 Usage
107+
108+
109+
110+
```bash
111+
112+
# Display help
113+
114+
npm start -- --help
115+
116+
117+
118+
# Generate a changelog
119+
120+
npm start -- cl
121+
122+
123+
124+
```
125+
126+
127+
128+
After building and installing globally:
129+
130+
131+
132+
```bash
133+
134+
# Display help
135+
136+
chameleon --help
137+
138+
139+
140+
# Generate a changelog
141+
142+
chameleon cl
143+
144+
```
145+
146+
147+
148+
### Command Options
149+
150+
151+
152+
- `cl, changelog` - Generate a changelog for a repository
153+
154+
155+
## 🌟 Interactive Features
156+
157+
158+
159+
Chameleon offers a fully interactive experience:
160+
161+
162+
163+
1. **Repository Selection** - Automatically detects current repo or enter any GitHub repo
164+
165+
2. **Date Range** - Choose from preset ranges or select custom dates with an interactive calendar
166+
167+
3. **Format Selection** - Pick from different changelog formats or create a custom one
168+
169+
4. **Clipboard Integration** - Results are automatically copied to your clipboard
170+
171+
5. **File Export** - Save to file with your preferred filename
172+
173+
6. **Terminal Images** - View repository logos or custom images right in your terminal
174+
175+
176+
177+
## 🧩 Changelog Formats
178+
179+
180+
181+
Choose from multiple formatting options:
182+
183+
184+
185+
- **Internal** - Technical details targeting developers and internal teams
186+
187+
- **External** - User-friendly changes suitable for customer-facing release notes
188+
189+
- **Mintlify** - Special format compatible with Mintlify documentation
190+
191+
- **Custom** - Provide your own custom instructions for tailored results
192+
193+
194+
195+
## 🛠️ Development
196+
197+
28198

29199
```bash
30-
pnpm install
200+
201+
# Run in development mode
202+
203+
npm run start
204+
205+
206+
207+
# Build the project
208+
209+
npm run build
210+
211+
212+
213+
# Watch for changes
214+
215+
npm run build:watch
216+
217+
218+
219+
# Run tests
220+
221+
npm run test
222+
31223
```
32224

33-
3. Create a `.env` file in the root directory:
225+
226+
227+
## 📄 License
228+
229+
230+
231+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
232+
233+
234+
235+
## 🙏 Acknowledgements
236+
237+
238+
239+
- Built with [cli-typescript-starter](https://github.com/kucherenko/cli-typescript-starter)
240+
241+
- Powered by [Greptile](https://greptile.com) for intelligent changelog generation
242+
243+
34244

35-
```bash
36-
GITHUB_TOKEN=your_github_token
37-
GREPTILE_API_KEY=your_greptile_api_key
38-
```
245+
---
39246

40-
## Usage
247+
41248

42-
Run `pnpm run cl` to start the CLI. Now follow the on-terminal instructions.
249+
<p align="center">
43250

44-
*Note: Chameleon uses Greptile to index your repo, please check to ensure your company has approved Greptile before using this tool on private work repos.*
251+
Made with ❤️ by Greptile
45252

253+
</p>

bin/run.ts

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,51 @@
11
import yargs, { CommandModule } from 'yargs'
22
import { config } from 'dotenv'
33
import { commands } from '../src'
4-
import { bgBlue, bold, red } from 'picocolors'
4+
import chalk from 'chalk'
5+
import boxen from 'boxen'
6+
import figlet from 'figlet'
57

68
config()
79

10+
// Create a beautiful header
11+
const appName = figlet.textSync('CHAMELEON', {
12+
font: 'Standard',
13+
horizontalLayout: 'full'
14+
})
15+
16+
// Set the title color to green
17+
const title = chalk.green(appName)
18+
19+
// Create a box for the welcome message
20+
const welcomeBox = boxen(
21+
`${title}\n\n${chalk.bold('The modern CLI for generating beautiful changelogs!')}\n
22+
${chalk.dim('Powered by')} ${chalk.greenBright('Greptile')}\n
23+
${chalk.blue('Visit GitHub Repository:')} ${chalk.underline('https://github.com/greptileai/chameleon')}`,
24+
{
25+
margin: 1,
26+
padding: 1,
27+
borderStyle: 'round',
28+
borderColor: 'cyan',
29+
backgroundColor: '#222',
30+
}
31+
)
32+
33+
// Display the welcome box
34+
console.log(welcomeBox)
35+
836
const run = yargs(process.argv.slice(2))
937
run.usage(
10-
bgBlue(
11-
`Welcome to the CLI application powered by ${bold(red('cli-typescript-starter'))}!
12-
See more on https://github.com/kucherenko/cli-typescript-starter`,
38+
chalk.blueBright(
39+
`Welcome to the modern changelog generator CLI!\n
40+
See more on https://github.com/greptileai/chameleon`,
1341
),
1442
)
1543
for (const command of commands) {
1644
run.command(command as CommandModule)
1745
}
1846

19-
run.demandCommand(1, 'You need at least one command before moving on').help().argv
47+
if (process.argv.length <= 2) {
48+
run.showHelp()
49+
} else {
50+
run.demandCommand(1, chalk.yellow('You need at least one command before moving on')).help().argv
51+
}

0 commit comments

Comments
 (0)