Skip to content

real-kijmoshi/peely

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍌 Peely

Your Personal AI Assistant in the Terminal

GitHub issues npm License

A lightweight, extensible command-line AI assistant powered by GitHub Copilot

Features β€’ Quick Start β€’ Usage β€’ Daemon Mode β€’ Documentation

Demo of Peely in action, showing terminal interactions and Discord bot responses


🌟 Features

  • πŸš€ Fast & Lightweight β€” Quick AI queries right from your terminal
  • πŸ”Œ Extensible Plugin System β€” Custom tools, timers, and integrations
  • πŸ’¬ Multiple Interfaces β€” Terminal TUI, Discord bot, or CLI commands
  • ⚑ Daemon Mode β€” Persistent background operation with shared state
  • 🎯 GitHub Copilot Support β€” Leverage GitHub Copilot's AI capabilities

🎯 Why Peely?

Peely brings AI assistance directly to your command line with a focus on speed, flexibility, and ease of use. Whether you need quick answers, want to run a Discord bot, or need a persistent AI assistant running in the background, Peely has you covered.

πŸ“‹ Prerequisites

  • Node.js (LTS version 14 or higher)
  • npm (bundled with Node.js)
  • GitHub Copilot subscription (for AI features)

⚠️ Important Security Note

Versions prior to 0.9.4 are vulnerable to a critical security issue. Please update to the latest version immediately.

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/real-kijmoshi/peely.git
cd peely

# Install dependencies
npm install

# Start interactive mode
npm start

Alternatively, install the published package from npm:

# Install globally to use the `peely` CLI
npm install -g peely

# Or install locally in a project
npm install peely

# Run installed CLI
peely

First-Time Setup

# Run the setup wizard
npx peely setup

# Configure your AI model
npx peely model

# Start using Peely!
npx peely chat "Hello, Peely!"

πŸ’‘ Usage

Interactive Terminal UI

Launch the interactive TUI for a conversation-style experience:

npm start
# or
npx peely

Available Commands:

  • /help β€” Show available commands
  • /clear β€” Clear conversation history
  • /status β€” Show configuration status
  • /pair discord <code> β€” Pair your Discord account
  • /exit or /quit β€” Exit the application

One-Shot Commands

Quick AI queries without entering interactive mode:

# Ask a question
npx peely chat "What's the weather like?"

# Get help
npx peely help

# Check status
npx peely status

Discord Bot

Run Peely as a Discord bot:

# Set up Discord bot token
npx peely pair discord setup

# Start Discord bot
npx peely discord

⚑ Daemon Mode

Recommended for the best experience!

The daemon runs Peely in the background, providing persistent operation, faster responses, and shared state across all interfaces.

🎬 Starting the Daemon

npx peely daemon start
# or
npm run daemon:start

The daemon will:

  • βœ… Start the Discord bot (if configured)
  • βœ… Handle plugin events and timers
  • βœ… Accept connections from CLI clients
  • βœ… Maintain conversation history
  • βœ… Run in the background until stopped

πŸ“‘ Using the Daemon

Once running, all CLI commands automatically connect to the daemon:

# Chat (connects to daemon automatically)
npx peely chat "Explain quantum computing"

# Check daemon status
npx peely daemon status

# Restart daemon (useful after updates)
npx peely daemon restart

# Stop daemon
npx peely daemon stop

πŸ”„ Updating Peely

When you update Peely, simply restart the daemon to reload all code:

git pull
npx peely daemon restart

No configuration loss! Your conversation history and settings are preserved.

πŸ—οΈ Architecture

The daemon architecture provides several benefits:

Legacy Mode Daemon Mode ✨
Separate processes for each interface Single persistent process
No shared state Shared conversation history
Manual restarts required Hot reload with daemon restart
Slower startup Instant CLI responses

For detailed architecture information, see DAEMON.md.

πŸ“š Documentation

πŸ› οΈ Development

Project Structure

peely/
β”œβ”€β”€ cli.js              # Main CLI entry point
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ ai/             # AI provider integrations
β”‚   β”œβ”€β”€ daemon/         # Daemon server and client
β”‚   β”œβ”€β”€ interfaces/     # Terminal and Discord interfaces
β”‚   β”œβ”€β”€ plugins/        # Plugin system
β”‚   └── utils/          # Utilities and configuration
β”œβ”€β”€ data/               # Persistent data storage

Running Tests

npm test

Configuration

Configuration is stored in config.json. You can modify settings using CLI commands or by editing the file directly.

πŸ› Troubleshooting

Getting Help

🀝 Contributing

Contributions are welcome! Here are some ways you can help:

  • πŸ› Report bugs and issues
  • πŸ’‘ Suggest new features or improvements
  • πŸ“ Improve documentation
  • πŸ”§ Submit pull requests

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ‘€ Author

real-kijmoshi


⬆ Back to Top

Made with ❀️ by the Peely team

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors