Vault Pets

unlisted

by Owen Eldridge

Bring adorable pixel-art pets to your notes - watch them wander, throw them balls, and customize their appearance with themes and effects.

β˜… 1 starsUpdated 11mo agoMIT
View on GitHub

Obsidian Pets

This is an Obsidian plugin that brings the joy of vscode-pets to your vault. It adds a cute pet to your Obsidian workspace that follows you around.

This project is a direct translation of the popular Visual Studio Code extension vscode-pets by Anthony Shaw.

Installation

Note: This plugin is not yet available in the Obsidian Community Plugins directory. To install it locally:

Local Installation

  1. Clone or download this repository:

    git clone https://github.com/your-username/obsidian-pets.git
    
  2. Navigate to the plugin directory:

    cd obsidian-pets
    
  3. Install dependencies:

    npm install
    
  4. Build the plugin:

    npm run build
    
  5. Copy the plugin to your vault:

    • Create a folder named vault-pets in your vault's .obsidian/plugins/ directory
    • Copy these files from the plugin directory to .obsidian/plugins/vault-pets/:
      • main.js (generated by build)
      • manifest.json (from plugin root)
      • styles.css (from plugin root)
      • The entire media/ folder (with all pet animations and backgrounds)

    Note: The npm run build command only copies main.js and styles.css if you have configured the copy path in package.json. You still need to manually copy manifest.json and the media/ folder on first installation.

  6. Enable the plugin:

    • Open Obsidian
    • Go to Settings β†’ Community Plugins
    • Disable Safe Mode if it's enabled
    • Find "Obsidian Pets" in the installed plugins list and toggle it on
  7. Open the Pet View:

    • Open the command palette (Ctrl/Cmd + P)
    • Search for "Open Pet View"
    • A new view will open in the right sidebar with your new pet!

You can customize the pet type, color, size, and background theme from the plugin's settings tab.

Features

This plugin maintains core vscode-pets behaviors while adapting them for Obsidian! πŸŽ‰

Pet Types (20 varieties)

  • Classic Pets: Dog
  • Tech Mascots: Clippy, Rubber Duck, Rocky, Mod (dotnet bot), Deno
  • Birds: Chicken, Cockatiel
  • Aquatic: Crab
  • Reptiles: Snake, Turtle
  • Mammals: Fox, Horse, Panda, Rat
  • Unique: Snail, Totoro, Zappy, Skeleton, Morph

Customization

  • Pet Colors: Select from a variety of colors specific to each pet type
  • Pet Size: Adjust the size of your pet (nano, small, medium, large)
  • Multiple Pets: Spawn as many pets as you want
  • Background Themes:
    • None
    • Castle
    • Forest
    • Beach
    • Winter
    • Autumn
  • Visual Effects:
    • Snow
    • Stars
    • Leaves
    • Option to disable effects for better performance

Interactive Features

  • Throw Ball: Interact with your pets by throwing a ball for them to chase
  • Throw Ball with Mouse (setting): Enable click-and-drag ball throwing
  • Roll Call: Make all pets show their names in speech bubbles
  • Pause Pets: Temporarily stop pet animations
  • Reset Pets: Remove all pets from the view

Pet Management

  • Export Pet List: Save your current pet collection as a JSON file
  • Import Pet List: Load a saved pet collection from a JSON file
  • Add/Remove Pets: Use buttons or commands to manage your pets
  • Persistent Pets: Your pets are saved and restored when you reopen Obsidian

Commands

All features are accessible via the command palette:

  • Open Pet View
  • Spawn an additional pet
  • Remove all pets
  • Delete a pet (select a specific pet to remove)
  • Throw ball
  • Toggle throw ball with mouse (enable/disable click-and-drag ball throwing)
  • Export pet list
  • Import pet list
  • Roll call
  • Toggle pause
  • Reset pets

Development

Code Quality

This plugin follows Obsidian Plugin Review Guidelines and uses ESLint to enforce code quality standards that match ObsidianReviewBot requirements.

Running lints and tests:

npm run lint        # Check for linting errors
npm run build       # Build the plugin (includes type checking)

For detailed information about the ESLint configuration and Obsidian standards, see ESLINT_OBSIDIAN_STANDARDS.md.

Building from Source

# Install dependencies
npm install

# Build the plugin
npm run build

The build command:

  1. Runs TypeScript type checking
  2. Bundles the plugin with esbuild
  3. Automatically copies main.js and styles.css to your vault (if configured in package.json)

First-time setup: You need to manually copy manifest.json and the media/ folder to .obsidian/plugins/vault-pets/ in your vault. After that, npm run build will update the JavaScript and CSS files automatically.

Credits

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.