giterm 1.0.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.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +24 -0
  3. data/README.md +175 -0
  4. data/giterm +2423 -0
  5. metadata +95 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8bb0366aa299a669ac0a598be355c7ac6a680c5779a0207b77ce08eb9f4ad201
4
+ data.tar.gz: 5fbfaf7ec2512b2001deed99cb708a8ae5a00d4cb5fa00457f56cd193c1b53a0
5
+ SHA512:
6
+ metadata.gz: f3586f793514e2405031582c40017cbf9e934a553d63331c98ac475068ebcef3b1fb490b34c016aca8f5a05ebf6b54ae70f0c587e489bc69b91a347489782fcb
7
+ data.tar.gz: bd9a1e651aa03c53e7289912c4f316c054b4d9e7953f953eb97f12f41ed75022470335e276d854d85109311b98fdefd255916be3bf139283f2f36696fb8897c3
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org>
data/README.md ADDED
@@ -0,0 +1,175 @@
1
+ # GiTerm - Git & GitHub Terminal User Interface
2
+
3
+ ![Ruby](https://img.shields.io/badge/language-Ruby-red) [![Gem Version](https://badge.fury.io/rb/giterm.svg)](https://badge.fury.io/rb/giterm) ![License](https://img.shields.io/badge/license-Public_Domain-green)
4
+
5
+ A powerful Git and GitHub Terminal User Interface (TUI) client written in Ruby using rcurses. Browse repositories, manage issues and pull requests, and perform Git operations - all from your terminal.
6
+
7
+ ## Key Features
8
+
9
+ ### 🔧 Git Operations
10
+ - **Status View** (`s`) - View git status with colored file indicators
11
+ - **Diff View** (`d`) - Show file diffs with syntax highlighting
12
+ - **Log View** (`l`) - Browse commit history with details
13
+ - **Branch Management** (`b`) - List, switch, and manage branches
14
+ - **Stage/Unstage** (`a`/`u`) - Stage or unstage files
15
+ - **Commit** (`c`) - Commit changes with message editor
16
+ - **Push/Pull** (`p`/`P`) - Sync with remote repositories
17
+ - **Repository Switching** (`:cd`) - Change to different git repositories
18
+
19
+ ### 🌐 GitHub Integration
20
+ - **Repository Browser** (`TAB`) - Browse all your GitHub repositories with:
21
+ - Color-coded organizations for visual distinction
22
+ - Star/fork/issue counts
23
+ - Language indicators
24
+ - README preview with delayed fetching
25
+ - File tree exploration
26
+ - **Issues** (`i`) - View repository issues
27
+ - **Pull Requests** (`p` in GitHub mode) - View pull requests
28
+ - **Search** (`/`) - Search across repositories
29
+ - Automatic repository detection from git remote
30
+
31
+ ### 🎯 Enhanced Navigation
32
+ - **List Navigation**
33
+ - `j`/`k` or `↓`/`↑` - Move up/down
34
+ - `PgUp`/`PgDn` - Page up/down
35
+ - `g`/`G` or `HOME`/`END` - Jump to top/bottom
36
+ - Smooth wrapping at list boundaries
37
+
38
+ - **Right Pane Scrolling**
39
+ - `Shift-↓`/`Shift-↑` - Line down/up
40
+ - `Shift-→`/`Shift-←` - Page down/up
41
+
42
+ - **General**
43
+ - `TAB` - Toggle between Git/GitHub modes
44
+ - `h`/`←` - Go back/up one level
45
+ - `l`/`→` or `ENTER` - Enter/view details
46
+ - `?` - Show context-sensitive help
47
+ - `r` - Refresh current view
48
+ - `q` - Quit
49
+
50
+ ### Command Mode
51
+ - `:` - Enter git command mode
52
+ - `!` - Enter shell command mode
53
+
54
+ ## Requirements
55
+
56
+ - Ruby 2.7 or higher
57
+ - rcurses gem (will be installed automatically)
58
+ - Git installed and configured
59
+ - GitHub personal access token (for GitHub features)
60
+
61
+ ## Installation
62
+
63
+ ### Via RubyGems (Recommended)
64
+ ```bash
65
+ gem install giterm
66
+ ```
67
+
68
+ ### Manual Installation
69
+ ```bash
70
+ # Clone the repository
71
+ git clone https://github.com/isene/GiTerm.git
72
+ cd GiTerm
73
+
74
+ # Make executable
75
+ chmod +x giterm
76
+
77
+ # Install dependencies
78
+ gem install rcurses
79
+ ```
80
+
81
+ ## Usage
82
+
83
+ Run GiTerm from within any Git repository:
84
+
85
+ ```bash
86
+ giterm
87
+ ```
88
+
89
+ Or if installed manually:
90
+ ```bash
91
+ ./giterm
92
+ ```
93
+
94
+ ### Interface Layout
95
+
96
+ The interface consists of four panes:
97
+ - **Top Pane**: Current repository, branch, and mode indicator
98
+ - **Left Pane**: List view (files, branches, repos, etc.)
99
+ - **Right Pane**: Detail view with scrollable content
100
+ - **Bottom Pane**: Command input and status messages
101
+
102
+ ### Performance Features
103
+ - **Smart Fetching**: Extended content (README, file lists) fetches after 0.5s pause
104
+ - **Efficient Updates**: Only changed content is redrawn
105
+ - **Mode Memory**: Remembers your position when switching between modes
106
+
107
+ ## Configuration
108
+
109
+ ### GitHub Token Setup
110
+
111
+ To enable GitHub features, set up a personal access token:
112
+
113
+ 1. Create a token at: https://github.com/settings/tokens
114
+ 2. Required scopes: `repo`, `read:user`
115
+ 3. Set the environment variable:
116
+
117
+ ```bash
118
+ # Add to your shell profile (.bashrc, .zshrc, etc.)
119
+ export GITHUB_TOKEN=ghp_your_token_here
120
+ ```
121
+
122
+ ### Custom Configuration
123
+
124
+ GiTerm looks for configuration in the following order:
125
+ 1. Environment variable `GITHUB_TOKEN`
126
+ 2. Git config: `git config --global giterm.token YOUR_TOKEN`
127
+
128
+ ### Additional Commands
129
+
130
+ **Command Mode** (`:`):
131
+ - `:cd /path/to/repo` - Change to a different git repository
132
+ - Any git command - Executes in current repository
133
+
134
+ **Shell Mode** (`!`):
135
+ - Execute any shell command from within GiTerm
136
+
137
+ ## What's New
138
+
139
+ ### Version 1.0.0
140
+ - 🎨 Organization color coding in GitHub mode
141
+ - 📜 Right pane scrolling with Shift+Arrow keys
142
+ - ⚡ Smart delayed fetching for smooth navigation
143
+ - 🔄 Mode-specific index memory
144
+ - 📁 Repository switching with `:cd` command
145
+ - 🐛 Fixed display issues and improved performance
146
+
147
+ ## Design Philosophy
148
+
149
+ GiTerm follows these principles:
150
+ - **Single file implementation** - Easy to understand and modify
151
+ - **Minimal dependencies** - Only requires rcurses
152
+ - **Fast and responsive** - Optimized rendering and smart fetching
153
+ - **Keyboard-driven** - No mouse required
154
+ - **Clean Ruby code** - RuboCop compliant and well-documented
155
+
156
+ ## Contributing
157
+
158
+ Contributions are welcome! Please:
159
+ 1. Fork the repository
160
+ 2. Create your feature branch
161
+ 3. Run RuboCop to ensure code style
162
+ 4. Submit a pull request
163
+
164
+ ## Author
165
+
166
+ Created by Geir Isene ([@isene](https://github.com/isene))
167
+
168
+ ## License
169
+
170
+ Public Domain - Use freely for any purpose.
171
+
172
+ ## See Also
173
+
174
+ - [RTFM](https://github.com/isene/RTFM) - Ruby Terminal File Manager
175
+ - [rcurses](https://github.com/isene/rcurses) - Ruby curses library used by GiTerm