n2b 0.2.2 → 0.2.3

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -31
  3. data/lib/n2b/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a24dc543659153dabaf892f6bed38934425ac43a1a0b2a263e82c3913e0b5f9
4
- data.tar.gz: 01ccd36a76124d3599a7dd26a5cb1f443c4465e21c5cd12505512c00f771a164
3
+ metadata.gz: 4d669156f98a861c284f95d3f56f9fdad92b5820d288e8f3227e885ed5d13b2a
4
+ data.tar.gz: e20b7578ff3ca46d9062137a930656e7598c4b613329da1984df09b80adffceb
5
5
  SHA512:
6
- metadata.gz: 737d3f29477d61da584640389552ebb01809fc762ec6348ee032ca0ab9fe6a3c2360df103fbe8daa3751a980b0b9c41b1998523c5f74f0b6ebb906e5a4a939dc
7
- data.tar.gz: 5e975752513f183640c391afd46bd322d80da3a488d046d3e7e487f496b96a65c6bc60fae47de4187e2ca455c41d3aa1a6f23acdd2095f2cccaa36cbacbe8427
6
+ metadata.gz: ee2d6aaceaea02c667e03f5ff30e6f08c88e27cd9fa3b3fba97f9cd90b1410684d253bf729993a769ef1b3151839cde6f08f7fa99636001027c8e2cfc1713b59
7
+ data.tar.gz: f10b4515f9191e9f8adb4cacbc6096384f9b6be1697b94f2304130ede32a4360d81f90b9808c4462b8024aeff1982cd54842be64d22085938dbe7cd0b81bd5ab
data/README.md CHANGED
@@ -13,22 +13,45 @@ N2B (Natural Language to Bash & Ruby) is a Ruby gem that leverages AI to convert
13
13
 
14
14
  ## Installation
15
15
 
16
- Add this line to your application's Gemfile:
16
+ ```bash
17
+ gem install n2b
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ### In IRB/Rails Console
23
+
24
+ First, require and extend the N2B module:
17
25
 
18
26
  ```ruby
19
- gem 'n2b'
27
+ require 'n2b'
28
+ extend N2B::IRB
20
29
  ```
21
30
 
22
- And then execute:
31
+ For automatic loading in every IRB session, add these lines to your `~/.irbrc`:
23
32
 
24
- ```bash
25
- $ bundle install
33
+ ```ruby
34
+ require 'n2b'
35
+ extend N2B::IRB
26
36
  ```
27
37
 
28
- Or install it yourself as:
38
+ After loading, you can use the following commands:
29
39
 
30
- ```bash
31
- $ gem install n2b
40
+ - `n2r` - For general Ruby assistance
41
+ - `n2rrbit` - For Errbit error analysis
42
+ - `n2rscrum` - For generating Scrum tickets
43
+
44
+ ### Examples
45
+
46
+ ```ruby
47
+ # Get help with a Ruby question
48
+ n2r "How do I parse JSON in Ruby?"
49
+
50
+ # Analyze an Errbit error
51
+ n2rrbit(url: "your_errbit_url", cookie: "your_cookie")
52
+
53
+ # Generate a Scrum ticket
54
+ n2rscrum "Create a user authentication system"
32
55
  ```
33
56
 
34
57
  ## Configuration
@@ -45,29 +68,6 @@ openai:
45
68
  model: gpt-4 # or gpt-3.5-turbo
46
69
  ```
47
70
 
48
- ## Usage
49
-
50
- ### Convert Natural Language to Bash
51
-
52
- ```ruby
53
- require 'n2b'
54
-
55
- # Convert a natural language instruction to a bash command
56
- N2B::Base.new.n2b("list all jpg files in the current directory")
57
- # => find . -name "*.jpg"
58
- ```
59
-
60
- ### Generate Ruby Code
61
-
62
- ```ruby
63
- require 'n2b'
64
-
65
- # In an IRB console
66
- n2r("create a function that calculates fibonacci numbers")
67
- ```
68
-
69
- This will output both the code and an explanation:
70
-
71
71
  ## Quick Example N2B
72
72
 
73
73
  ```
data/lib/n2b/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # lib/n2b/version.rb
2
2
  module N2B
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: n2b
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Nothegger