Skip to content

Commit 3346c01

Browse files
committed
docs(readme): update installation and configuration details
- Added requirements for API keys from providers - Included installation options using bun and shell script - Revised quick start instructions for setting API keys - Expanded configuration section with command line options
1 parent 4c55829 commit 3346c01

File tree

1 file changed

+40
-14
lines changed

1 file changed

+40
-14
lines changed

README.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,22 @@ AI-powered git auto-commit tool that intelligently groups your changes and gener
1313
- **Pattern Filtering**: Exclude files using glob patterns with `--ignore`
1414
- **Auto-Push**: Automatically pushes commits to remote (can be disabled)
1515

16+
## Requirements
17+
18+
- An API key from one of the supported AI providers:
19+
- **OpenAI** — get one at [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
20+
- **Google Gemini** — get one at [aistudio.google.com/api-keys](https://aistudio.google.com/api-keys)
21+
1622
## Installation
1723

24+
### Option 1 — bun (requires [Bun](https://bun.sh) ≥ 1.0)
25+
26+
```bash
27+
bun install -g @miselabanto/commita
28+
```
29+
30+
### Option 2 — Shell script (no runtime required)
31+
1832
Downloads the correct pre-compiled binary for your OS and architecture directly from [GitHub Releases](https://github.com/misaelabanto/commita/releases):
1933

2034
```bash
@@ -40,29 +54,41 @@ bun install
4054

4155
## Quick Start
4256

43-
1. Clone and install dependencies:
44-
```bash
45-
git clone https://github.com/misaelabanto/commita.git
46-
cd commita
47-
bun install
48-
```
49-
50-
2. Create a `.commita` file or set environment variables:
57+
1. Set your API key and provider:
5158
```bash
52-
cp .commita.example .commita
53-
# Edit .commita and add your API key (OpenAI or Gemini)
59+
commita set OPENAI_API_KEY=sk-...
60+
# or for Gemini:
61+
commita set GEMINI_API_KEY=your-key
62+
commita set PROVIDER=gemini
5463
```
5564

56-
3. Navigate to your project and run:
65+
2. Navigate to your project and run:
5766
```bash
5867
commita --all
5968
```
6069

6170
## Configuration
6271

63-
Create a `.commita` file in your project root or use environment variables with the `COMMITA_` prefix.
72+
### `commita set` (recommended)
73+
74+
Set config values from the command line. By default values are saved globally to `~/.commita`. Use `--local` to save them to `.commita` in the current project instead.
75+
76+
```bash
77+
# Set values directly
78+
commita set PROVIDER=openai
79+
commita set MODEL=gpt-4o-mini
80+
81+
# Omit the value to be prompted securely (input is hidden for API keys)
82+
commita set OPENAI_API_KEY
83+
commita set GEMINI_API_KEY
84+
85+
# Save to the current project only
86+
commita set PROVIDER=gemini --local
87+
```
88+
89+
### `.commita` file (manual)
6490

65-
### `.commita` file format (key=value):
91+
You can also create or edit a `.commita` file directly. Project-level (`./.commita`) takes precedence over global (`~/.commita`).
6692

6793
```
6894
PROVIDER=openai
@@ -81,7 +107,7 @@ COMMIT_STYLE=conventional
81107
GEMINI_API_KEY=your-gemini-api-key
82108
```
83109

84-
### Environment Variables:
110+
### Environment Variables
85111

86112
```bash
87113
export COMMITA_PROVIDER=openai

0 commit comments

Comments
 (0)