Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A CLI tool to generate smart commit messages, code documentation, and more.
Install from PyPI:

```bash
pip install penifycli
pip install penify
```

## Usage
Expand All @@ -31,7 +31,7 @@ Penify CLI provides several subcommands for different functionalities, organized
Generate smart commit messages using local LLM:

```bash
penifycli commit [-m "Optional message"] [-e] [-d]
penify commit [-m "Optional message"] [-e] [-d]
```

Options:
Expand All @@ -45,16 +45,16 @@ Configure local LLM and JIRA settings:

```bash
# Configure LLM settings
penifycli config llm --model MODEL_NAME [--api-base API_URL] [--api-key API_KEY]
penify config llm --model MODEL_NAME [--api-base API_URL] [--api-key API_KEY]

# Configure LLM settings through web interface
penifycli config llm-web
penify config llm-web

# Configure JIRA settings
penifycli config jira --url JIRA_URL --username USERNAME --api-token TOKEN [--verify]
penify config jira --url JIRA_URL --username USERNAME --api-token TOKEN [--verify]

# Configure JIRA settings through web interface
penifycli config jira-web
penify config jira-web
```

## Advanced Commands (Login required)
Expand All @@ -64,7 +64,7 @@ penifycli config jira-web
To log in and obtain an API token:

```bash
penifycli login
penify login
```

This command will open a browser window for authentication. After successful login, the API key will be saved locally for future use.
Expand All @@ -75,10 +75,10 @@ Generate documentation for Git diff, files or folders:

```bash
# Generate documentation for latest Git commit diff
penifycli docgen
penify docgen

# Generate documentation for specific file or folder
penifycli docgen -l /path/to/file/or/folder
penify docgen -l /path/to/file/or/folder
```

Options:
Expand All @@ -90,10 +90,10 @@ Install or uninstall Git post-commit hooks:

```bash
# Install Git hook
penifycli docgen install-hook [-l /path/to/repo]
penify docgen install-hook [-l /path/to/repo]

# Uninstall Git hook
penifycli docgen uninstall-hook [-l /path/to/repo]
penify docgen uninstall-hook [-l /path/to/repo]
```

Options:
Expand All @@ -110,7 +110,7 @@ If no token is available and you try to access an advanced feature, you'll be pr
For commit message generation, Penify can use a local LLM. Configure it using:

```bash
penifycli config llm --model MODEL_NAME --api-base API_URL --api-key API_KEY
penify config llm --model MODEL_NAME --api-base API_URL --api-key API_KEY
```

Common configurations:
Expand All @@ -122,7 +122,7 @@ Common configurations:
Configure JIRA integration to enhance commit messages with issue details:

```bash
penifycli config jira --url https://your-domain.atlassian.net --username your-email@example.com --api-token YOUR_API_TOKEN
penify config jira --url https://your-domain.atlassian.net --username your-email@example.com --api-token YOUR_API_TOKEN
```

## Development
Expand Down Expand Up @@ -159,7 +159,7 @@ Contributions are welcome! Please feel free to submit a Pull Request.

## Issues

