jeeves-git-commit 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48e71addeeffbb84985d12716e19600e30ff14177fae23c282d4e12faf796385
4
- data.tar.gz: 9d69d77eba478a862baf2ddc12ae9904d9bb437c9a8e46853196151b4fb9258b
3
+ metadata.gz: 1755df084b5e0bf96439d4fa04cb2d1164a3ac57f6da168a2c1ff27115af6320
4
+ data.tar.gz: 602400de39b2eb3fbf808bc1aecbf36d786955503bf7dd7d3582ab391f357b3c
5
5
  SHA512:
6
- metadata.gz: 77645a88b204318acfee51f55607430acff3220bf50ff25d1f777b682386c3f77f6ce6e95f896eaf409009ae99ec085c7fd84473fa26a80f510412585167dae9
7
- data.tar.gz: 7c01c97378865626182095cab3dae24f2ec051cc65a7e88276a8507713ab901b44ab6bf6615b5e113fe4ddf59a12b45a921ea803a708d0c7d9024598dafa1763
6
+ metadata.gz: f281c5008cb5ab4035497d8c20efd13247bc96d0d7b28487f88d5b50f28b93d02d14efc00efa9c4cee20c1067c24cc950b7fc98ef5a38ee29bc19ca1d00f0d70
7
+ data.tar.gz: feb924a2bcf0d2d74d2b4eeea3e9ac87f7f7efde3d3c55d4b56b265dc74e8dcc6ee32734c96ed775f60fdaa660fe3a693b94243fa44a851dca7d3bfb15f34f92
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Jeeves
2
2
 
3
3
  <p align="center">
4
- <img src="jeeves.png" alt="Jeeves Logo" width="200">
4
+ <img src="assets/jeeves.png" alt="Jeeves Logo" width="200">
5
5
  </p>
6
6
 
7
7
  Jeeves is a command-line tool that helps you create AI-powered Git commit messages. It streamlines your Git workflow by automatically generating meaningful commit messages based on your code changes.
@@ -86,6 +86,32 @@ chmod +x bin/jeeves
86
86
  ln -s "$(pwd)/bin/jeeves" /usr/local/bin/jeeves
87
87
  ```
88
88
 
89
+ ## Configuration
90
+
91
+ ### API Key Setup
92
+
93
+ Jeeves requires an OpenRouter API key to generate commit messages. You need to set this as an environment variable:
94
+
95
+ ```bash
96
+ export OPENROUTER_API_KEY="your_openrouter_api_key"
97
+ ```
98
+
99
+ You can get an API key from [OpenRouter](https://openrouter.ai/).
100
+
101
+ Optionally, you can specify a different model by setting:
102
+
103
+ ```bash
104
+ export GIT_COMMIT_MODEL="openai/gpt-4o"
105
+ ```
106
+
107
+ The default model is `openai/gpt-4.1-mini` if not specified.
108
+
109
+ ### Prompt Configuration
110
+
111
+ Jeeves stores its configuration in `~/.config/jeeves/`. You can customize the AI prompt by editing the `prompt` file in this directory.
112
+
113
+ When you run Jeeves for the first time, if there's no prompt file in the config directory, it will copy `config/prompt` to the config directory automatically.
114
+
89
115
  ## Usage
90
116
 
91
117
  Navigate to your Git repository and run:
@@ -101,12 +127,6 @@ Options:
101
127
  - `--version`: Show version information
102
128
  - `-h, --help`: Show help message
103
129
 
104
- ## Configuration
105
-
106
- Jeeves stores its configuration in `~/.config/jeeves/`. You can customize the AI prompt by editing the `prompt` file in this directory.
107
-
108
- When you run Jeeves for the first time, if there's no prompt file in the config directory, it will check for a bundled prompt file in the same directory as the script and copy it to the config directory automatically.
109
-
110
130
  ## Examples
111
131
 
112
132
  ```bash
data/config/prompt ADDED
@@ -0,0 +1 @@
1
+ Test prompt for setup_config_dir test
@@ -1,3 +1,3 @@
1
1
  module Jeeves
2
- VERSION = '1.2.0'
2
+ VERSION = '1.4.0'
3
3
  end
data/lib/jeeves.rb CHANGED
@@ -83,18 +83,18 @@ module Jeeves
83
83
  end
84
84
 
85
85
  unless File.exist?(PROMPT_FILE)
86
- # Check for bundled prompt file in the gem's data directory
87
- gem_prompt = File.join(File.dirname(__FILE__), '..', '..', 'prompt')
86
+ # Check for bundled prompt file in the config directory
87
+ config_prompt = File.join(File.dirname(__FILE__), '..', '..', 'config', 'prompt')
88
88
 
89
- if File.exist?(gem_prompt)
89
+ if File.exist?(config_prompt)
90
90
  puts "Copying bundled prompt file to #{PROMPT_FILE}"
91
- FileUtils.cp(gem_prompt, PROMPT_FILE)
91
+ FileUtils.cp(config_prompt, PROMPT_FILE)
92
92
  puts "Prompt file installed successfully."
93
93
  else
94
94
  puts "Error: Prompt file not found at #{PROMPT_FILE}"
95
- puts "No bundled prompt file found at #{gem_prompt}"
95
+ puts "No bundled prompt file found at: #{config_prompt}"
96
96
  puts "Please create a prompt file with your custom prompt."
97
- exit 1
97
+ exit 1 unless defined?(TESTING_MODE) && TESTING_MODE
98
98
  end
99
99
  end
100
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jeeves-git-commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Bishop
@@ -77,9 +77,9 @@ files:
77
77
  - LICENSE
78
78
  - README.md
79
79
  - bin/jeeves
80
+ - config/prompt
80
81
  - lib/jeeves.rb
81
82
  - lib/jeeves/version.rb
82
- - prompt
83
83
  homepage: https://github.com/jubishop/Jeeves
84
84
  licenses:
85
85
  - MIT
data/prompt DELETED
@@ -1,17 +0,0 @@
1
- Generate a git commit message based on the following diff.
2
-
3
- The commit message should:
4
- - Start with an appropriate gitmoji based on the nature of the changes
5
- - Follow the Conventional Commits format (https://www.conventionalcommits.org/en/v1.0.0/)
6
- - Explain WHAT changed, WHY it changed, and HOW it improves or fixes the current state
7
- - Assume the audience is educated software engineers
8
-
9
- Example format:
10
- :emoji: type(scope): concise description
11
-
12
- Detailed explanation of the changes, why they were necessary, and their impact.
13
-
14
- Additional context or technical details when relevant.
15
-
16
- DIFF:
17
- {{DIFF}}