@involvex/dis-cli
v0.0.4
Published
A CLI for Discord
Readme
Involvex Discord CLI
A compact, terminal-first Discord client built with Bun, React (Ink), and Giggles. It provides a TUI for quick interactions with Discord, supports OAuth2 and QR login flows, and focuses on a lightweight, developer-friendly experience.
[!note] This project targets Bun as the runtime. If you don't have Bun installed, see https://bun.sh for installation instructions.
Highlights
- Terminal UI using React + Ink
- Discord integration via
discord.jsand@discordjs/*libraries - OAuth2 + QR-code login support
- Fast developer loop with
bun run dev
Quick Start
Prerequisites
- Bun (recommended)
- Node toolchain only if Bun is unavailable (this repo is configured for Bun)
Install dependencies
bun installRun in development (watch)
bun run devBuild
bun run buildRun the built CLI
bun run startFormatting, linting, and typecheck
bun run format
bun run lint
bun run lint:fix
bun run typecheckAuthentication
The app uses OAuth2 for authentication and includes utilities for QR-code login. Look at the authentication helpers in the src/auth/ folder to see login flow details.
Project Structure
- src/index.tsx — App entry and menu
- src/commands/ — CLI command screens (login, message, help, about, version)
- src/services/discordClient.ts — Discord client wrapper and lifecycle
- src/config/loader.ts — Configuration persistence
- src/hooks/useDiscordState.ts — App state helpers and authentication hooks
- src/components/ — Reusable TUI components (QR code, menu, select input)
Key Scripts
Taken from package.json:
bun run dev— development (watch) modebun run build— build the CLI todist/bun run start— run the built CLIbun run format— format code with Prettierbun run lint/bun run lint:fix— ESLint checks and auto-fixbun run typecheck— TypeScript check
Where to look first
- App bootstrap: src/index.tsx
- Discord integration: src/services/discordClient.ts
- Auth + token management: src/auth/
Development notes
- Use the
StateProvideranduseDiscordStatehook for accessing auth and user state in components. - Keep TUI components small and focused to leverage Ink's rendering performance.
- When adding commands/screens, place them under
src/commands/and wire intosrc/index.tsx.
Security and credentials
Store secrets (Discord client ID/secret, redirect URIs) in environment variables or in a local config managed by src/config/loader.ts. Do NOT commit secrets to the repository.
Next steps
- Add tests and CI for lint/typecheck/build steps
- Add more UI screens (server list, channel browser, message history)
If you'd like, I can now:
- commit
README.mdto a branch, or - run
bun run devto verify the dev server (if Bun is installed), or - expand sections (installation, architecture diagram, examples).
Tell me which you'd prefer.
