{"id":50428309,"url":"https://github.com/fxckcode/discord-rpc-tui","last_synced_at":"2026-05-31T12:01:49.686Z","repository":{"id":361500352,"uuid":"1254686867","full_name":"fxckcode/discord-rpc-tui","owner":"fxckcode","description":"Custom Discord Rich Presence manager with Ink TUI — React terminal UI for custom activities","archived":false,"fork":false,"pushed_at":"2026-05-30T22:28:27.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T00:14:14.036Z","etag":null,"topics":["discord","discord-rpc","ink","react-terminal","rich-presence","rpc","tui","typescript"],"latest_commit_sha":null,"homepage":null,"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/fxckcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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":null,"dco":null,"cla":null}},"created_at":"2026-05-30T22:08:54.000Z","updated_at":"2026-05-30T22:28:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fxckcode/discord-rpc-tui","commit_stats":null,"previous_names":["fxckcode/discord-rpc-tui"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fxckcode/discord-rpc-tui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxckcode%2Fdiscord-rpc-tui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxckcode%2Fdiscord-rpc-tui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxckcode%2Fdiscord-rpc-tui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxckcode%2Fdiscord-rpc-tui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fxckcode","download_url":"https://codeload.github.com/fxckcode/discord-rpc-tui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxckcode%2Fdiscord-rpc-tui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33730241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":["discord","discord-rpc","ink","react-terminal","rich-presence","rpc","tui","typescript"],"created_at":"2026-05-31T12:01:48.594Z","updated_at":"2026-05-31T12:01:49.677Z","avatar_url":"https://github.com/fxckcode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord RPC TUI\n\n**Custom Discord Rich Presence manager** — a beautiful Terminal UI built with [Ink](https://github.com/vadimdemedes/ink) (React for terminal) that sets custom activities on your Discord profile.\n\n![TUI Screenshot](docs/screenshot.png)\n\n## Features\n\n- 🎨 **Beautiful TUI** — built with Ink (React), full keyboard navigation\n- 🔄 **Activity Rotation** — set multiple profiles that rotate automatically\n- 🔗 **Auto-reconnect** — survives Discord restarts with exponential backoff\n- 📋 **Rich Presence** — state, details, timestamps, buttons (max 2), images, activity type\n- ⚙️ **Configurable** — JSON config at `~/.config/discord-rpc-tui/config.json`\n- 🚀 **Auto-start** — systemd user service, starts when you log in\n- 🔍 **Discord Detection** — automatically pauses when Discord is closed\n\n## Quick Start\n\n### 1. Install\n```bash\ngit clone https://github.com/fxckcode/discord-rpc-tui.git\ncd discord-rpc-tui\npnpm install\nbash install.sh\n```\n\n### 2. Configure\nEdit `~/.config/discord-rpc-tui/config.json`:\n\n```json\n{\n  \"clientId\": \"YOUR_CLIENT_ID_HERE\",\n  \"profiles\": [\n    {\n      \"name\": \"Coding\",\n      \"activity\": {\n        \"state\": \"Building Discord RPC TUI\",\n        \"details\": \"TypeScript • Ink\",\n        \"startTimestamp\": true,\n        \"type\": 0\n      }\n    }\n  ]\n}\n```\n\n### 3. Get a Client ID\n1. Go to https://discord.com/developers/applications\n2. Create **New Application**\n3. Copy the **Client ID** (snowflake number)\n4. Paste it into your config\n\n### 4. Run\n```bash\n# Run manually (TUI)\n~/.local/share/discord-rpc-tui/bin/rpc-tui\n\n# Or as a service (auto-start)\nsystemctl --user start discord-rpc-tui\n```\n\n## Keybindings\n\n| Key | Action |\n|-----|--------|\n| `q` | Quit |\n| `Space` | Pause/resume RPC |\n| `n` | Next activity profile |\n| `r` | Reload config |\n\n## Config File\n\nLocated at `~/.config/discord-rpc-tui/config.json`:\n\n```json\n{\n  \"clientId\": \"123456789012345678\",\n  \"transport\": \"ipc\",\n  \"profiles\": [\n    {\n      \"name\": \"Playing\",\n      \"activity\": {\n        \"state\": \"Exploring Hyrule\",\n        \"details\": \"Zelda: Tears of the Kingdom\",\n        \"largeImageKey\": \"zelda\",\n        \"type\": 0,\n        \"startTimestamp\": true,\n        \"buttons\": [{ \"label\": \"Watch Stream\", \"url\": \"https://twitch.tv/...\" }]\n      }\n    }\n  ],\n  \"rotationInterval\": 600\n}\n```\n\n### Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `clientId` | string | Discord Application ID (required) |\n| `transport` | \"ipc\" \\| \"websocket\" | RPC transport (default: ipc) |\n| `rotationInterval` | number | Seconds between profile rotation (0 = no rotation) |\n| `profiles[]` | array | Array of activity profiles |\n| `profiles[].name` | string | Profile display name |\n| `profiles[].activity.state` | string | Line 1 of rich presence |\n| `profiles[].activity.details` | string | Line 2 of rich presence |\n| `profiles[].activity.startTimestamp` | boolean \\| number | true = elapsed, number = epoch ms |\n| `profiles[].activity.endTimestamp` | number | Countdown timer (epoch ms) |\n| `profiles[].activity.type` | number | 0=Playing, 1=Streaming, 2=Listening, 3=Watching, 5=Competing |\n| `profiles[].activity.largeImageKey` | string | Large image asset key |\n| `profiles[].activity.largeImageText` | string | Large image tooltip |\n| `profiles[].activity.smallImageKey` | string | Small image asset key |\n| `profiles[].activity.smallImageText` | string | Small image tooltip |\n| `profiles[].activity.buttons[]` | array | Max 2 buttons with label + url |\n\n## Architecture\n\n```\nsrc/\n├── index.tsx              # Entry — renders Ink app\n├── app.tsx                # Main App component\n├── core/\n│   ├── rpc-manager.ts     # Discord RPC (connect, activity, reconnect)\n│   ├── config-manager.ts  # Config (read/write/validate with Zod)\n│   ├── discord-detector.ts# Detect Discord via /tmp/discord-ipc-0\n│   └── activity-rotator.ts# Timer-based profile rotation\n├── components/\n│   └── status-bar.tsx     # Connection status\n└── types/\n    └── index.ts           # TypeScript types\n```\n\n## Development\n\n```bash\npnpm dev        # Watch mode\npnpm build      # Production build\npnpm test       # Run tests\npnpm start      # Start the TUI (after build)\n```\n\n## systemd\n\n```bash\n# Manual service control\nsystemctl --user start   discord-rpc-tui\nsystemctl --user stop    discord-rpc-tui\nsystemctl --user enable  discord-rpc-tui  # auto-start on login\njournalctl --user -u discord-rpc-tui -f    # view logs\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffxckcode%2Fdiscord-rpc-tui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffxckcode%2Fdiscord-rpc-tui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffxckcode%2Fdiscord-rpc-tui/lists"}