{"id":32745958,"url":"https://github.com/wiiiimm/gh-manager-cli","last_synced_at":"2026-01-12T02:26:22.751Z","repository":{"id":312579613,"uuid":"1047908437","full_name":"wiiiimm/gh-manager-cli","owner":"wiiiimm","description":"TUI terminal app to manage GitHub repos. Clean up your account in 5 minutes. Archive, delete, rename repos with keyboard shortcuts. Alternative to clicking through github.com","archived":false,"fork":false,"pushed_at":"2025-09-09T09:43:36.000Z","size":74793,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-03T17:33:48.475Z","etag":null,"topics":["cli","developer-tools","github","github-api","github-graphql","ink","interactive","keyboard-navigation","nodejs","productivity","react","repository-management","repository-manager","terminal","tui","typescript"],"latest_commit_sha":null,"homepage":"https://gh-manager-cli.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiiiimm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"wiiiimm","custom":["https://buymeacoffee.com/wiiiimm"]}},"created_at":"2025-08-31T14:01:56.000Z","updated_at":"2025-09-09T09:43:38.000Z","dependencies_parsed_at":"2025-08-31T18:14:43.478Z","dependency_job_id":"76778cc2-25dd-4349-87ed-79435542cdd3","html_url":"https://github.com/wiiiimm/gh-manager-cli","commit_stats":null,"previous_names":["wiiiimm/gh-manager-cli"],"tags_count":68,"template":false,"template_full_name":null,"purl":"pkg:github/wiiiimm/gh-manager-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiiiimm%2Fgh-manager-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiiiimm%2Fgh-manager-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiiiimm%2Fgh-manager-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiiiimm%2Fgh-manager-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiiiimm","download_url":"https://codeload.github.com/wiiiimm/gh-manager-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiiiimm%2Fgh-manager-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28332411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","developer-tools","github","github-api","github-graphql","ink","interactive","keyboard-navigation","nodejs","productivity","react","repository-management","repository-manager","terminal","tui","typescript"],"created_at":"2025-11-03T17:29:04.152Z","updated_at":"2026-01-12T02:26:22.745Z","avatar_url":"https://github.com/wiiiimm.png","language":"TypeScript","readme":"\u003cimg src=\"docs/assets/logo-horizontal.png\" alt=\"gh-manager-cli logo\" width=\"400\" /\u003e\n\n# gh-manager-cli\n\n[![npm version](https://img.shields.io/npm/v/gh-manager-cli.svg)](https://www.npmjs.com/package/gh-manager-cli)\n[![GitHub release](https://img.shields.io/github/release/wiiiimm/gh-manager-cli.svg)](https://github.com/wiiiimm/gh-manager-cli/releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/node/v/gh-manager-cli.svg)](https://nodejs.org)\n[![GitHub Stars](https://img.shields.io/github/stars/wiiiimm/gh-manager-cli.svg)](https://github.com/wiiiimm/gh-manager-cli/stargazers)\n[![GitHub Sponsors](https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink)](https://github.com/sponsors/wiiiimm)\n[![Context Engineered with Claude Opus 4.1](https://img.shields.io/badge/Context%20Engineered%20with-Claude%20Opus%204.1-blue)](https://www.anthropic.com)\n[![Context Engineered with Codex GPT-5](https://img.shields.io/badge/Context%20Engineered%20with-Codex%20GPT--5-green)](https://openai.com)\n\nInteractive terminal app to browse and manage your personal GitHub repositories. Built with Ink (React for CLIs) and the GitHub GraphQL API.\n\n🌐 **Visit our website:** [gh-manager-cli.dev](https://gh-manager-cli.dev) | [Source](https://github.com/wiiiimm/gh-manager-cli-site)\n\n## 🧹 Clean Up Your GitHub Account in Minutes\n\n**Stop clicking through GitHub's slow web interface.** Managing dozens of repos on github.com means endless page loads, multiple clicks per action, and no keyboard shortcuts. \n\n`gh-manager-cli` replaces tedious web clicking with powerful terminal commands:\n\n### ❌ GitHub Website Pain Points → ✅ Our Solution\n- **Slow pagination** (20 repos/page) → View all repos instantly with smooth scrolling\n- **Multiple clicks per action** → Single keypress for any operation  \n- **No bulk operations** → Archive, delete, or modify multiple repos at once\n- **Buried settings menus** → Direct keyboard shortcuts for everything\n- **Page refresh after each action** → Instant updates with no reload\n\nPerfect for:\n- **Spring cleaning**: Archive old projects and delete forgotten forks\n- **Professional profiles**: Keep only your best work visible  \n- **Fork management**: Identify and sync outdated forks\n- **Consistent naming**: Bulk rename repositories with patterns\n- **Quick decisions**: See all metadata at a glance to decide what stays\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/app-demo.gif\" alt=\"Interactive demo of gh-manager-cli\" width=\"900\" /\u003e\n  \u003cbr /\u003e\n  \u003cem\u003eFast, keyboard-first GitHub repo management from your terminal\u003c/em\u003e\n \u003c/p\u003e\n\n## Documentation\n\n| Getting Started | Features | Development |\n|-----------------|----------|-------------|\n| [📥 Installation](wiki/Installation.md) | [🔍 Features Overview](wiki/Features.md) | [🛠️ Development Guide](wiki/Development.md) |\n| [🔑 Token \u0026 Security](wiki/Token-and-Security.md) | [⌨️ Usage \u0026 Controls](wiki/Usage.md) | [🧪 Testing](wiki/Testing.md) |\n| [❓ Troubleshooting](wiki/Troubleshooting.md) | [🗺️ Roadmap](wiki/Roadmap.md) | [🏠 Wiki Home](wiki/README.md) |\n\n## Screenshots\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/demo_repo_listing.png\" alt=\"Repository listing with metadata\" width=\"31%\" /\u003e\n  \u003cimg src=\"docs/demo_login.png\" alt=\"GitHub token authentication flow\" width=\"31%\" /\u003e\n  \u003cimg src=\"docs/demo_delete_confirmation.png\" alt=\"Two-step delete confirmation\" width=\"31%\" /\u003e\n  \u003cbr /\u003e\n  \u003csub\u003eListing • Auth • Delete confirmation\u003c/sub\u003e\n\u003c/div\u003e\n\n## Quick Start\n\n```bash\n# Run with npx (no install)\nnpx gh-manager-cli@latest\n```\n\nOn first run, you'll be prompted to authenticate with GitHub (OAuth recommended).\n\n## Features\n\n### Core Repository Management\n- **Authentication**: GitHub OAuth (recommended) or Personal Access Token with secure storage\n- **Repository Listing**: Browse all your personal repositories with metadata (stars, forks, language, etc.)\n- **Live Pagination**: Infinite scroll with automatic page prefetching\n- **Interactive Sorting**: Modal-based sort selection (updated, pushed, name, stars) with modal-based direction selection\n- **Smart Search**: Server-side search through repository names and descriptions (3+ characters)\n- **Visibility Filtering**: Modal-based visibility filter (All, Public, Private/Internal for enterprise) with smart filtering\n- **Fork Status Tracking**: Always shows commits behind upstream for forked repositories\n- **Stars Mode**: View and manage starred repositories (personal account only)\n- **Repository Actions**:\n  - View detailed info (`I`) - Shows repository metadata, language, size, and timestamps\n  - Open in browser (Enter/`O`)\n  - Rename repository (`Ctrl+R`) with inline validation and automatic cache update\n  - Copy repository URL to clipboard (`C`) with SSH/HTTPS options\n  - Delete repository (`Del` or `Backspace`) with secure two-step confirmation\n  - Archive/unarchive repositories (`Ctrl+A`) with confirmation prompts\n  - Change repository visibility (`Ctrl+V`) - Switch between Public, Private, and Internal (enterprise only)\n  - Star/unstar repositories (`Ctrl+S`) - Toggle star status for any repository\n  - Sync forks with upstream (`Ctrl+F`) with automatic conflict detection\n\n### User Interface \u0026 Experience\n- **Keyboard Navigation**: Full keyboard control (arrow keys, PageUp/Down, `Ctrl+G`/`G`)\n- **Display Density**: Toggle between compact/cozy/comfy spacing (`T`)\n- **Visual Indicators**: Fork status, private/internal/archived badges, language colors, visibility status\n- **Enterprise Support**: Full support for GitHub Enterprise with Internal repository visibility\n- **Organization Context**: Switch between personal and organization accounts with ENT badge for enterprise orgs\n- **Interactive Modals**: Sort selection, visibility filtering, organization switching, and visibility change dialogs\n- **Balanced Layout**: Repository items with spacing above and below for better visual hierarchy\n- **Loading States**: Contextual loading screens for sorting and refreshing operations\n- **Rate Limit Monitoring**: Dual API rate limit display (GraphQL \u0026 REST) with real-time usage deltas and visual warnings\n\n### Technical Features\n- **Preference Persistence**: UI settings (sort, density, visibility filter, fork tracking) saved between sessions\n- **Server-side Filtering**: Visibility filtering performed at GitHub API level for accurate pagination\n- **Cross-platform**: Works on macOS, Linux, and Windows\n- **Secure Storage**: Token stored with proper file permissions (0600)\n- **Error Handling**: Graceful error recovery with retry mechanisms\n- **Performance**: Efficient GraphQL queries with virtualized rendering and server-side filtering\n- **Comprehensive Logging**: Structured JSON logging with automatic rotation and configurable verbosity\n\n## Installation\n\n### Homebrew (macOS/Linux)\n\n```bash\nbrew tap wiiiimm/tap\nbrew install gh-manager-cli\n```\n\n### NPX (Recommended - No Installation Required)\n\nRun instantly without installing:\n\n```bash\nnpx gh-manager-cli@latest\n```\n\n### NPM Global Install\n\nInstall globally for persistent `gh-manager-cli` command:\n\n```bash\nnpm install -g gh-manager-cli@latest\ngh-manager-cli\n```\n\n### Pre-built Binaries (No Node.js Required)\n\nDownload standalone executables from [GitHub Releases](https://github.com/wiiiimm/gh-manager-cli/releases):\n\n- **Linux**: `gh-manager-cli-linux-x64`\n- **macOS**: `gh-manager-cli-macos-x64` \n- **Windows**: `gh-manager-cli-windows-x64.exe`\n\nMake the binary executable (Linux/macOS):\n```bash\nchmod +x gh-manager-cli-*\n./gh-manager-cli-*\n```\n\n### From Source\n\nPrerequisites:\n- Node.js 18+\n- pnpm\n\nInstall and build:\n\n```bash\npnpm install\npnpm build\n```\n\nRun locally:\n\n```bash\nnode dist/index.js\n# Or add to PATH for dev\npnpm link\ngh-manager-cli\n```\n\n## Authentication\n\nThe app supports two authentication methods:\n\n### 1. GitHub OAuth (Recommended) 🎯\n\nThe easiest and most secure way to authenticate:\n\n- **Device Flow**: No need to handle callback URLs - just enter a code on GitHub's website\n- **Browser-based**: Opens GitHub's authorization page automatically\n- **Secure**: No client secrets or sensitive data in the app\n- **Full Permissions**: Automatically requests all necessary scopes for complete functionality\n- **User-friendly**: No manual token management required\n\nWhen you first run the app, select **\"GitHub OAuth (Recommended)\"** from the authentication options. The app will:\n1. Display a device code for you to enter on GitHub\n2. Open your browser to GitHub's device authorization page\n3. Wait for you to authorize the app\n4. Securely store the OAuth token for future use\n\n### 2. Personal Access Token (PAT)\n\nAlternative method for users who prefer manual token management:\n\n- Provide via env var: `GITHUB_TOKEN` or `GH_TOKEN`, or enter when prompted on first run.\n- Recommended: classic PAT with `repo` scope for listing both public and private repos.\n- Validation: a minimal `viewer { login }` request verifies the token.\n\n### Token Storage \u0026 Security\n\n- Storage: tokens are saved as JSON in your OS user config directory with POSIX perms `0600`.\n  - macOS: `~/Library/Preferences/gh-manager-cli/config.json`\n  - Linux: `~/.config/gh-manager-cli/config.json`\n  - Windows: `%APPDATA%\\gh-manager-cli\\config.json`\n- Revocation: you can revoke tokens at any time in your GitHub settings.\n\nNote: Tokens are stored in plaintext on disk with restricted permissions. Future work may add OS keychain support.\n\n### PAT Permissions \u0026 Scopes\n\nChoose the least-privileged token for the features you plan to use:\n\n- Browsing/searching repos (public only): `public_repo`\n- Browsing/searching repos (includes private): `repo`\n- Archive/Unarchive repository: `repo` (and you must have admin or maintainer rights on the repo)\n- Sync fork with upstream: `repo` (you must have push rights to your fork)\n- Delete repository: `delete_repo` (and admin rights on the repo)\n\nNotes:\n- Organization repositories may require that your token is SSO-authorized if the org enforces SSO.\n- If organization data doesn’t appear in the switcher, ensure your token is authorized for that org and consider adding `read:org` (some org setups require it to list memberships).\n- Fine-grained PATs: grant Repository access to the repos you need and enable at least:\n  - Metadata: Read\n  - Contents: Read (list/search), Read \u0026 Write (sync/archive)\n  - Administration: Manage (only if you need delete)\n  If in doubt, the classic `repo` scope plus `delete_repo` (for deletion) is the simplest equivalent.\n\n## Usage\n\nLaunch the app, then use the keys below:\n\n### CLI Flags\n\n- `--org, -o \u003cslug\u003e`: Start in a specific organisation context (if accessible). Ignores the flag if you don’t have access or if the slug isn’t an organisation.\n  - Examples:\n    - `gh-manager-cli --org acme`\n    - `gh-manager-cli -o acme`\n    - `npx gh-manager-cli@latest --org=@acme`\n    - `npx gh-manager-cli@latest -o=@acme`\n  - Notes:\n    - Leading `@` is optional.\n    - Personal usernames are not supported by `--org`/`-o` (use default personal context).\n\n- `--token, -t \u003cpat\u003e`: Use a Personal Access Token just for this run. Does not persist to config.\n  - Examples:\n    - `gh-manager-cli --token ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXX`\n    - `gh-manager-cli -t=ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXX`\n  - Precedence: CLI token \u003e `GITHUB_TOKEN`/`GH_TOKEN` env vars \u003e stored config.\n  - Security: Supplying tokens on the command line may be captured in shell history. Prefer env vars or the interactive prompt when possible.\n\n- `--help, -h`: Show usage information and exit.\n\n- `--version, -v`: Print the current version and exit.\n\n### Navigation \u0026 View Controls\n- **Top/Bottom**: `Ctrl+G` (top), `G` (bottom)\n- **Page Navigation**: ↑↓ Arrow keys, PageUp/PageDown\n- **Search**: `/` to enter search mode, type 3+ characters for server-side search\n  - Down arrow or Enter: Start browsing search results\n  - Esc: Clear search and return to full repository list\n- **Sort**: `S` opens sort modal with options:\n  - Updated: When the repository was last modified\n  - Pushed: When code was last pushed\n  - Name: Alphabetical by repository name\n  - Stars: Number of stars\n- **Sort Direction**: `D` to open sort direction modal (ascending/descending)\n- **Display Density**: `T` to toggle compact/cozy/comfy\n- **Fork Status**: Always enabled - shows commits behind upstream for all forks\n- **Visibility Filter**: `V` opens modal (All, Public, Private/Internal for enterprise)\n- **Stars Mode**: `Shift+S` (personal account only) to view starred repositories\n\n### Navigation \u0026 Account\n- **Open in browser**: Enter or `O`\n- **Refresh**: `R`\n- **Organization switcher**: `W` to switch between personal account and organizations\n- **Logout**: `Ctrl+L`\n- **Quit**: `Q`\n\n### Repository Actions\n- **Repository info**: `I` to view detailed metadata (size, language, timestamps)\n- **Cache info**: `K` to inspect Apollo cache status\n- **Archive/Unarchive**: `Ctrl+A` with confirmation prompt\n- **Change visibility**: `Ctrl+V` to change repository visibility (Public/Private/Internal)\n- **Delete repository**: `Del` or `Backspace` (with two-step confirmation modal)\n  - Type confirmation code → confirm (Y/Enter)\n  - Cancel: press `C` or Esc\n- **Star/Unstar**: `Ctrl+S` to toggle star status for any repository\n- **Sync fork**: `Ctrl+F` (for forks only, shows commit status and handles conflicts)\n- **Rename repository**: `Ctrl+R` with inline validation\n- **Copy URL**: `C` to copy repository URL to clipboard (SSH/HTTPS options)\n\n### General\n- **Esc**: Cancels modals, clears search, or returns to normal listing (does not quit)\n\nThe header displays the current owner context (Personal Account or Organization name), active sort and direction, fork status tracking state, and active search/filter.\n\nStatus bar shows loaded count vs total. A rate-limit line displays `remaining/limit` and the reset time; it turns yellow when remaining ≤ 10% of the limit.\n\n## Pagination Details\n\n- Uses GitHub GraphQL `viewer.repositories` with `ownerAffiliations: OWNER`, ordered by `UPDATED_AT DESC`.\n- Fetches 15 repos per page by default (configurable via `REPOS_PER_FETCH` environment variable, 1-50).\n- Updates `totalCount` each time and prefetches the next page when selection nears the end of loaded list.\n\n## Development\n\nStack:\n- UI: `ink`, `ink-text-input`, `ink-spinner`\n- API: `@octokit/graphql`, Apollo Client\n- Config paths: `env-paths`\n- Language: TypeScript\n- Build: `tsup` (CJS output with shebang)\n\nScripts:\n\n```bash\npnpm build          # build to dist/\npnpm build:binaries # build cross-platform binaries to ./binaries/\npnpm dev            # watch mode\npnpm start          # run normally\npnpm start:debug    # run with debug mode enabled\npnpm start:dev      # run with 5 repos per page and debug mode\n```\n\n### Release Process\n\nThe project uses a **two-phase automated release workflow**:\n\n#### Phase 1: Version Creation\n- **Triggers**: On feature/fix commits to `main` branch\n- **Version Calculation**: Uses [semantic-release](https://semantic-release.gitbook.io/) to analyze commit messages:\n  - `feat:` → Minor version bump (1.0.0 → 1.1.0)\n  - `fix:` → Patch version bump (1.0.0 → 1.0.1)\n  - `BREAKING CHANGE:` → Major version bump (1.0.0 → 2.0.0)\n- **Actions**:\n  1. Analyzes commits since last release\n  2. Calculates new version number\n  3. Updates `package.json` and `CHANGELOG.md`\n  4. Creates git tag\n  5. Publishes to NPM\n  6. Commits changes as `chore(release): X.Y.Z`\n\n#### Phase 2: Binary Building \u0026 Distribution\n- **Triggers**: On `chore(release):` commits (from Phase 1)\n- **Actions**:\n  1. Builds binaries for Linux, macOS, Windows\n  2. Creates GitHub release with changelog\n  3. Uploads binaries to release\n  4. Publishes to GitHub Packages\n  5. Updates Homebrew formula\n\n#### Release Flow Example\n```\nDeveloper merges PR with commits:\n  - feat: add new feature\n  - fix: resolve bug\n    ↓\nPhase 1: semantic-release analyzes commits\n    ↓\nCalculates version: 1.2.3 → 1.3.0 (feat = minor)\nCreates commit: \"chore(release): 1.3.0\"\n    ↓\nPhase 2: Build workflow triggers\n    ↓\nBuilds binaries with version 1.3.0\n    ↓\nCreates GitHub release with binaries\n    ↓\nPublishes to GitHub Packages \u0026 updates Homebrew\n```\n\n#### Manual Release\nTo manually trigger a release:\n```bash\n# Update version in package.json\nnpm version patch  # or minor/major\ngit push origin main\n```\n\nBoth NPM and Homebrew will be automatically updated within minutes of any version change.\n\nEnvironment variables:\n- `REPOS_PER_FETCH`: Number of repositories to fetch per page (1-50, default: 15)\n- `GH_MANAGER_DEBUG=1`: Enables debug mode with performance metrics, detailed errors, and console logging\n- `GH_TOKEN`: GitHub Personal Access Token (alternative to OAuth authentication)\n- `NO_COLOR`: Disable colored output in terminal\n\nProject layout:\n- `src/index.tsx` — CLI entry and error handling\n- `src/ui/App.tsx` — token bootstrap, renders `RepoList`\n- `src/ui/RepoList.tsx` — main list UI with modal management\n- `src/ui/components/` — modular components (modals, repo, common)\n  - `modals/` — DeleteModal, ArchiveModal, SyncModal, InfoModal, LogoutModal\n  - `repo/` — RepoRow, FilterInput, RepoListHeader\n  - `common/` — SlowSpinner and shared UI elements\n- `src/ui/OrgSwitcher.tsx` — organization switching component\n- `src/github.ts` — GraphQL client and queries (repos + rateLimit)\n- `src/config.ts` — token read/write and UI preferences\n- `src/logger.ts` — structured logging with rotation\n- `src/types.ts` — shared types\n- `src/utils.ts` — utility functions (truncate, formatDate)\n- `src/apolloMeta.ts` — Apollo cache management\n- `viewlogs.sh` — utility script for viewing logs\n\n## Logging\n\ngh-manager-cli includes comprehensive logging for debugging and monitoring purposes.\n\n### Log Location\n\nLogs are automatically written to your system's standard log directory:\n- **macOS**: `~/Library/Logs/gh-manager-cli/gh-manager-cli.log`\n- **Linux**: `~/.local/state/gh-manager-cli-log/gh-manager-cli.log`\n- **Windows**: `%LOCALAPPDATA%\\gh-manager-cli\\Log\\gh-manager-cli.log`\n\n### Viewing Logs\n\nUse the included `viewlogs.sh` script to quickly view recent log entries:\n```bash\n./viewlogs.sh        # View last 50 lines\n./viewlogs.sh 100    # View last 100 lines\n./viewlogs.sh -f     # Follow log in real-time\n```\n\n### Log Features\n\n- **Structured JSON**: Each log entry includes timestamp, level, message, and contextual data\n- **Automatic Rotation**: Logs rotate at 5MB with up to 5 historical files kept\n- **Comprehensive Coverage**: Tracks app lifecycle, API calls, user actions, and errors\n- **Debug Mode**: Set `GH_MANAGER_DEBUG=1` to enable verbose logging to console\n\n### What's Logged\n\n- Application startup/shutdown with version info\n- Authentication events (login/logout)\n- Repository operations (fetch, delete, archive, visibility changes)\n- API performance metrics and rate limit status\n- Error details with stack traces\n- User interface component lifecycle\n\n## Apollo Cache (Performance)\n\ngh-manager-cli includes built-in Apollo Client caching to reduce GitHub API calls and improve performance. Caching is **always enabled** for optimal performance.\n\n### Debug Mode\n\nRun with `GH_MANAGER_DEBUG=1` to enable debugging features:\n```bash\nGH_MANAGER_DEBUG=1 npx gh-manager-cli@latest\n```\n\nDebug mode provides:\n- **Apollo performance metrics**: Query execution time, cache hit/miss indicators\n- **Detailed error messages**: Full GraphQL and network errors for troubleshooting\n- **Data source tracking**: Shows whether data came from cache or network\n\n### Verifying Cache is Working\n\n1. **Performance Indicators** (visible in debug mode):\n   - **From cache: YES** = Data served from cache\n   - **Query time \u003c 50ms** = Likely cache hit\n   - **Network status codes** = Shows Apollo's internal cache state\n\n2. **API Credits**: Monitor the API counter in the header - it should remain stable when navigating previously loaded data\n\n3. **Cache Inspection**: Press `K` (available anytime) to see:\n   - Cache file location and size\n   - Recent cache entries with timestamps\n   - Cache age for each query type\n\n### Why API Credits Might Still Decrease\n\nEven with caching enabled, API credits may decrease due to:\n\n- **First-time requests**: Initial data must be fetched and cached\n- **Cache expiration**: Default 30-minute TTL (customize with `APOLLO_TTL_MS`)\n- **Pagination**: New pages beyond the cache are fetched from API\n- **Cache-and-network policy**: Updates stale cache data in background\n- **Sorting changes**: Different sort orders create new cache entries\n\n### Configuration\n\n```bash\n# Number of repositories to fetch per page (1-50, default: 15)\nREPOS_PER_FETCH=10 npx gh-manager-cli@latest\n\n# Custom cache TTL (milliseconds) - default: 30 minutes\nAPOLLO_TTL_MS=1800000 npx gh-manager-cli@latest\n\n# Enable debug mode to see cache performance\nGH_MANAGER_DEBUG=1 npx gh-manager-cli@latest\n\n# Combine multiple environment variables\nREPOS_PER_FETCH=5 GH_MANAGER_DEBUG=1 npx gh-manager-cli@latest\n```\n\n## Troubleshooting\n\n- Invalid token: enter a valid PAT (recommended scope: `repo`).\n- Rate limited: wait for the reset shown in the banner or reduce navigation.\n- Network errors: check connectivity and press `r` to retry.\n\n## Todo \u0026 Roadmap\n\nFor the up-to-date task board, see [TODOs.md](./TODOs.md).\n\nRecently implemented:\n- ✅ OAuth login flow as an alternative to Personal Access Token\n- ✅ Density toggle for row spacing (compact/cozy/comfy)\n- ✅ Repo actions (archive/unarchive, delete, change visibility) with confirmations\n- ✅ Organization support and switching (press `W`) with enterprise detection\n- ✅ Enhanced server-side search with improved UX and organization context support\n- ✅ Smart infinite scroll with 80% prefetch trigger\n- ✅ Modal-based sort and visibility filtering\n- ✅ GitHub Enterprise support with Internal repository visibility\n- ✅ Change repository visibility modal (`Ctrl+V`)\n- ✅ Compact filter modals for better screen space utilization\n- ✅ Enhanced rate limit display showing both GraphQL and REST API limits with delta tracking\n\nHighlights on deck:\n- Optional OS keychain storage via `keytar`\n- Bulk selection and actions\n- Repository renaming\n\n## Support \u0026 Sponsorship\n\nIf you find gh-manager-cli useful, consider supporting its development:\n\n💖 **[GitHub Sponsors](https://github.com/sponsors/wiiiimm)** - Support directly through GitHub\n☕ **[Buy Me a Coffee](https://buymeacoffee.com/wiiiimm)** - One-time coffee donations\n\nYour support helps maintain and improve this project. Thank you! 🙏\n\n## License\n\nMIT\n","funding_links":["https://github.com/sponsors/wiiiimm","https://buymeacoffee.com/wiiiimm"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiiiimm%2Fgh-manager-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiiiimm%2Fgh-manager-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiiiimm%2Fgh-manager-cli/lists"}