ai-persona-hub
v1.1.0
Published
AI Profile CLI - Create custom AI profiles run against dynamic LLM providers
Maintainers
Readme
AI Persona Hub
Inspired by Gemini Gems, this is a command-line interface for creating and managing custom AI profiles that can be run on multiple AI providers, allowing you to use the power of Gems with the AI of your choice.
Features
- 🔮 Create custom AI profiles with personalized system prompts
- 🤖 Multi-Provider Support
- OpenAI (ChatGPT)
- Anthropic (Claude)
- Google (Gemini)
- 💬 Interactive CLI chat sessions with your AI profiles
- 🔄 Dynamic Models: Change AI provider/model anytime without recreating profiles
- 💾 Local JSON-based profile storage
- ⚡ Powered by Mastra AI framework
Usage
Installation
Install the package and verify:
npm install -g ai-persona-hub
cgem --helpConnect Providers
Set up API keys for your preferred providers:
# OpenAI
export OPENAI_API_KEY="your-openai-key"
# Anthropic (Claude)
export ANTHROPIC_API_KEY="your-anthropic-key"
# Google (Gemini)
export GOOGLE_GENERATIVE_AI_API_KEY="your-google-key"Or make use of ~/.cgem/config.json:
{
"providers": {
"openai": {
"apiKey": "your-openai-key"
},
"anthropic": {
"apiKey": "your-anthropic-key"
},
"google": {
"apiKey": "your-google-key"
}
},
"currentProvider": "openai",
"currentModel": "gpt-4o-mini",
"defaultMaxTokens": 1000
}Configuration
Select your preferred AI provider and model
cgem modelCreate a custom AI profile using a system prompt
cgem createChat with any profile using your currently configured model
cgem chat <profile-name>All commands
cgem model # Configure AI provider/model (required first step)
cgem create # Create new AI profile
cgem list # List all profiles
cgem chat <name> # Chat with specific profile
cgem delete <name> # Delete profileFeel free to open a PR expanding the list.
Development
For this project I recommend:
- NPM version 11.5.2
- Node version v24.1.0
First, clone the repository and install dependencies:
git clone [email protected]:aiden-sobey/ai-persona-hub.git
cd ai-persona-hub
npm installTo run the project:
# Watch mode during development
npm run dev
# Build the project
npm run build
# Run directly with Node.js
npm startProfiles
Profiles are stored in ./profiles/ directory
Structure
Profiles are stored as JSON files with the following structure:
{
"id": "profile-id",
"name": "Profile Name",
"systemPrompt": "Your custom system prompt...",
"maxTokens": 1000,
"createdAt": "2025-01-01T00:00:00.000Z",
"lastUsed": "2025-01-01T00:00:00.000Z"
}Architecture
Built with:
- Mastra AI Framework - Unified AI provider interface
- TypeScript - Type-safe development
- Commander.js - CLI framework
- Inquirer.js - Interactive prompts
- Chalk - Terminal colors
The application uses Mastra's unified provider API to seamlessly switch between different AI providers while maintaining a consistent interface. The new architecture separates concerns: profiles store system prompts, while provider/model selection is handled globally, allowing maximum flexibility.
