appydave-tools 0.76.14 → 0.77.1
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/CHANGELOG.md +14 -0
- data/bin/dam +8 -0
- data/bin/gpt_context.rb +21 -0
- data/lib/appydave/tools/dam/project_listing.rb +29 -13
- data/lib/appydave/tools/gpt_context/options.rb +2 -0
- data/lib/appydave/tools/version.rb +1 -1
- data/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5bb80f1399525dd67ac1f68eced61e491e221b779a40e224cb2a03a1dc7a6f46
|
|
4
|
+
data.tar.gz: 6867dacd1114f9136d86a3523700ecdf5e7e8c233f4cc6abb52a8f9ce69473ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96fd687c6f970170d686713e1fae167d539517eca0d9b1560ed7560edaecf152786d71bf62c3900bba6f2c899cf4e3af6c9941935d7fe4fc4b507ccddb1aae13
|
|
7
|
+
data.tar.gz: 432407087552c90764ebde7fbc5724b882e230328fb274045fe1cb7bf81251d0d2ff5b3e47aada1d83b383451b3518b89a7e007f376800b8d59b5c88d4a24997
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [0.77.0](https://github.com/appydave/appydave-tools/compare/v0.76.14...v0.77.0) (2026-03-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add --tokens flag to gpt_context for estimated token count output ([2c6b9c4](https://github.com/appydave/appydave-tools/commit/2c6b9c489f82e037b98713bfdc750fa8f65e70ea))
|
|
7
|
+
|
|
8
|
+
## [0.76.14](https://github.com/appydave/appydave-tools/compare/v0.76.13...v0.76.14) (2026-03-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add brand resolution integration spec covering BrandResolver, Config, ProjectResolver chain ([af571e7](https://github.com/appydave/appydave-tools/commit/af571e7669397c3e4964a77b4275d36476caaf5a))
|
|
14
|
+
|
|
1
15
|
## [0.76.13](https://github.com/appydave/appydave-tools/compare/v0.76.12...v0.76.13) (2026-03-19)
|
|
2
16
|
|
|
3
17
|
|
data/bin/dam
CHANGED
|
@@ -155,6 +155,8 @@ class VatCLI
|
|
|
155
155
|
# S3 Upload
|
|
156
156
|
def s3_up_command(args)
|
|
157
157
|
options = Appydave::Tools::Dam::S3ArgParser.parse_s3(args, 's3-up')
|
|
158
|
+
verb = options[:dry_run] ? '🔍 Dry run:' : '⬆️ Uploading'
|
|
159
|
+
puts "#{verb} #{options[:project]} (#{options[:brand]}) → S3..."
|
|
158
160
|
s3_ops = Appydave::Tools::Dam::S3Operations.new(options[:brand], options[:project])
|
|
159
161
|
s3_ops.upload(dry_run: options[:dry_run])
|
|
160
162
|
rescue StandardError => e
|
|
@@ -165,6 +167,8 @@ class VatCLI
|
|
|
165
167
|
# S3 Download
|
|
166
168
|
def s3_down_command(args)
|
|
167
169
|
options = Appydave::Tools::Dam::S3ArgParser.parse_s3(args, 's3-down')
|
|
170
|
+
verb = options[:dry_run] ? '🔍 Dry run:' : '⬇️ Downloading'
|
|
171
|
+
puts "#{verb} #{options[:project]} (#{options[:brand]}) from S3..."
|
|
168
172
|
s3_ops = Appydave::Tools::Dam::S3Operations.new(options[:brand], options[:project])
|
|
169
173
|
s3_ops.download(dry_run: options[:dry_run])
|
|
170
174
|
rescue StandardError => e
|
|
@@ -175,6 +179,7 @@ class VatCLI
|
|
|
175
179
|
# S3 Status
|
|
176
180
|
def s3_status_command(args)
|
|
177
181
|
options = Appydave::Tools::Dam::S3ArgParser.parse_s3(args, 's3-status')
|
|
182
|
+
puts "🔍 Checking S3 status: #{options[:project]} (#{options[:brand]})..."
|
|
178
183
|
s3_ops = Appydave::Tools::Dam::S3Operations.new(options[:brand], options[:project])
|
|
179
184
|
s3_ops.status
|
|
180
185
|
rescue StandardError => e
|
|
@@ -228,6 +233,8 @@ class VatCLI
|
|
|
228
233
|
# Archive project to SSD
|
|
229
234
|
def archive_command(args)
|
|
230
235
|
options = Appydave::Tools::Dam::S3ArgParser.parse_s3(args, 'archive')
|
|
236
|
+
verb = options[:dry_run] ? '🔍 Dry run:' : '📦 Archiving'
|
|
237
|
+
puts "#{verb} #{options[:project]} (#{options[:brand]}) → SSD..."
|
|
231
238
|
s3_ops = Appydave::Tools::Dam::S3Operations.new(options[:brand], options[:project])
|
|
232
239
|
s3_ops.archive(force: options[:force], dry_run: options[:dry_run])
|
|
233
240
|
rescue StandardError => e
|
|
@@ -321,6 +328,7 @@ class VatCLI
|
|
|
321
328
|
# Sync specific brand
|
|
322
329
|
Appydave::Tools::Dam::Config.expand_brand(brand_arg)
|
|
323
330
|
|
|
331
|
+
puts "🔄 Syncing #{brand_arg} from SSD..."
|
|
324
332
|
syncer = Appydave::Tools::Dam::SyncFromSsd.new(brand_arg)
|
|
325
333
|
syncer.sync(dry_run: dry_run)
|
|
326
334
|
else
|
data/bin/gpt_context.rb
CHANGED
|
@@ -79,6 +79,10 @@ OptionParser.new do |opts|
|
|
|
79
79
|
options.prompt = message
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
opts.on('-t', '--tokens', 'Show estimated token count after collecting context') do
|
|
83
|
+
options.show_tokens = true
|
|
84
|
+
end
|
|
85
|
+
|
|
82
86
|
opts.separator ''
|
|
83
87
|
opts.separator 'OUTPUT FORMATS'
|
|
84
88
|
opts.separator ' tree - Directory tree structure'
|
|
@@ -132,6 +136,23 @@ options.working_directory ||= Dir.pwd
|
|
|
132
136
|
gatherer = Appydave::Tools::GptContext::FileCollector.new(options)
|
|
133
137
|
content = gatherer.build
|
|
134
138
|
|
|
139
|
+
if options.show_tokens
|
|
140
|
+
token_estimate = (content.length / 4.0).ceil
|
|
141
|
+
char_count = content.length
|
|
142
|
+
warn ''
|
|
143
|
+
warn '── Token Estimate ──────────────────────────'
|
|
144
|
+
warn " Characters : #{char_count.to_s.rjust(10)}"
|
|
145
|
+
warn " Tokens (~4c): #{token_estimate.to_s.rjust(10)}"
|
|
146
|
+
warn ''
|
|
147
|
+
if token_estimate > 200_000
|
|
148
|
+
warn ' ⚠️ WARNING: Exceeds 200k tokens — may not fit most LLM context windows'
|
|
149
|
+
elsif token_estimate > 100_000
|
|
150
|
+
warn ' ⚠️ NOTICE: Exceeds 100k tokens — check your LLM context limit'
|
|
151
|
+
end
|
|
152
|
+
warn '────────────────────────────────────────────'
|
|
153
|
+
warn ''
|
|
154
|
+
end
|
|
155
|
+
|
|
135
156
|
if %w[info debug].include?(options.debug)
|
|
136
157
|
puts '-' * 80
|
|
137
158
|
puts content
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'io/console'
|
|
4
|
+
|
|
3
5
|
# rubocop:disable Style/FormatStringToken
|
|
4
6
|
# Disabled: Using simple unannotated tokens (%s) for straightforward string formatting
|
|
5
7
|
# Annotated tokens (%<foo>s) add unnecessary complexity for simple table formatting
|
|
@@ -28,13 +30,13 @@ module Appydave
|
|
|
28
30
|
'GIT S3 SYNC PATH SSD BACKUP ' \
|
|
29
31
|
'WORKFLOW ACTIVE'
|
|
30
32
|
puts header
|
|
31
|
-
puts '-' * 200
|
|
33
|
+
puts '-' * [terminal_width, 200].min
|
|
32
34
|
else
|
|
33
35
|
header = 'BRAND KEY PROJECTS SIZE LAST MODIFIED ' \
|
|
34
36
|
'GIT PATH SSD BACKUP ' \
|
|
35
37
|
'WORKFLOW ACTIVE'
|
|
36
38
|
puts header
|
|
37
|
-
puts '-' * 189
|
|
39
|
+
puts '-' * [terminal_width, 189].min
|
|
38
40
|
end
|
|
39
41
|
|
|
40
42
|
brand_data.each do |data|
|
|
@@ -50,7 +52,7 @@ module Appydave
|
|
|
50
52
|
format_date(data[:modified]),
|
|
51
53
|
data[:git_status],
|
|
52
54
|
data[:s3_sync],
|
|
53
|
-
shorten_path(data[:path]),
|
|
55
|
+
truncate_path(shorten_path(data[:path]), 35),
|
|
54
56
|
data[:ssd_backup] || 'N/A',
|
|
55
57
|
data[:workflow] || 'N/A',
|
|
56
58
|
data[:active_count] || 0
|
|
@@ -64,7 +66,7 @@ module Appydave
|
|
|
64
66
|
format_size(data[:size]),
|
|
65
67
|
format_date(data[:modified]),
|
|
66
68
|
data[:git_status],
|
|
67
|
-
shorten_path(data[:path]),
|
|
69
|
+
truncate_path(shorten_path(data[:path]), 35),
|
|
68
70
|
data[:ssd_backup] || 'N/A',
|
|
69
71
|
data[:workflow] || 'N/A',
|
|
70
72
|
data[:active_count] || 0
|
|
@@ -85,7 +87,7 @@ module Appydave
|
|
|
85
87
|
'GIT',
|
|
86
88
|
'S3 SYNC'
|
|
87
89
|
)
|
|
88
|
-
puts '-' * 133
|
|
90
|
+
puts '-' * [terminal_width, 133].min
|
|
89
91
|
else
|
|
90
92
|
puts format(
|
|
91
93
|
'%-30s %-15s %10s %12s %20s %-15s',
|
|
@@ -96,7 +98,7 @@ module Appydave
|
|
|
96
98
|
'LAST MODIFIED',
|
|
97
99
|
'GIT'
|
|
98
100
|
)
|
|
99
|
-
puts '-' * 122
|
|
101
|
+
puts '-' * [terminal_width, 122].min
|
|
100
102
|
end
|
|
101
103
|
# rubocop:enable Style/RedundantFormat
|
|
102
104
|
|
|
@@ -193,7 +195,7 @@ module Appydave
|
|
|
193
195
|
'S3 ↑ UPLOAD',
|
|
194
196
|
'S3 ↓ DOWNLOAD'
|
|
195
197
|
)
|
|
196
|
-
puts '-' * 280
|
|
198
|
+
puts '-' * [terminal_width, 280].min
|
|
197
199
|
else
|
|
198
200
|
puts format(
|
|
199
201
|
'%-45s %12s %15s %-15s %-65s %-18s %-18s %-30s',
|
|
@@ -206,7 +208,7 @@ module Appydave
|
|
|
206
208
|
'LIGHT FILES',
|
|
207
209
|
'SSD BACKUP'
|
|
208
210
|
)
|
|
209
|
-
puts '-' * 239
|
|
211
|
+
puts '-' * [terminal_width, 239].min
|
|
210
212
|
end
|
|
211
213
|
# rubocop:enable Style/RedundantFormat
|
|
212
214
|
|
|
@@ -224,7 +226,7 @@ module Appydave
|
|
|
224
226
|
age_display,
|
|
225
227
|
data[:git_status],
|
|
226
228
|
data[:s3_sync],
|
|
227
|
-
shorten_path(data[:path]),
|
|
229
|
+
truncate_path(shorten_path(data[:path]), 65),
|
|
228
230
|
data[:heavy_files] || 'N/A',
|
|
229
231
|
data[:light_files] || 'N/A',
|
|
230
232
|
data[:ssd_backup] || 'N/A',
|
|
@@ -238,7 +240,7 @@ module Appydave
|
|
|
238
240
|
format_size(data[:size]),
|
|
239
241
|
age_display,
|
|
240
242
|
data[:git_status],
|
|
241
|
-
shorten_path(data[:path]),
|
|
243
|
+
truncate_path(shorten_path(data[:path]), 65),
|
|
242
244
|
data[:heavy_files] || 'N/A',
|
|
243
245
|
data[:light_files] || 'N/A',
|
|
244
246
|
data[:ssd_backup] || 'N/A'
|
|
@@ -257,7 +259,7 @@ module Appydave
|
|
|
257
259
|
'GIT',
|
|
258
260
|
'S3'
|
|
259
261
|
)
|
|
260
|
-
puts '-' * 130
|
|
262
|
+
puts '-' * [terminal_width, 130].min
|
|
261
263
|
else
|
|
262
264
|
puts format(
|
|
263
265
|
'%-45s %12s %15s %-15s',
|
|
@@ -266,7 +268,7 @@ module Appydave
|
|
|
266
268
|
'AGE',
|
|
267
269
|
'GIT'
|
|
268
270
|
)
|
|
269
|
-
puts '-' * 117
|
|
271
|
+
puts '-' * [terminal_width, 117].min
|
|
270
272
|
end
|
|
271
273
|
# rubocop:enable Style/RedundantFormat
|
|
272
274
|
|
|
@@ -342,7 +344,7 @@ module Appydave
|
|
|
342
344
|
match_count = matches.size
|
|
343
345
|
puts "#{match_count} project#{'s' if match_count != 1} matching '#{pattern}' in #{brand}:"
|
|
344
346
|
puts 'PROJECT SIZE AGE'
|
|
345
|
-
puts '-' * 100
|
|
347
|
+
puts '-' * [terminal_width, 100].min
|
|
346
348
|
|
|
347
349
|
# Print table rows
|
|
348
350
|
project_data.each do |data|
|
|
@@ -654,6 +656,20 @@ module Appydave
|
|
|
654
656
|
def self.shorten_path(path)
|
|
655
657
|
path.sub(Dir.home, '~')
|
|
656
658
|
end
|
|
659
|
+
|
|
660
|
+
# Truncate path to max_width, preserving the tail with ellipsis prefix
|
|
661
|
+
def self.truncate_path(path, max_width = 35)
|
|
662
|
+
return path if path.nil? || path.length <= max_width
|
|
663
|
+
|
|
664
|
+
"...#{path[-(max_width - 3)..]}"
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
# Return terminal width, defaulting to 120 if unavailable
|
|
668
|
+
def self.terminal_width
|
|
669
|
+
IO.console&.winsize&.last || 120
|
|
670
|
+
rescue StandardError
|
|
671
|
+
120
|
|
672
|
+
end
|
|
657
673
|
end
|
|
658
674
|
end
|
|
659
675
|
end
|
|
@@ -13,6 +13,7 @@ module Appydave
|
|
|
13
13
|
:output_target,
|
|
14
14
|
:working_directory,
|
|
15
15
|
:prompt,
|
|
16
|
+
:show_tokens,
|
|
16
17
|
keyword_init: true
|
|
17
18
|
) do
|
|
18
19
|
def initialize(**args)
|
|
@@ -23,6 +24,7 @@ module Appydave
|
|
|
23
24
|
self.debug ||= 'none'
|
|
24
25
|
self.output_target ||= []
|
|
25
26
|
self.prompt ||= nil
|
|
27
|
+
self.show_tokens ||= false
|
|
26
28
|
end
|
|
27
29
|
end
|
|
28
30
|
end
|
data/package.json
CHANGED