Skip to content

lealtt/tohru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦‹ Tohru CLI

A command-line tool for managing Discord bot tokens and application emojis securely.

Tohru

Features

  • Secure Token Storage: Encrypted vault using AES-256-GCM
  • Emoji Management: Upload, list, delete, and export Discord application emojis
  • Batch Operations: Support for directories, zip archives, and JSON configuration files
  • User-Friendly: Interactive CLI with beautiful styling and helpful prompts

Installation

🧩 Option 1 β€” Run instantly (recommended)

You can run Tohru without installing anything using npx:

npx @lealt/tohru

πŸͺ„ This downloads and runs the latest version directly from npm. Works on Node 18+ and supports both macOS, Linux, and Windows (PowerShell).

🧱 Option 2 β€” Local installation

# Install dependencies
pnpm install

# Build the project
pnpm run build

# Run the CLI
pnpm start
# or directly
node dist/index.js

Setup

1. Set Encryption Key

Tohru requires a TOHRU_KEY environment variable to encrypt your token vault:

# Set for current session
export TOHRU_KEY='your-secure-key-here'

# Or add to your shell config (~/.bashrc, ~/.zshrc, etc.)
echo 'export TOHRU_KEY="your-secure-key-here"' >> ~/.bashrc

Important: Use a strong, unique key and keep it secure. Without this key, you won’t be able to decrypt or access your stored tokens.


2. Initialize Vault

npx @lealt/tohru
# Select: Manage Tokens β†’ Initialize vault

Usage

πŸ— Token Management

Store and retrieve Discord bot tokens securely:

  • Add Token β€” Store a new bot token with optional description
  • List Tokens β€” View all stored bots
  • Get Token β€” Retrieve a specific bot token (with security warnings)
  • Delete Token β€” Remove a bot from the vault

πŸ˜„ Emoji Management

Manage Discord application emojis:

Upload Emojis

Upload emojis from multiple sources:

# Single file
./emoji.png

# Multiple files
./emoji1.png ./emoji2.gif ./emoji3.jpg

# Directory (recursive)
./emojis/

# Zip archive
./emoji-pack.zip

# JSON configuration file
./emoji-config.json

JSON Configuration Format

Create a JSON file to define custom emoji names and paths:

{
  "emojis": [
    { "name": "customName", "path": "./path/to/emoji.png" },
    { "name": "anotherEmoji", "path": "/absolute/path/to/emoji.gif" }
  ]
}

Paths can be relative (to the JSON file) or absolute. Supported formats: .png, .jpg, .jpeg, .gif


Other Emoji Operations

  • List Emojis β€” View all application emojis (organized by static/animated)
  • Delete Emojis β€” Remove specific emojis by ID or delete all
  • Generate JSON β€” Export all current emojis to emojis.json

Development

# Run in development mode (without building)
pnpm run dev

# Build TypeScript
pnpm run build

Security Notes

  • Tokens are encrypted at rest using AES-256-GCM
  • The TOHRU_KEY must be at least 8 characters
  • Token vault is stored at: ~/.config/tohru/vault.json.enc
  • Avoid revealing tokens in terminal history or shared logs

License

MIT

About

A command-line tool for managing Discord bot tokens and application emojis securely. πŸ¦‹

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published