TimeCraft AI - Installation and Configuration Guide¶
📦 Installation¶
Quick Installation (Recommended)¶
Development Installation¶
# Clone the repository
git clone https://github.com/rafa-mori/timecraft.git
cd timecraft
# Quick setup with development script
./dev.sh setup
# Or manual configuration
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .
🎯 Optional Features¶
AI Features (Voice, Chatbot, Audio Processing)¶
Included dependencies:
pyaudio
- Audio capture and processingSpeechRecognition
- Speech recognitionpyttsx3
- Voice synthesisopenai
- OpenAI integrationfastapi
- Web API
Web Server and API¶
Included dependencies:
fastapi
- Modern web frameworkuvicorn
- ASGI serverpydantic
- Data validation
Database Connectors¶
Included dependencies:
psycopg2
- PostgreSQLpymysql
- MySQLpyodbc
- SQL Server
Development Tools¶
Included dependencies:
pytest
- Testingblack
- Code formattingflake8
- Lintingmypy
- Type checking
🔧 Configuration¶
Installation Verification¶
import timecraft_ai as timecraft
# Check version and available features
print(f"TimeCraft v{timecraft.__version__}")
print(f"AI Features: {timecraft.AI_AVAILABLE}")
print(f"MCP Server: {timecraft.SERVER_AVAILABLE}")
Quick Test¶
# Run installation test
python examples/quick_test.py
# Run basic demo
python examples/demo_basic.py
🚀 Getting Started¶
Basic Usage¶
import timecraft_ai as timecraft
# Create temporal analysis model
model = timecraft.TimeCraftAI()
# Load data
data = model.load_data("data.csv")
# Make predictions
forecasts = model.forecast(data, periods=30)
# Visualize results
model.plot_forecast()
Advanced Features (if AI available)¶
import timecraft_ai as timecraft
if timecraft.AI_AVAILABLE:
# Chatbot for data analysis
chatbot = timecraft.ChatbotActions()
response = chatbot.process_query("Analyze my sales data")
# Audio processing
audio = timecraft.AudioProcessor()
audio.start_recording()
# Voice synthesis
voice = timecraft.VoiceSynthesizer()
voice.speak("Analysis completed!")
🛠️ Development Script¶
TimeCraft includes a development script that makes work easier:
# Setup environment
./dev.sh setup
# Run tests
./dev.sh test
# Run demo
./dev.sh run-demo
# Clean environment
./dev.sh clean
# Show help
./dev.sh help
📋 System Requirements¶
- Python: 3.8 or higher
- Operating System: Linux, macOS, Windows
- RAM: 512MB (minimum), 2GB (recommended)
- Disk Space: 100MB (core), 500MB (with AI)
System Dependencies (for AI features)¶
Ubuntu/Debian:
macOS:
Windows:
🔍 Troubleshooting¶
Error: “ModuleNotFoundError: No module named ‘pyaudio’”¶
AI features are not available. To install:
# Linux/Mac
pip install timecraft_ai
# If there's still an error on Linux:
sudo apt-get install portaudio19-dev
pip install pyaudio
Error: “No module named ‘prophet’”¶
Forecasting dependencies are not installed:
Development vs Production Mode¶
- Production:
pip install timecraft_ai
- Development:
pip install -e .
(in project directory)
TimeCraft automatically detects the mode and adjusts imports accordingly.