If you encounter any problems or have suggestions, please file an issue on the [GitHub repository](https://github.com/SingularityX-ai/penifycli/issues).
If you encounter any problems or have suggestions, please file an issue on the [GitHub repository](https://github.com/SingularityX-ai/penify/issues).

## Support

Expand Down
34 changes: 17 additions & 17 deletions docs/commit-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `commit` command allows you to generate smart, AI-powered commit messages fo
## Basic Usage

```bash
penifycli commit
penify commit
```

By default, this command:
Expand All @@ -20,7 +20,7 @@ By default, this command:
Provide context for the commit message generation:

```bash
penifycli commit -m "Fix login flow"
penify commit -m "Fix login flow"
```

This hint helps the AI understand your intention and improves the quality of the generated message.
Expand All @@ -30,7 +30,7 @@ This hint helps the AI understand your intention and improves the quality of the
Open an editor to review and edit the generated commit message before committing:

```bash
penifycli commit -e
penify commit -e
```

This opens your default Git editor with the generated message for review.
Expand All @@ -40,7 +40,7 @@ This opens your default Git editor with the generated message for review.
Generate a detailed commit message with both title and description:

```bash
penifycli commit -d
penify commit -d
```

Without this flag, only the commit title is generated.
Expand All @@ -52,32 +52,32 @@ You can combine these options for different workflows:
### Generate Title Only with Context

```bash
penifycli commit -m "Update login UI"
penify commit -m "Update login UI"
```

### Generate Title and Description with Context

```bash
penifycli commit -m "Update login UI" -d
penify commit -m "Update login UI" -d
```

### Generate and Edit Full Commit Message

```bash
penifycli commit -d -e
penify commit -d -e
```

### Generate, Edit, and Provide Context

```bash
penifycli commit -m "Refactor authentication" -d -e
penify commit -m "Refactor authentication" -d -e
```

## LLM and JIRA Integration

### Using Local LLM

If you've configured a local LLM using `penifycli config llm`, the commit command will automatically use it for message generation.
If you've configured a local LLM using `penify config llm`, the commit command will automatically use it for message generation.

Benefits:
- Privacy: your code changes don't leave your machine
Expand All @@ -86,7 +86,7 @@ Benefits:

### JIRA Enhancement

If you've configured JIRA integration using `penifycli config jira`, the commit command will:
If you've configured JIRA integration using `penify config jira`, the commit command will:

1. Detect JIRA issue references in your changes
2. Fetch issue details from your JIRA instance
Expand All @@ -109,11 +109,11 @@ PROJ-123: Fix authentication bug in login flow
For the `commit` command to work:

1. You must have configured either:
- Local LLM via `penifycli config llm`, OR
- Logged in via `penifycli login`
- Local LLM via `penify config llm`, OR
- Logged in via `penify login`

2. For JIRA enhancement (optional):
- Configure JIRA via `penifycli config jira`
- Configure JIRA via `penify config jira`

## Examples

Expand All @@ -124,7 +124,7 @@ For the `commit` command to work:
git add .

# Generate commit message
penifycli commit
penify commit

# Commit with the generated message
git commit -m "Generated message here"
Expand All @@ -138,7 +138,7 @@ git add .

# Generate detailed commit message with JIRA integration,
# provide context, and open editor for review
penifycli commit -m "Fix login issue" -d -e
penify commit -m "Fix login issue" -d -e

# The commit is automatically completed after you save and exit the editor
```
Expand All @@ -148,8 +148,8 @@ penifycli commit -m "Fix login issue" -d -e
### Common Issues

1. **"No LLM model or API token provided"**
- Run `penifycli config llm` to configure a local LLM, or
- Run `penifycli login` to authenticate with Penify
- Run `penify config llm` to configure a local LLM, or
- Run `penify login` to authenticate with Penify

2. **"Failed to connect to JIRA"**
- Check your JIRA configuration with `cat ~/.penify`
Expand Down
10 changes: 5 additions & 5 deletions docs/config-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ Penify CLI stores configuration in a JSON file at `~/.penify/config.json`. The c

```bash
# Configure LLM settings
penifycli config llm
penify config llm

# Configure JIRA integration
penifycli config jira
penify config jira
```

## LLM Configuration

### Web Interface

Running `penifycli config llm` opens a web interface in your browser where you can configure:
Running `penify config llm` opens a web interface in your browser where you can configure:

1. **Model**: The LLM model to use (e.g., `gpt-3.5-turbo`)
2. **API Base URL**: The endpoint URL for your LLM API (e.g., `https://api.openai.com/v1`)
Expand Down Expand Up @@ -72,7 +72,7 @@ After configuration, your `~/.penify/config.json` will contain:

### Web Interface

Running `penifycli config jira` opens a web interface where you can configure:
Running `penify config jira` opens a web interface where you can configure:

1. **JIRA URL**: Your JIRA instance URL (e.g., `https://yourcompany.atlassian.net`)
2. **Username**: Your JIRA username (typically your email)
Expand Down Expand Up @@ -123,7 +123,7 @@ You can override configuration settings using environment variables:
Example:
```bash
export PENIFY_LLM_MODEL="gpt-4"
penifycli commit
penify commit
```

## Command-Line Configuration
Expand Down
16 changes: 8 additions & 8 deletions docs/detailed-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This document provides in-depth information about all features and capabilities

### Login Process

When you run `penifycli login`, the tool:
When you run `penify login`, the tool:

1. Opens your default web browser
2. Redirects you to Penify's login page
Expand All @@ -58,7 +58,7 @@ API tokens are stored in your home directory in the `.penify` file. This JSON fi
## Command Overview

```
penifycli
penify
├── commit Generate smart commit messages
├── config Configure local LLM and JIRA
│ ├── llm Configure local LLM settings
Expand Down Expand Up @@ -91,7 +91,7 @@ The `docgen` command generates documentation for your code:

### Authentication Requirement

This feature requires authentication with a Penify account. Run `penifycli login` before using documentation features.
This feature requires authentication with a Penify account. Run `penify login` before using documentation features.

## Configuration Settings

Expand All @@ -108,16 +108,16 @@ Penify can install Git hooks to automate documentation generation:

### Post-Commit Hook

- **Install**: `penifycli docgen install-hook`
- **Install**: `penify docgen install-hook`
- **What it does**: Automatically generates documentation for changed files after each commit
- **Uninstall**: `penifycli docgen uninstall-hook`
- **Uninstall**: `penify docgen uninstall-hook`

### Custom Hook Location

You can specify a custom location for Git hooks:

```bash
penifycli docgen install-hook -l /path/to/git/repo
penify docgen install-hook -l /path/to/git/repo
```

## Advanced Use Cases
Expand All @@ -136,14 +136,14 @@ Generate documentation for an entire repository:
```bash
git clone https://github.com/user/repo
cd repo
penifycli docgen -l .
penify docgen -l .
```

## Troubleshooting

### Common Issues

1. **API Key Errors**: Ensure you've run `penifycli login` or set `PENIFY_API_TOKEN`
1. **API Key Errors**: Ensure you've run `penify login` or set `PENIFY_API_TOKEN`
2. **LLM Configuration**: Check your LLM settings with `cat ~/.penify`
3. **JIRA Integration**: Verify JIRA credentials in your configuration

Expand Down
Loading