rtfm-filemanager 7.4.0 → 7.4.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 +8 -0
- data/README.md +71 -0
- data/bin/rtfm +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b14592985e916f098fa5cd315891cbfe528408b206dde1a2bf38ca30f7c61f2d
|
|
4
|
+
data.tar.gz: 96757864620b16e89a965cca06635d428fdfa16d290c4c366fd0a1c0e602a41c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef0b6f71dadfa936491fc8974e2ed57256276592de9e48fd52be80f5d4d2d35084fb42e9a718a52e22a3020573fd19296d714ef2ee3355cb2ea4b46688ce73a3
|
|
7
|
+
data.tar.gz: 3cd2798f1d8aba4016150914be9936fb052b30dc10fb2727f48edf3cf88ae096e633f790dc7d7855fc9005244b828e8990ae42989303d3b35071248da0000dd1
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to RTFM will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [7.4.1] - 2025-11-04
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Directory cache invalidation** - Cache now includes file count in addition to mtime
|
|
12
|
+
- Fixes issue where files created by external processes didn't appear
|
|
13
|
+
- Cache automatically invalidates when files are added or deleted
|
|
14
|
+
- More reliable detection of directory changes across filesystems
|
|
15
|
+
|
|
8
16
|
## [7.4.0] - 2025-11-03
|
|
9
17
|
|
|
10
18
|
### Documentation
|
data/README.md
CHANGED
|
@@ -36,6 +36,7 @@ After first run, use `r` command to launch RTFM and exit into your current direc
|
|
|
36
36
|
- [Keyboard Reference](#keyboard-reference)
|
|
37
37
|
- [Remote SSH/SFTP Browsing](#remote-sshsftp-browsing)
|
|
38
38
|
- [Configuration](#configuration)
|
|
39
|
+
- [OpenAI Integration](#openai-integration)
|
|
39
40
|
- [Plugins](#plugins)
|
|
40
41
|
- [Image Display](#image-display)
|
|
41
42
|
- [RTFM vs Ranger](#rtfm-vs-ranger)
|
|
@@ -383,6 +384,76 @@ Configuration stored in `~/.rtfm/conf`
|
|
|
383
384
|
|
|
384
385
|
---
|
|
385
386
|
|
|
387
|
+
## OpenAI Integration
|
|
388
|
+
|
|
389
|
+
RTFM includes built-in AI features powered by OpenAI's API for intelligent file analysis and interactive assistance.
|
|
390
|
+
|
|
391
|
+
### Setup
|
|
392
|
+
|
|
393
|
+
1. **Install the ruby-openai gem:**
|
|
394
|
+
```bash
|
|
395
|
+
gem install ruby-openai
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
2. **Get an API key:**
|
|
399
|
+
- Sign up at https://platform.openai.com/
|
|
400
|
+
- Generate an API key from your account settings
|
|
401
|
+
|
|
402
|
+
3. **Configure RTFM:**
|
|
403
|
+
Add your API key to `~/.rtfm/conf`:
|
|
404
|
+
```ruby
|
|
405
|
+
@ai = "sk-your-actual-api-key-here"
|
|
406
|
+
@aimodel = "gpt-4o-mini" # Optional: default model
|
|
407
|
+
@aicolor = 17 # Optional: chat pane background color
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Features
|
|
411
|
+
|
|
412
|
+
#### File Description (Press `I`)
|
|
413
|
+
|
|
414
|
+
Get an intelligent summary of any file or directory:
|
|
415
|
+
- **Files:** Purpose, code review (for source files), library documentation lookup
|
|
416
|
+
- **Directories:** Overview of structure and contents
|
|
417
|
+
- **Git-aware:** Includes recent changes if in a git repository
|
|
418
|
+
- **Smart analysis:** Automatically includes preview content for context
|
|
419
|
+
|
|
420
|
+
Example uses:
|
|
421
|
+
- Understand unfamiliar codebases quickly
|
|
422
|
+
- Get code review suggestions (bugs, style, improvements)
|
|
423
|
+
- Learn what libraries/APIs are being used
|
|
424
|
+
- See git diff explanations in plain language
|
|
425
|
+
|
|
426
|
+
#### Interactive Chat (Press `Ctrl-a`)
|
|
427
|
+
|
|
428
|
+
Start a conversational AI assistant specialized in:
|
|
429
|
+
- File and directory questions
|
|
430
|
+
- Shell command help and suggestions
|
|
431
|
+
- Terminal workflow assistance
|
|
432
|
+
- Programming and scripting guidance
|
|
433
|
+
|
|
434
|
+
The chat maintains context throughout your RTFM session, so follow-up questions work naturally.
|
|
435
|
+
|
|
436
|
+
### Configuration Options
|
|
437
|
+
|
|
438
|
+
```ruby
|
|
439
|
+
# Model selection (in ~/.rtfm/conf)
|
|
440
|
+
@aimodel = "gpt-4o-mini" # Fast, cost-effective (default)
|
|
441
|
+
@aimodel = "gpt-4o" # More capable, higher cost
|
|
442
|
+
@aimodel = "gpt-4-turbo" # Alternative high-end model
|
|
443
|
+
|
|
444
|
+
# Chat interface color
|
|
445
|
+
@aicolor = 17 # Dark blue background (default)
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### Cost & Privacy
|
|
449
|
+
|
|
450
|
+
- API calls cost money (typically $0.001-0.01 per request with gpt-4o-mini)
|
|
451
|
+
- File contents are sent to OpenAI when using `I` key
|
|
452
|
+
- No data is sent unless you explicitly press `I` or `Ctrl-a`
|
|
453
|
+
- Chat history persists only during your RTFM session
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
386
457
|
## Plugins
|
|
387
458
|
|
|
388
459
|
RTFM supports two types of plugins in `~/.rtfm/plugins/`:
|
data/bin/rtfm
CHANGED
|
@@ -4477,13 +4477,15 @@ def get_cached_dirlist(dir, ls_options, ls_options_with_long = nil) # {{{2
|
|
|
4477
4477
|
# Use ls_options_with_long for display, or fall back to ls_options
|
|
4478
4478
|
ls_options_with_long ||= ls_options
|
|
4479
4479
|
|
|
4480
|
-
# Generate cache key with directory mtime for automatic invalidation
|
|
4480
|
+
# Generate cache key with directory mtime AND file count for automatic invalidation
|
|
4481
|
+
# File count catches additions/deletions that may not update mtime immediately
|
|
4481
4482
|
# Include ls_options_with_long in cache key so toggling @lslong invalidates cache
|
|
4482
4483
|
begin
|
|
4483
4484
|
dir_mtime = File.mtime(dir).to_i
|
|
4484
|
-
|
|
4485
|
+
file_count = Dir.entries(dir).size
|
|
4486
|
+
cache_key = "#{dir}:#{ls_options_with_long}:#{dir_mtime}:#{file_count}"
|
|
4485
4487
|
rescue
|
|
4486
|
-
return nil # Can't cache if we can't get mtime
|
|
4488
|
+
return nil # Can't cache if we can't get mtime or file count
|
|
4487
4489
|
end
|
|
4488
4490
|
|
|
4489
4491
|
# Return cached result if available and fresh
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rtfm-filemanager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.4.
|
|
4
|
+
version: 7.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Geir Isene
|
|
@@ -67,7 +67,7 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '7.4'
|
|
69
69
|
description: |-
|
|
70
|
-
RTFM v7.4.
|
|
70
|
+
RTFM v7.4.1: Fixed directory cache not updating when files added/deleted externally.
|
|
71
71
|
A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. Features include remote SSH/SFTP browsing, interactive SSH shell, comprehensive undo system, bookmarks, and much more. You can bookmark and jump around easily, delete, rename, copy, symlink and move files. RTFM is one of the most feature-packed terminal file managers.
|
|
72
72
|
email: g@isene.com
|
|
73
73
|
executables:
|