gh-manager-cli 1.22.0 → 1.24.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.
package/CHANGELOG.md CHANGED
@@ -1,23 +1,16 @@
1
- # [1.22.0](https://github.com/wiiiimm/gh-manager-cli/compare/v1.21.0...v1.22.0) (2025-09-03)
1
+ # [1.24.0](https://github.com/wiiiimm/gh-manager-cli/compare/v1.23.0...v1.24.0) (2025-09-05)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * reorganize main UI footer into 4 logical groups ([bf61102](https://github.com/wiiiimm/gh-manager-cli/commit/bf61102745487cc79cf346d8b71bd5361893cc4c))
6
+ * add app name with version to --help output ([3376c48](https://github.com/wiiiimm/gh-manager-cli/commit/3376c480186c506f125a62ab444f3e3d321ba82c))
7
7
 
8
- # [1.21.0](https://github.com/wiiiimm/gh-manager-cli/compare/v1.20.0...v1.21.0) (2025-09-03)
8
+ # [1.23.0](https://github.com/wiiiimm/gh-manager-cli/compare/v1.22.0...v1.23.0) (2025-09-04)
9
9
 
10
10
 
11
11
  ### Features
12
12
 
13
- * add repository URL copying modal with interactive selection ([#24](https://github.com/wiiiimm/gh-manager-cli/issues/24)) ([45998e9](https://github.com/wiiiimm/gh-manager-cli/commit/45998e966805da7277a5fa6506e2b94c0d8dde39))
14
-
15
- # [1.20.0](https://github.com/wiiiimm/gh-manager-cli/compare/v1.19.2...v1.20.0) (2025-09-03)
16
-
17
-
18
- ### Features
19
-
20
- * add repository rename functionality ([#23](https://github.com/wiiiimm/gh-manager-cli/issues/23)) ([4f25a7d](https://github.com/wiiiimm/gh-manager-cli/commit/4f25a7d080f678a91f846dddf78734d02fa69b91))
13
+ * Enhanced rate limit display showing both GraphQL and REST API limits ([#25](https://github.com/wiiiimm/gh-manager-cli/issues/25)) ([1220a0f](https://github.com/wiiiimm/gh-manager-cli/commit/1220a0fe04da035dafab2ce8555a73ff95b96ea1))
21
14
 
22
15
  ## [1.19.2](https://github.com/wiiiimm/gh-manager-cli/compare/v1.19.1...v1.19.2) (2025-09-03)
23
16
 
package/README.md CHANGED
@@ -60,10 +60,8 @@ On first run, you'll be prompted to authenticate with GitHub (OAuth recommended)
60
60
  - **Repository Actions**:
61
61
  - View detailed info (`I`) - Shows repository metadata, language, size, and timestamps
62
62
  - Open in browser (Enter/`O`)
63
- - Copy repository URLs (`C`) - Interactive modal to copy SSH or HTTPS clone URLs with keyboard navigation
64
63
  - Delete repository (`Del` or `Backspace`) with secure two-step confirmation
65
64
  - Archive/unarchive repositories (`Ctrl+A`) with confirmation prompts
66
- - Rename repository (`Ctrl+R`) with real-time validation
67
65
  - Change repository visibility (`Ctrl+V`) - Switch between Public, Private, and Internal (enterprise only)
68
66
  - Sync forks with upstream (`Ctrl+S`) with automatic conflict detection
69
67
 
@@ -76,7 +74,7 @@ On first run, you'll be prompted to authenticate with GitHub (OAuth recommended)
76
74
  - **Interactive Modals**: Sort selection, visibility filtering, organization switching, and visibility change dialogs
77
75
  - **Balanced Layout**: Repository items with spacing above and below for better visual hierarchy
78
76
  - **Loading States**: Contextual loading screens for sorting and refreshing operations
79
- - **Rate Limit Monitoring**: Live API usage display with visual warnings
77
+ - **Rate Limit Monitoring**: Dual API rate limit display (GraphQL & REST) with real-time usage deltas and visual warnings
80
78
 
81
79
  ### Technical Features
82
80
  - **Preference Persistence**: UI settings (sort, density, visibility filter, fork tracking) saved between sessions
@@ -89,19 +87,19 @@ On first run, you'll be prompted to authenticate with GitHub (OAuth recommended)
89
87
 
90
88
  ## Installation
91
89
 
92
- ### NPX (Recommended - No Installation Required)
93
-
94
- Run instantly without installing:
90
+ ### Homebrew (macOS/Linux)
95
91
 
96
92
  ```bash
97
- npx gh-manager-cli
93
+ brew tap wiiiimm/tap
94
+ brew install gh-manager-cli
98
95
  ```
99
96
 
100
- ### Homebrew (macOS/Linux)
97
+ ### NPX (Recommended - No Installation Required)
98
+
99
+ Run instantly without installing:
101
100
 
102
101
  ```bash
103
- brew tap wiiiimm/tap
104
- brew install gh-manager-cli
102
+ npx gh-manager-cli
105
103
  ```
106
104
 
107
105
  ### NPM Global Install
@@ -259,15 +257,7 @@ Launch the app, then use the keys below:
259
257
  ### Repository Actions
260
258
  - **Repository info**: `I` to view detailed metadata (size, language, timestamps)
261
259
  - **Cache info**: `K` to inspect Apollo cache status
262
- - **Copy URLs**: `C` to open interactive modal for copying SSH or HTTPS clone URLs
263
- - SSH selected by default with visual indicators (▶)
264
- - Up/Down arrows to select between SSH and HTTPS
265
- - Enter to copy selected URL, or use `S`/`H` shortcuts
266
- - Multiple close options: Esc, Q, C
267
260
  - **Archive/Unarchive**: `Ctrl+A` with confirmation prompt
268
- - **Rename repository**: `Ctrl+R` to rename (with real-time validation)
269
- - Enter new name → confirm (Enter)
270
- - Cancel: press Esc
271
261
  - **Change visibility**: `Ctrl+V` to change repository visibility (Public/Private/Internal)
272
262
  - **Delete repository**: `Del` or `Backspace` (with two-step confirmation modal)
273
263
  - Type confirmation code → confirm (Y/Enter)
@@ -316,7 +306,7 @@ Project layout:
316
306
  - `src/ui/App.tsx` — token bootstrap, renders `RepoList`
317
307
  - `src/ui/RepoList.tsx` — main list UI with modal management
318
308
  - `src/ui/components/` — modular components (modals, repo, common)
319
- - `modals/` — DeleteModal, ArchiveModal, RenameModal, SyncModal, InfoModal, LogoutModal
309
+ - `modals/` — DeleteModal, ArchiveModal, SyncModal, InfoModal, LogoutModal
320
310
  - `repo/` — RepoRow, FilterInput, RepoListHeader
321
311
  - `common/` — SlowSpinner and shared UI elements
322
312
  - `src/ui/OrgSwitcher.tsx` — organization switching component
@@ -433,9 +423,7 @@ For the up-to-date task board, see [TODOs.md](./TODOs.md).
433
423
  Recently implemented:
434
424
  - ✅ OAuth login flow as an alternative to Personal Access Token
435
425
  - ✅ Density toggle for row spacing (compact/cozy/comfy)
436
- - ✅ Repo actions (archive/unarchive, delete, rename, change visibility) with confirmations
437
- - ✅ Repository renaming with real-time validation (`Ctrl+R`)
438
- - ✅ Repository URL copying modal (`C`) with interactive SSH/HTTPS selection
426
+ - ✅ Repo actions (archive/unarchive, delete, change visibility) with confirmations
439
427
  - ✅ Organization support and switching (press `W`) with enterprise detection
440
428
  - ✅ Enhanced server-side search with improved UX and organization context support
441
429
  - ✅ Smart infinite scroll with 80% prefetch trigger
@@ -443,10 +431,12 @@ Recently implemented:
443
431
  - ✅ GitHub Enterprise support with Internal repository visibility
444
432
  - ✅ Change repository visibility modal (`Ctrl+V`)
445
433
  - ✅ Compact filter modals for better screen space utilization
434
+ - ✅ Enhanced rate limit display showing both GraphQL and REST API limits with delta tracking
446
435
 
447
436
  Highlights on deck:
448
437
  - Optional OS keychain storage via `keytar`
449
438
  - Bulk selection and actions
439
+ - Repository renaming
450
440
 
451
441
  ## License
452
442
 
@@ -1211,52 +1211,38 @@ async function updateCacheWithRepository(token, repository) {
1211
1211
  } catch {
1212
1212
  }
1213
1213
  }
1214
- async function updateCacheAfterRename(token, repositoryId, newName, nameWithOwner) {
1214
+ async function fetchRestRateLimits(token) {
1215
1215
  try {
1216
- const ap = await makeApolloClient(token);
1217
- if (!ap || !ap.client) return;
1218
- ap.client.cache.modify({
1219
- id: `Repository:${repositoryId}`,
1220
- fields: {
1221
- name: () => newName,
1222
- nameWithOwner: () => nameWithOwner
1216
+ logger.debug("Fetching REST API rate limits");
1217
+ const response = await fetch("https://api.github.com/rate_limit", {
1218
+ headers: {
1219
+ "Authorization": `token ${token}`,
1220
+ "Accept": "application/vnd.github+json",
1221
+ "User-Agent": "gh-manager-cli"
1223
1222
  }
1224
1223
  });
1225
- } catch {
1226
- }
1227
- }
1228
- async function renameRepositoryById(client, repositoryId, newName) {
1229
- logger.info("Renaming repository", {
1230
- repositoryId,
1231
- newName
1232
- });
1233
- const mutation = (
1234
- /* GraphQL */
1235
- `
1236
- mutation RenameRepo($repositoryId: ID!, $name: String!) {
1237
- updateRepository(input: { repositoryId: $repositoryId, name: $name }) {
1238
- repository {
1239
- id
1240
- name
1241
- nameWithOwner
1242
- }
1243
- }
1224
+ if (!response.ok) {
1225
+ logger.error("Failed to fetch REST rate limits", {
1226
+ status: response.status,
1227
+ statusText: response.statusText
1228
+ });
1229
+ return null;
1244
1230
  }
1245
- `
1246
- );
1247
- try {
1248
- const result = await client(mutation, { repositoryId, name: newName });
1249
- logger.info("Repository renamed successfully", {
1250
- repositoryId,
1251
- newName: result?.updateRepository?.repository?.name
1231
+ const data = await response.json();
1232
+ logger.debug("Successfully fetched REST rate limits", {
1233
+ core: data.resources?.core,
1234
+ graphql: data.resources?.graphql
1252
1235
  });
1236
+ return {
1237
+ core: data.resources?.core || { limit: 0, remaining: 0, reset: 0 },
1238
+ graphql: data.resources?.graphql || { limit: 0, remaining: 0, reset: 0 }
1239
+ };
1253
1240
  } catch (error) {
1254
- logger.error("Failed to rename repository", {
1255
- repositoryId,
1256
- newName,
1257
- error: error.message
1241
+ logger.error("Error fetching REST rate limits", {
1242
+ error: error.message,
1243
+ stack: error.stack
1258
1244
  });
1259
- throw error;
1245
+ return null;
1260
1246
  }
1261
1247
  }
1262
1248
  async function inspectCacheStatus() {
@@ -1327,7 +1313,6 @@ export {
1327
1313
  updateCacheAfterArchive,
1328
1314
  updateCacheAfterVisibilityChange,
1329
1315
  updateCacheWithRepository,
1330
- updateCacheAfterRename,
1331
- renameRepositoryById,
1316
+ fetchRestRateLimits,
1332
1317
  inspectCacheStatus
1333
1318
  };
@@ -5,6 +5,7 @@ import {
5
5
  checkOrganizationIsEnterprise,
6
6
  deleteRepositoryRest,
7
7
  fetchRepositoryById,
8
+ fetchRestRateLimits,
8
9
  fetchViewerOrganizations,
9
10
  fetchViewerReposPage,
10
11
  fetchViewerReposPageUnified,
@@ -13,22 +14,21 @@ import {
13
14
  inspectCacheStatus,
14
15
  makeClient,
15
16
  purgeApolloCacheFiles,
16
- renameRepositoryById,
17
17
  searchRepositoriesUnified,
18
18
  syncForkWithUpstream,
19
19
  unarchiveRepositoryById,
20
20
  updateCacheAfterArchive,
21
21
  updateCacheAfterDelete,
22
- updateCacheAfterRename,
23
22
  updateCacheAfterVisibilityChange,
24
23
  updateCacheWithRepository
25
- } from "./chunk-RI2B33OX.js";
24
+ } from "./chunk-GFBV3TQA.js";
26
25
  export {
27
26
  archiveRepositoryById,
28
27
  changeRepositoryVisibility,
29
28
  checkOrganizationIsEnterprise,
30
29
  deleteRepositoryRest,
31
30
  fetchRepositoryById,
31
+ fetchRestRateLimits,
32
32
  fetchViewerOrganizations,
33
33
  fetchViewerReposPage,
34
34
  fetchViewerReposPageUnified,
@@ -37,13 +37,11 @@ export {
37
37
  inspectCacheStatus,
38
38
  makeClient,
39
39
  purgeApolloCacheFiles,
40
- renameRepositoryById,
41
40
  searchRepositoriesUnified,
42
41
  syncForkWithUpstream,
43
42
  unarchiveRepositoryById,
44
43
  updateCacheAfterArchive,
45
44
  updateCacheAfterDelete,
46
- updateCacheAfterRename,
47
45
  updateCacheAfterVisibilityChange,
48
46
  updateCacheWithRepository
49
47
  };