fr3kpai
v1.2.0
Published
Android-Adapted Personal AI Infrastructure (PAI) - Complete AI system for Termux/Android
Maintainers
Readme
FR3K PAI - Android-Adapted Personal AI Infrastructure
Complete AI Infrastructure System adapted for Android/Termux and cross-platform deployment
[] • Features • Installation • Usage • Documentation
🎯 What is FR3K PAI?
FR3K PAI is a packaged version of the Personal AI Infrastructure, specifically adapted for Android/Termux and optimized for cross-platform deployment. It provides:
- 🚀 One-command installation via
npx fr3kpai - 🤖 Complete AI system with MCP tool creation
- 📱 Android-optimized for Termux environment
- 🔧 Cross-platform support (Linux, macOS, Windows)
- ⚡ Zero-config setup and validation
🚀 Quick Start
Install and Initialize (One Command)
# Install and setup FR3K PAI for Android Termux
npx fr3kpai setup-android
# Or initialize for any platform
npx fr3kpai init --environment androidBasic Usage
# Validate your installation
npx fr3kpai validate
# Check system status
npx fr3kpai status
# Create a new MCP tool
npx fr3kpai create-tool my-validator --type validator
# Initialize voice system
npx fr3kpai voice-init
# Speak text
npx fr3kpai speak "Hello, FR3K PAI is ready!"
# Check voice status
npx fr3kpai voice-status✨ Features
🎯 Core Capabilities
- 🔧 Dynamic MCP Tool Creation - Create custom tools instantly
- 🤖 Specialized AI Agents - Pre-configured for different tasks
- 📊 System Validation - Automatic health checks and diagnostics
- 🗂️ Memory Management - FR3K memory system integrated
- 📱 Android Optimization - Termux-specific configurations
- 🎤 Voice Interaction - TTS/STT with free, offline capabilities
🌍 Multi-Platform Support
- Android/Termux - Primary target with ARM64 optimization
- Linux - Native Linux environments
- macOS - Homebrew integration
- Windows - WSL and native Windows support
🛠️ Developer Tools
- CLI Interface - Command-line management
- MCP Tools - Dynamic tool creation system
- Templates - Pre-built tool templates
- Validation - System health and compatibility checks
📦 Installation
Option 1: Direct Install (Recommended)
# Install globally for easy access
npm install -g fr3kpai
# Or use without installation
npx fr3kpai setup-androidOption 2: Per-Project Install
# Install for current project
npm install fr3kpai
# Use in your project
import { initializeFR3KPAI } from 'fr3kpai';Option 3: Manual Setup
# Clone and build
git clone https://github.com/fr3k-ai/fr3kpai.git
cd fr3kpai
npm install
npm run build
npm link💻 Usage
Command Line Interface
# Initialize system
fr3kpai init [--environment <env>] [--verbose]
# Quick Android setup
fr3kpai setup-android [--verbose]
# Validate installation
fr3kpai validate [--environment <env>] [--verbose]
# Check system status
fr3kpai status
# Create MCP tools
fr3kpai create-tool <name> [--type <type>] [--description <desc>]
# Voice commands
fr3kpai voice-init [--tts-engine <engine>] [--stt-engine <engine>] [--voice <voice>]
fr3kpai speak "<text>" [--save <path>]
fr3kpai transcribe <audio-file>
fr3kpai listen [--continuous] [--timeout <seconds>]
fr3kpai voice-statusVoice Interaction
# Initialize voice system (downloads models)
fr3kpai voice-init
# Make the system speak
fr3kpai speak "Hello, I am FR3K PAI!"
# Save speech to file
fr3kpai speak "Welcome message" --save welcome.wav
# Check voice system status
fr3kpai voice-status
# Start voice interaction (demo)
fr3kpai listen --continuousProgrammatic Usage
import { initializeFR3KPAI, setupAndroidTermux, VoiceManager } from 'fr3kpai';
// Quick Android setup
const paiSystem = await setupAndroidTermux(true);
// Custom initialization
const system = await initializeFR3KPAI({
environment: 'android',
skipSetup: false,
verbose: true
});
// Get system info
const paths = system.getPaths();
const config = await system.getConfig();MCP Tool Creation
# Create a validator tool
fr3kpai create-tool json-validator --type validator --description "Validates JSON data"
# Create an analyzer tool
fr3kpai create-tool code-analyzer --type analyzer --description "Analyzes code quality"
# Create a transformer tool
fr3kpai create-tool markdown-converter --type transformer --description "Converts between formats"🏗️ Architecture
Core Components
fr3kpai/
├── 🧠 Core System
│ ├── Environment Detection & Setup
│ ├── System Validation & Health Checks
│ └── Configuration Management
├── 🛠️ MCP Tools Framework
│ ├── Dynamic Tool Creation
│ ├── Template System
│ └── Tool Management
├── 📱 Platform Adaptations
│ ├── Android/Termux Optimizations
│ ├── Cross-Platform Compatibility
│ └── Environment-Specific Configs
└── 🤖 AI Integration
├── PAI System Compatibility
├── Claude Code Integration
└── Memory ManagementAndroid Optimizations
- ARM64 Native - Optimized for Android ARM64 architecture
- Termux Integration - Native Termux package manager support
- Storage Management - Efficient file system usage
- Background Services - Support for persistent processes
- Network Optimization - Android-aware network handling
🧪 System Requirements
Android (Primary)
- Termux - Terminal emulator for Android
- Node.js 18+ - Via Termux packages
- Bun - Optional but recommended for performance
- pkg - Termux package manager
Other Platforms
- Node.js 18+ - Required runtime
- npm/yarn/bun - Package manager
- Git - For version control integration
📚 Documentation
Core Documentation
- CLAUDE.md - Complete system guidelines
- Android Adaptations - Android-specific configurations
- API Reference - Programmatic API documentation
Examples and Templates
CLI Help
fr3kpai --help # General help
fr3kpai <command> --help # Command-specific help🔧 Configuration
Environment Variables
# Core environment
export ANDROID_PAII=true # Enable Android optimizations
export PAI_HOME="$HOME/pai" # PAI installation directory
export FR3K_CONFIG="$HOME/.fr3kpai" # FR3K configuration directory
# Runtime options
export FR3K_VERBOSE=true # Enable verbose logging
export FR3K_ENVIRONMENT=android # Set environment typeConfiguration File
{
"environment": "android",
"platform": "termux",
"version": "1.0.0",
"paths": {
"home": "/data/data/com.termux/files/home",
"config": "/data/data/com.termux/files/home/.fr3kpai"
},
"features": {
"mcpTools": true,
"validation": true,
"androidOptimizations": true
}
}🐛 Troubleshooting
Common Issues
Termux Environment Not Detected
# Ensure running in Termux
echo $PREFIX | grep com.termuxPermission Errors
# Fix permissions for Termux
termux-setup-storagePackage Installation Issues
# Update Termux packages
pkg update && pkg upgradeValidation and Diagnostics
# Run comprehensive validation
fr3kpai validate --verbose
# Check system status
fr3kpai status
# Health check
npx fr3kpai validate🤝 Contributing
Development Setup
# Clone repository
git clone https://github.com/fr3k-ai/fr3kpai.git
cd fr3kpai
# Install dependencies
bun install
# Run in development mode
bun run dev
# Build for distribution
bun run build
# Run tests
bun testContribution Guidelines
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
- Personal AI Infrastructure (PAI) - Original system architecture
- Claude Code - AI integration platform
- Termux - Android terminal environment
- Bun - High-performance JavaScript runtime
Made with ❤️ for the AI community
