Skip to content

About

Small cli tool to use Discords Rich Presence feature for custom messages

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

dc-rpc

A command-line tool and background daemon to manage your Discord Rich Presence (RPC) from the terminal or a local web dashboard. This tool allows you to persist your custom status across sessions and easily update it on the fly.

Features

  • Global CLI: Control your presence from anywhere in your terminal.
  • Background Daemon: Runs independently to keep your presence active.
  • Persistence: Remembers your last status using a local SQLite database.
  • Web Dashboard: Visual interface to edit your presence.
  • Custom App ID: Configurable via .env file.

Installation

To install the tool globally on your system, run:

npm install -g .

Or if you are developing locally:

npm link

Configuration

Before using the tool, you must configure your Discord Application ID.

  1. Create a .env file in the project root directory.
  2. Add your Discord Application ID:
APP_ID=your_application_id_here

The daemon will load this ID when it starts.

Usage

Starting the Daemon

You must start the daemon process before setting a status.

dc-rpc start

This commands starts a background process that connects to the Discord IPC. It logs to ~/.dc-rpc/daemon.log.

Stopping the Daemon

To stop the background process:

dc-rpc stop

Checking Status

To see if the daemon is running and view its PID:

dc-rpc status

updating Presence

You can update your Rich Presence details directly from the CLI.

Options:

  • -d, --details <text>: Top line of the presence
  • -s, --state <text>: Bottom line of the presence
  • -l, --large-image-key <text>: Key for the large image asset
  • -t, --large-image-text <text>: Tooltip text for the large image
  • -k, --small-image-key <text>: Key for the small image asset
  • -m, --small-image-text <text>: Tooltip text for the small image

Example:

dc-rpc set --details "Coding" --state "Working on dc-rpc" --large-image-key "vscode"

Resetting Presence

To clear your current presence:

dc-rpc reset

Web Dashboard

The tool includes a local web dashboard for easier management. To open it in your default browser:

dc-rpc dashboard

Alternatively, visit http://localhost:3000 manually if the daemon is running.

Data & Logs

The tool stores its data and logs in your user directory:

  • Linux/Mac: ~/.dc-rpc/
  • Windows: C:\Users\You\.dc-rpc\

Files:

  • daemon.pid: specific process ID of the running daemon.
  • daemon.log: Output logs from the server.
  • rpc.db: SQLite database storing the presence state.

Development

  1. Clone the repository.
  2. Install dependencies: npm install.
  3. Link the binary: npm link.
  4. Run dc-rpc start to test.

Project Structure

  • bin/cli.js: Entry point for the CLI commands.
  • server.js: The Express server and RPC client (daemon).
  • db.js: SQLite database handler.
  • public/: Static files for the web dashboard.

About

Small cli tool to use Discords Rich Presence feature for custom messages

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages