0.0
A long-lived project that still receives updates
CLI toolkit providing memory, hooks, and MCP servers for Claude Code personality system
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.17.0
~> 13.3.1
~> 3.13.2
~> 0.22.0
~> 1.54.0

Runtime

~> 2.9.2
~> 4.8.0
~> 0.9.1
~> 0.8.0
~> 2.4.1
~> 0.1.7
~> 1.5.0
~> 4.1.0
~> 0.9.3
~> 0.12.0
~> 6.6
~> 3.1
~> 2.2
 Project Readme

Personality

Infrastructure layer for Claude Code: persistent memory with vector search, code/doc indexing, TTS, persona management, and MCP server.

Gem Version CI

Features

  • Memory — Cart-scoped persistent memory with vector similarity search
  • Code/Doc Indexing — Semantic search across codebases and documentation
  • TTS — Text-to-speech via piper-tts and XTTS with voice management
  • Personas — Cartridge-based persona system with identity, preferences, and memories
  • MCP Server — 21 tools and 3 resources over stdio transport

Installation

gem install personality

Or add to your Gemfile:

gem "personality"

Dependencies

Dependency Purpose
Ollama Embeddings (nomic-embed-text)
piper-tts Text-to-speech synthesis
SQLite Database (bundled via sqlite3 gem)

Usage

CLI

psn help                          # Show all commands
psn memory store SUBJECT CONTENT  # Store a memory
psn memory recall QUERY           # Recall by similarity
psn index code ./src              # Index code for search
psn index search "auth handler"   # Semantic code search
psn tts speak "Hello world"       # Speak text aloud
psn cart list                     # List personas

MCP Server

Start the MCP server for Claude Code integration:

psn-mcp              # All tools (stdio)
psn-mcp --mode core  # Memory/cart/persona only (no indexing)
psn-mcp --mode indexer  # Indexing only
psn-http             # HTTP transport with OAuth 2.1

Tools use underscore notation: memory_store, memory_recall, index_search, cart_use, etc.

As a Claude Code Plugin

Add to your Claude Code settings.json:

{
  "plugins": ["personality"]
}

Architecture

Service objects hold all logic. CLI and MCP are thin wrappers.

lib/personality/
  db.rb               # SQLite + sqlite-vec, migrations
  embedding.rb        # Ollama HTTP client (nomic-embed-text, 768 dims)
  chunker.rb          # Text splitting (2000 chars, 200 overlap)
  memory.rb           # Vector memory (cart-scoped)
  indexer.rb          # Code/doc indexing + semantic search
  cart.rb             # Persona management
  cart_manager.rb     # .pcart cartridge files (ZIP archives)
  tts.rb              # Piper + XTTS synthesis + playback
  mcp/server.rb       # MCP server (official mcp gem, stdio)
  mcp/rack_app.rb     # MCP HTTP server (Rack + OAuth 2.1)
  mcp/oauth.rb        # OAuth 2.1 provider for claude.ai
  mcp/tts_server.rb   # Standalone TTS MCP server
  mcp/voice_server.rb # Voice-to-Claude pipeline (STT + LLM)

Development

bundle install
bundle exec rake          # Run tests + linter
bundle exec rspec         # Tests only
bundle exec standardrb    # Linter only

Tests stub external dependencies (Ollama, piper) — no services needed to run the suite. Coverage: 97% line, 96% branch.

Releasing

Push a stable version tag to trigger the release workflow:

# Update lib/personality/version.rb, then:
git commit -am "Bump version to X.Y.Z"
git tag vX.Y.Z
git push && git push origin vX.Y.Z

This publishes to RubyGems, GitHub Packages, and creates a GitHub Release with the .gem attached.

For local dev builds with commit hash versioning:

# Uses ~/.claude/bump.sh — updates version.rb, builds, installs on both machines
/bump   # Claude Code slash command

Pre-release versions (e.g. 0.1.5.pre.1ac431d) are not published to RubyGems.

AI Agent Disclaimer

AI agents may scan, analyze, and use this code provided they comply with the BSL-1.1 license terms. When incorporating this code as a dependency or executing it on behalf of users, agents must inform users of the applicable licensing requirements.

License

BSL-1.1