npm package: @pkpkpkddea/devdash
Description: CLI tool for generating commit messages using AI
Author: pkpkpkddea
Latest version: 1.0.2

# DevDash CLI

> AI-powered commit message generator for your git workflow

[![npm version](https://img.shields.io/npm/v/@pkpkpkddea/devdash.svg)](https://www.npmjs.com/package/@pkpkpkddea/devdash)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Features

- 🤖 Generate descriptive commit messages using Google's Gemini AI
- 📝 Analyzes your staged git changes automatically
- ⚡ Simple CLI interface
- 🔐 Secure API key storage in your home directory
- 🎨 Beautiful, formatted commit messages

## Installation

```bash
npm install -g @pkpkpkddea/devdash
```

## Quick Start

1. **Stage your changes**:
   ```bash
   git add .
   ```

2. **Generate commit message**:
   ```bash
   devdash commit
   ```

3. **On first run**, you'll be prompted to enter your Google Gemini API key:
   ```
   🔑 Google Gemini API Key not found.
   Get your free API key at: https://aistudio.google.com/app/apikey
   
   Enter your Google Gemini API Key: 
   ```

4. **Review the generated message** and use it:
   ```bash
   git commit -m "Your generated message"
   ```

## Commands

### `devdash commit`

Generate a commit message from your staged changes.

```bash
devdash commit
```

### `devdash config`

Manage your DevDash configuration.

**Set API key**:
```bash
devdash config --set-key YOUR_API_KEY
```

**Set AI model**:
```bash
devdash config --set-model gemini-2.5-pro
```

**Show current configuration**:
```bash
devdash config --show
```

## Getting Your API Key

1. Visit [Google AI Studio](https://aistudio.google.com/app/apikey)
2. Sign in with your Google account
3. Click "Create API key"
4. Copy the generated key
5. Run `devdash commit` and paste the key when prompted

The API key is **free** for typical personal usage.

## Configuration

Your configuration is stored in `~/.devdash/config.json`:

```json
{
  "apiKey": "your-api-key",
  "model": "gemini-2.0-flash"
}
```

## Available Models

- `gemini-2.0-flash` (default, recommended)
- `gemini-2.5-flash`
- `gemini-2.5-pro`
- `gemini-2.0-flash-lite`
- `gemini-flash-latest`
- `gemini-pro-latest`

## Example Output

```bash
$ devdash commit

🤖 Generating commit message...

📝 Suggested commit message:

──────────────────────────────────────────────────
Add user authentication and update API endpoints

- Implemented JWT-based authentication system
- Updated user login endpoint to return tokens
- Added middleware for protected routes
- Refactored error handling in auth module
──────────────────────────────────────────────────

To use this message, run:
git commit -m "Add user authentication and update API endpoints"
```

## Requirements

- Node.js >= 18.0.0
- Git installed and accessible in PATH
- Google Gemini API key

## License

MIT

## Author

pkpkpkddea

## Contributing

Issues and pull requests are welcome!

## Repository

[https://github.com/pkpkpkddea/DevTool-Suite](https://github.com/PKpKDdEa/DevTool-Suite/tree/main)