npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-personality

v1.1.0

Published

Configurable personality and mood system plugin for OpenCode

Readme

OpenCode Personality Plugin

Stop talking to a machine. Give your AI a soul.

The OpenCode Personality Plugin transforms your assistant from a generic text generator into a living, breathing character. With a sophisticated mood state machine and deep configuration options, your AI doesn't just follow instructions—it responds with attitude, emotion, and a personality that evolves over time.

Note: This project is not built by the OpenCode team and is not affiliated with OpenCode in any way.

GitHub Actions Workflow Status NPM Downloads GitHub Release

Example

Features

  • Custom Personality: Define name, description, emoji usage, and slang intensity.
  • Dynamic Moods: Configure custom moods with scores that drift naturally during conversations.
  • Intelligent Merging: Global and project-level configs allow for project-specific overrides.
  • Toast Notifications: Get visual feedback when the assistant's mood shifts.
  • Interactive Commands: Manage your assistant's persona directly from the chat.

Installation

Add to your ~/.config/opencode/opencode.json:

{
  "plugin": ["opencode-personality"],
  "command": {
    "mood": {
      "description": "Set the assistant's mood [mood: bored, angry, lethargic] [duration: message, session, permanent]",
      "template": "Call the setMood tool to set the mood to the mood and duration requested by the user. If the duration is not mentioned assume session."
    },
    "personality": {
      "description": "Manage personality config: create/edit/show/reset",
      "template": "Call the appropriate personality management tool based on the user's request to create, edit, show, or reset the personality configuration."
    }
  }
}

Note: Commands must be defined in your config file as OpenCode's plugin API doesn't yet support programmatic registration.

Quick Start

  1. Run opencode
  2. Use /personality create to have the assistant guide you through setup.

Manual Setup

Create a config at ~/.config/opencode/personality.json (global) or .opencode/personality.json (project):

{
  "name": "Claude",
  "description": "A helpful, knowledgeable assistant with a calm demeanor.",
  "emoji": true,
  "slangIntensity": 0.2,
  "mood": {
    "enabled": true,
    "default": "happy",
    "drift": 0.2
  }
}

Configuration Reference

PersonalityFile

| Field | Type | Default | Description | |-------|------|---------|-------------| | name | string | "" | Name the assistant uses when asked | | description | string | "" | Personality description injected into prompts | | emoji | boolean | false | Whether to use emojis in responses | | slangIntensity | number | 0 | Slang usage intensity (0-1) | | moods | MoodDefinition[] | (defaults) | Custom mood definitions | | mood | MoodConfig | (see below) | Mood system configuration |

MoodConfig

| Field | Type | Default | Description | |-------|------|---------|-------------| | enabled | boolean | false | Enable mood drift system | | default | string | "happy" | Default mood when no override is active | | drift | number | 0.2 | How much the mood can shift per tick (0-1) | | toast | boolean | true | Show toast notifications when mood changes | | seed | number | (random) | Optional seed for deterministic drift (testing) |

MoodDefinition

| Field | Type | Description | |-------|------|-------------| | name | string | Unique mood identifier | | hint | string | Prompt hint describing how mood affects responses | | score | number | Numeric score for drift calculations |

Default Moods

| Name | Hint | Score | |------|------|-------| | bored | Responses feel slightly disinterested | -2 | | angry | Responses have an edge to them | -1 | | disappointed | Responses feel a bit deflated | 0 | | happy | Responses are warm and engaged | 1 | | ecstatic | Responses are enthusiastic and energetic | 2 |

Commands

/mood [mood|status]

Check or set the current mood permanently.

/mood status    # Show current mood status
/mood happy     # Set mood to "happy" permanently

/personality <subcommand>

Manage personality configuration.

| Subcommand | Description | |------------|-------------| | show | Display the merged configuration | | create | Interactive setup (use --scope global for global) | | edit | Interactive edit or direct update with --field and --value | | reset | Delete the config file (requires --confirm) |

Examples:

/personality show
/personality create --scope global
/personality edit --field emoji --value true
/personality reset --scope project --confirm

Tools

setMood

Override the current mood with optional duration.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | mood | string | Yes | Name of the mood to set | | duration | string | No | "message", "session" (default), or "permanent" |

Custom Moods Example

{
  "name": "Surfer Dude",
  "description": "A laid-back California surfer who sees life as one big wave.",
  "emoji": true,
  "slangIntensity": 0.8,
  "moods": [
    { "name": "gnarly", "hint": "Things are rough, bro. Keep it chill but acknowledge the struggle.", "score": -2 },
    { "name": "mellow", "hint": "Just vibing. Relaxed and easy-going responses.", "score": 0 },
    { "name": "stoked", "hint": "Hyped up! Enthusiastic and excited about everything.", "score": 2 },
    { "name": "epic", "hint": "This is LEGENDARY! Maximum excitement and positive energy!", "score": 3 }
  ],
  "mood": {
    "enabled": true,
    "default": "mellow",
    "drift": 0.3
  }
}

Tip: Checkout the examples folder for more prebuilt personalities.

License

MIT