genie_cli 0.1.1 → 0.2.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 +4 -4
- data/README.md +39 -28
- data/lib/genie/session.rb +28 -0
- data/lib/genie/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae88ad33211ea966ef1f55bf6da8497ba8f669e46bec8ed5bf51e70dfc62b0a8
|
4
|
+
data.tar.gz: 4f349cad129aee7c7f8e336a8f7e2846c13caf74a2381bef1e5797b683dbacaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c6dd37077b01500c8bed0e33180cc36ec706d4bbeb66b0d8dbe7e15ac4366f8166d681c3635151ecaa5de724aede4ed82e17b6ab340824140d36e0d7b174e9d
|
7
|
+
data.tar.gz: 5b8d9186b2528f3635d825842e6b98c8b7594e2e69fd680a417d5be231e121d630982d048766d2b4a3840cb16d1a0e695677a24086b407ab162d8db9b25980d0
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Genie CLI
|
2
2
|
|
3
|
-
Genie CLI is a command-line tool that brings Test Driven Development (TDD)
|
4
|
-
principles to life by integrating with a large language model (LLM) through
|
5
|
-
the `ruby_llm` library. It provides an interactive session where you can ask
|
6
|
-
the AI assistant to write tests, implement code, and manage your codebase—all
|
3
|
+
Genie CLI is a command-line tool that brings Test Driven Development (TDD)
|
4
|
+
principles to life by integrating with a large language model (LLM) through
|
5
|
+
the `ruby_llm` library. It provides an interactive session where you can ask
|
6
|
+
the AI assistant to write tests, implement code, and manage your codebase—all
|
7
7
|
while enforcing a strict TDD workflow.
|
8
8
|
|
9
9
|
## Features
|
@@ -23,33 +23,33 @@ while enforcing a strict TDD workflow.
|
|
23
23
|
|
24
24
|
## Installation
|
25
25
|
|
26
|
-
1.
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
```
|
26
|
+
1. Install the gem:
|
27
|
+
```bash
|
28
|
+
gem install genie_cli
|
29
|
+
```
|
31
30
|
|
32
|
-
2.
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
2. Set your OpenAI API key (or other LLM provider keys) in your environment:
|
32
|
+
```bash
|
33
|
+
export OPENAI_API_KEY="your_api_key_here"
|
34
|
+
```
|
35
|
+
|
36
|
+
`dotenv` is also supported:
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
4. Make the CLI executable:
|
43
|
-
```bash
|
44
|
-
chmod +x bin/genie
|
45
|
-
```
|
38
|
+
```
|
39
|
+
# .env
|
40
|
+
OPENAI_API_KEY="your_api_key_here"
|
41
|
+
```
|
46
42
|
|
47
43
|
## Usage
|
48
44
|
|
49
45
|
Start a Genie session by running the `genie` command from the root of your project:
|
50
46
|
|
51
47
|
```bash
|
52
|
-
|
48
|
+
genie "initial prompt or command"
|
49
|
+
```
|
50
|
+
If you are using Bundler, you can run:
|
51
|
+
```bash
|
52
|
+
bundle exec genie "initial prompt or command"
|
53
53
|
```
|
54
54
|
|
55
55
|
- If you provide an initial prompt, the assistant will immediately respond. Otherwise, you'll enter an interactive prompt where you can type your questions or commands.
|
@@ -58,7 +58,7 @@ Start a Genie session by running the `genie` command from the root of your proje
|
|
58
58
|
Example session:
|
59
59
|
|
60
60
|
```bash
|
61
|
-
$
|
61
|
+
$ genie
|
62
62
|
Starting a new session with:
|
63
63
|
base_path: /Users/you/projects/genie_cli
|
64
64
|
|
@@ -81,14 +81,14 @@ Total Conversation Tokens: 1234
|
|
81
81
|
|
82
82
|
## Logging
|
83
83
|
|
84
|
-
The output of `genie` to the terminal includes "essential" output, but not
|
85
|
-
_all_ output. To aid in debugging, the full RubyLLM debug log is saved to
|
86
|
-
`ruby_llm.log`. This can be useful for auditing what's happened during a
|
84
|
+
The output of `genie` to the terminal includes "essential" output, but not
|
85
|
+
_all_ output. To aid in debugging, the full RubyLLM debug log is saved to
|
86
|
+
`ruby_llm.log`. This can be useful for auditing what's happened during a
|
87
87
|
session in great detail.
|
88
88
|
|
89
89
|
## Configuration
|
90
90
|
|
91
|
-
Configuration is available via a `genie.yml
|
91
|
+
Configuration is available via a `genie.yml`.
|
92
92
|
|
93
93
|
## Testing
|
94
94
|
|
@@ -105,3 +105,14 @@ Contributions are welcome! Please fork the repository and open pull requests for
|
|
105
105
|
## License
|
106
106
|
|
107
107
|
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
108
|
+
|
109
|
+
## Why "Genie"?
|
110
|
+
|
111
|
+
[Kent Beck](https://tidyfirst.substack.com) has been using this term to
|
112
|
+
describe LLMs, especially coding agents, because it grants your wishes, but
|
113
|
+
rarely in the way you actually wanted it to. It's a great idea, so I'm
|
114
|
+
shamelessly stealing it.
|
115
|
+
|
116
|
+
## The Lamp
|
117
|
+
|
118
|
+
From https://www.asciiart.website/index.php?art=movies%2Faladdin
|
data/lib/genie/session.rb
CHANGED
@@ -15,6 +15,8 @@ module Genie
|
|
15
15
|
def initialize(config:)
|
16
16
|
@config = config
|
17
17
|
|
18
|
+
Genie.output genie_lamp, color: :yellow
|
19
|
+
|
18
20
|
Genie.output "Starting a new session with:\n base_path: #{base_path}\n model: #{model}\n", color: :green
|
19
21
|
|
20
22
|
# Initialize the LLM chat with the specified model
|
@@ -79,5 +81,31 @@ module Genie
|
|
79
81
|
exit
|
80
82
|
end
|
81
83
|
|
84
|
+
private
|
85
|
+
|
86
|
+
def genie_lamp
|
87
|
+
<<-LAMP
|
88
|
+
..
|
89
|
+
dP/$.
|
90
|
+
$4$$%
|
91
|
+
.ee$$ee.
|
92
|
+
.eF3??????$C$r. .d$$$$$$$$$$$e.
|
93
|
+
.zeez$$$$$be.. JP3F$5'$5K$?K?Je$. d$$$FCLze.CC?$$$e
|
94
|
+
"""??$$$$$$$$ee.. .e$$$e$CC$???$$CC3e$$$$. $$$/$$$$$$$$$.$$$$
|
95
|
+
`"?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$b $$"$$$$P?CCe$$$$$F
|
96
|
+
"?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$b$$J?bd$$$$$$$$$F"
|
97
|
+
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$d$$F"
|
98
|
+
"?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"...
|
99
|
+
"?$$$$$$$$$$$$$$$$$$$$$$$$$F "$$"$$$$b
|
100
|
+
"?$$$$$$$$$$$$$$$$$$F" ?$$$$$F
|
101
|
+
""????????C"
|
102
|
+
e$$$$$$$$$$$$.
|
103
|
+
.$b CC$????$$F3eF
|
104
|
+
4$bC/%$bdd$b@$Pd??Jbbr
|
105
|
+
""?$$$$eeee$$$$F?"
|
106
|
+
|
107
|
+
LAMP
|
108
|
+
end
|
109
|
+
|
82
110
|
end
|
83
111
|
end
|
data/lib/genie/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genie_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff McFadden
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: ruby_llm
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
|
-
rubygems_version: 3.6.
|
176
|
+
rubygems_version: 3.6.9
|
177
177
|
specification_version: 4
|
178
178
|
summary: CLI Coding Agent written in Ruby.
|
179
179
|
test_files: []
|