appydave-tools 0.78.0 → 0.79.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: 124ae7188a7ab1340f03990ecd808ed1434015bc04f385daa7c3bbd77731c173
4
- data.tar.gz: 72889e8c0d80d5d6513d8cfafe000a41c72af69cc4d187b48f8895f4f8a6bb48
3
+ metadata.gz: ec01667ec40e9b0b051f2e834800cd458c736f27107df033ddebeaf7de413823
4
+ data.tar.gz: 6627f68aefaf25f40cd7d55ba87e8470bd8e5c5a99146927424149b84a31b3b6
5
5
  SHA512:
6
- metadata.gz: 564f33a1b0383c05e65536b44b6ebcac1dc0dd8b4083476ca44172dbe8beac366e2ddfbc8488dbb6c2dd687d52aa7794d000ed8d6d17f4d8583fa7718873e476
7
- data.tar.gz: cdf9e093a0fbdaeb6fda2cdf54bedf82dbbaccda435f9e3d9f87cfb9b8fb671cd071339aefd06dd03875ef07c7676c8cd5682ba120e10cf7cb18c5b51293eb51
6
+ metadata.gz: 8e745ed73fc0f812a6275edb827df2901e5eb0b41c060b4ac68fdc27c9eff750b60b84d2244e21f2b6afb2cda98eacacc3895b6c82502673162202cb31075ddb
7
+ data.tar.gz: 1814d3250ecf2aebf1ccb9cf50e117fc7b9f220334c263b5b1677336848db1cd7e37f9b684df2903aba96ecc69bbad96368c1acc87fbd6addfed4086eeffe00a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [0.78.0](https://github.com/appydave/appydave-tools/compare/v0.77.7...v0.78.0) (2026-04-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * resolve rubocop block length violation in llm_context CLI ([305b65a](https://github.com/appydave/appydave-tools/commit/305b65aca92204b877ed25841a8041e9c5a08683))
7
+
8
+
9
+ ### Features
10
+
11
+ * update gpt_gatherer to llm_gatherer ([acfbf1c](https://github.com/appydave/appydave-tools/commit/acfbf1c09d40b45d2ca211d5f3921af1127f068c))
12
+
1
13
  ## [0.77.7](https://github.com/appydave/appydave-tools/compare/v0.77.6...v0.77.7) (2026-03-20)
2
14
 
3
15
 
data/bin/llm_context.rb CHANGED
@@ -80,6 +80,10 @@ def setup_options(opts, options)
80
80
  opts.on('-t', '--tokens', 'Show estimated token count after collecting context') do
81
81
  options.show_tokens = true
82
82
  end
83
+
84
+ opts.on('--stdin', 'Read file paths from stdin (one per line) instead of using patterns') do
85
+ options.stdin = true
86
+ end
83
87
  end
84
88
 
85
89
  def setup_help_sections(opts)
@@ -96,6 +100,10 @@ def setup_help_sections(opts)
96
100
  opts.separator ' temp - Write to system temp dir, copy path to clipboard'
97
101
  opts.separator ' filename - Write to specified file path'
98
102
  opts.separator ''
103
+ opts.separator 'INPUT MODES'
104
+ opts.separator ' Patterns (default): -i <glob> and -e <exclude_glob>'
105
+ opts.separator ' Stdin: --stdin (read file paths from stdin, one per line)'
106
+ opts.separator ''
99
107
  opts.separator 'EXAMPLES'
100
108
  opts.separator ' # Gather Ruby library code for AI context'
101
109
  opts.separator " llm_context -i 'lib/**/*.rb' -e 'spec/**/*' -d"
@@ -109,6 +117,9 @@ def setup_help_sections(opts)
109
117
  opts.separator ' # Write to system temp dir and copy path to clipboard'
110
118
  opts.separator " llm_context -i 'lib/**/*.rb' -o temp"
111
119
  opts.separator ''
120
+ opts.separator ' # Read file paths from stdin'
121
+ opts.separator " find lib -name '*.rb' | llm_context --stdin -o temp"
122
+ opts.separator ''
112
123
  opts.separator ' # Generate aider command'
113
124
  opts.separator " llm_context -i 'lib/**/*.rb' -f aider -p 'Add logging'"
114
125
  opts.separator ''
@@ -140,10 +151,16 @@ end
140
151
 
141
152
  parser.parse!
142
153
 
143
- if options.include_patterns.empty? && options.exclude_patterns.empty?
154
+ # Handle stdin file paths
155
+ if options.stdin
156
+ options.file_paths = $stdin.readlines.map(&:chomp).reject(&:empty?)
157
+ options.working_directory = Dir.pwd unless options.working_directory
158
+ end
159
+
160
+ if options.include_patterns.empty? && options.exclude_patterns.empty? && options.file_paths.empty?
144
161
  script_name = File.basename($PROGRAM_NAME, File.extname($PROGRAM_NAME))
145
162
 
146
- puts 'No options provided to LLM Context. Please specify patterns to include or exclude.'
163
+ puts 'No options provided to LLM Context. Please specify patterns to include or exclude, or use --stdin.'
147
164
  puts "For help, run: #{script_name} --help"
148
165
  exit
149
166
  end
@@ -13,6 +13,7 @@ module Appydave
13
13
  @format = options.format
14
14
  @working_directory = File.expand_path(options.working_directory)
15
15
  @line_limit = options.line_limit
16
+ @file_paths = options.file_paths
16
17
  end
17
18
 
18
19
  def build
@@ -23,6 +24,22 @@ module Appydave
23
24
 
24
25
  private
25
26
 
27
+ def collect_files
28
+ if @file_paths.any?
29
+ # Use file paths directly (from stdin)
30
+ @file_paths.reject { |f| excluded?(f) || File.directory?(f) }
31
+ else
32
+ # Use glob patterns
33
+ files = []
34
+ @include_patterns.each do |pattern|
35
+ Dir.glob(pattern).each do |file_path|
36
+ files << file_path unless excluded?(file_path) || File.directory?(file_path)
37
+ end
38
+ end
39
+ files
40
+ end
41
+ end
42
+
26
43
  def build_formats
27
44
  @format.split(',').map do |fmt|
28
45
  case fmt
@@ -38,13 +55,9 @@ module Appydave
38
55
  def build_content
39
56
  concatenated_content = []
40
57
 
41
- @include_patterns.each do |pattern|
42
- Dir.glob(pattern).each do |file_path|
43
- next if excluded?(file_path) || File.directory?(file_path)
44
-
45
- content = "# file: #{file_path}\n\n#{read_file_content(file_path)}"
46
- concatenated_content << content
47
- end
58
+ collect_files.each do |file_path|
59
+ content = "# file: #{file_path}\n\n#{read_file_content(file_path)}"
60
+ concatenated_content << content
48
61
  end
49
62
 
50
63
  concatenated_content.join("\n\n")
@@ -60,13 +73,9 @@ module Appydave
60
73
  def build_tree
61
74
  tree_view = {}
62
75
 
63
- @include_patterns.each do |pattern|
64
- Dir.glob(pattern).each do |file_path|
65
- next if excluded?(file_path)
66
-
67
- path_parts = file_path.split('/')
68
- insert_into_tree(tree_view, path_parts)
69
- end
76
+ collect_files.each do |file_path|
77
+ path_parts = file_path.split('/')
78
+ insert_into_tree(tree_view, path_parts)
70
79
  end
71
80
 
72
81
  build_tree_pretty(tree_view).rstrip
@@ -96,22 +105,14 @@ module Appydave
96
105
  'content' => []
97
106
  }
98
107
 
99
- # Building tree structure in JSON
100
- @include_patterns.each do |pattern|
101
- Dir.glob(pattern).each do |file_path|
102
- next if excluded?(file_path)
108
+ collect_files.each do |file_path|
109
+ path_parts = file_path.split('/')
110
+ insert_into_tree(json_output['tree'], path_parts)
103
111
 
104
- path_parts = file_path.split('/')
105
- insert_into_tree(json_output['tree'], path_parts)
106
-
107
- # Building content structure in JSON
108
- next if excluded?(file_path) || File.directory?(file_path)
109
-
110
- json_output['content'] << {
111
- 'file' => file_path,
112
- 'content' => read_file_content(file_path)
113
- }
114
- end
112
+ json_output['content'] << {
113
+ 'file' => file_path,
114
+ 'content' => read_file_content(file_path)
115
+ }
115
116
  end
116
117
 
117
118
  JSON.pretty_generate(json_output)
@@ -120,15 +121,7 @@ module Appydave
120
121
  def build_aider
121
122
  return '' unless @options.prompt
122
123
 
123
- files = []
124
- @include_patterns.each do |pattern|
125
- Dir.glob(pattern).each do |file_path|
126
- next if excluded?(file_path) || File.directory?(file_path)
127
-
128
- files << file_path
129
- end
130
- end
131
-
124
+ files = collect_files
132
125
  "aider --message \"#{@options.prompt}\" #{files.join(' ')}"
133
126
  end
134
127
 
@@ -14,6 +14,8 @@ module Appydave
14
14
  :working_directory,
15
15
  :prompt,
16
16
  :show_tokens,
17
+ :file_paths,
18
+ :stdin,
17
19
  keyword_init: true
18
20
  ) do
19
21
  def initialize(**args)
@@ -25,6 +27,8 @@ module Appydave
25
27
  self.output_target ||= []
26
28
  self.prompt ||= nil
27
29
  self.show_tokens ||= false
30
+ self.file_paths ||= []
31
+ self.stdin ||= false
28
32
  end
29
33
  end
30
34
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- VERSION = '0.78.0'
5
+ VERSION = '0.79.0'
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.78.0",
3
+ "version": "0.79.0",
4
4
  "description": "AppyDave YouTube Automation Tools",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appydave-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.78.0
4
+ version: 0.79.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys