### Project Setup and Development Commands Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/TechManual.md Provides essential commands for setting up and running the Milla Rayne project. This includes installing dependencies, creating environment configuration, migrating data, and starting the development server with hot-reloading. ```bash npm install cp .env.example .env npm run migrate:memory npm run dev ``` -------------------------------- ### Start Production Server (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/SETUP_GUIDE.md Starts the production server for the Milla Rayne AI Assistant after the application has been built. ```bash npm start ``` -------------------------------- ### Milla Rayne Web App Quick Start Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/TechManual.md Instructions for starting the Milla Rayne web application. This involves installing dependencies, setting up the environment file with API keys, and running the development server. The default application can then be accessed via a local URL. ```bash npm install cp .env.example .env # Copy and edit with your API keys npm run dev # Access at http://localhost:5000 ``` -------------------------------- ### Example Image Directory Structure Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/STATIC_BACKGROUNDS_QUICKSTART.md Illustrates a typical file structure for static background images within the `/client/public/assets/scenes/` directory, showing base images and time-specific variants. ```text /client/public/assets/scenes/ ├── living_room.jpg # Base living room (used all day if no variants) ├── living_room-night.jpg # Living room at night (8pm-6am) ├── bedroom.jpg # Base bedroom ├── bedroom-night.jpg # Bedroom at night ├── kitchen-morning.jpg # Kitchen in morning (6am-10am) └── outdoor.jpg # Outdoor/garden ``` -------------------------------- ### Quick Local LLM Setup for Milla-Rayne (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/LOCAL_LLM_SETUP.md A concise 3-minute setup guide for enabling local LLM functionality in Milla-Rayne. It involves installing Ollama, downloading a model, configuring environment variables, and restarting the application. ```bash # 1. Install Ollama (pick your OS) # macOS: download from https://ollama.com/download/Ollama.dmg # Windows: download from https://ollama.com/download/OllamaSetup.exe # Linux: curl -fsSL https://ollama.com/install.sh | sh # 2. Download a model ollama pull gemma3:1b # Small, fast (815MB) # 3. Enable in Milla-Rayne echo "ENABLE_LOCAL_MODEL=true" >> .env echo "PREFER_LOCAL_MODEL=true" >> .env # 4. Restart Milla npm run dev ``` -------------------------------- ### Install Project Dependencies (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/SETUP_GUIDE.md Installs all necessary project dependencies using npm. The `--legacy-peer-deps` flag is used to resolve potential peer dependency conflicts during installation. ```bash npm install --legacy-peer-deps ``` -------------------------------- ### Bash CLI Commands Example Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/MILLALYZER_YOUTUBE_PLAN.md Examples of common Bash commands used for initializing a Node.js project and installing dependencies. These are typically found in programming tutorial videos. ```bash npm init -y npm install express ``` ```bash curl http://localhost:3000/api/hello ``` -------------------------------- ### JavaScript Code Snippet Example Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/MILLALYZER_YOUTUBE_PLAN.md An example of a simple Express.js server setup in JavaScript. This snippet demonstrates creating a basic API endpoint and starting the server, often extracted from tutorial videos. ```javascript const express = require('express'); const app = express(); app.get('/api/hello', (req, res) => { res.json({ message: 'Hello World' }); }); app.listen(3000, () => { console.log('Server running on port 3000'); }); ``` -------------------------------- ### Node.js Development Commands Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/conductor/workflow.md Provides example commands for setting up a Node.js development environment, running daily development tasks like starting a dev server and running tests, and executing pre-commit checks. ```bash # Example: Commands to set up the development environment (e.g., install dependencies, configure database) # e.g., for a Node.js project: npm install # Example: Commands for common daily tasks (e.g., start dev server, run tests, lint, format) # e.g., for a Node.js project: npm run dev, npm test, npm run lint # Example: Commands to run all pre-commit checks (e.g., format, lint, type check, run tests) # e.g., for a Node.js project: npm run check ``` -------------------------------- ### Frontend Manual Verification Example Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/conductor/workflow.md Provides an example of manual verification steps for frontend changes after automated tests have passed. It includes instructions to start the development server and navigate to a specific URL to check the user interface. ```markdown The automated tests have passed. For manual verification, please follow these steps: **Manual Verification Steps:** 1. **Start the development server with the command:** `npm run dev` 2. **Open your browser to:** `http://localhost:3000` 3. **Confirm that you see:** The new user profile page, with the user's name and email displayed correctly. ``` -------------------------------- ### Installing a Small Ollama Model Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/LOCAL_LLM_SETUP.md Download and install a lightweight language model suitable for systems with limited RAM. Examples include `gemma3:1b` and `llama3.2:1b`, with their respective RAM requirements noted. ```bash # Install small model ollama pull gemma3:1b # 815MB # or ollama pull llama3.2:1b # 1.3GB ``` -------------------------------- ### Start Production Servers Command Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/SETUP_COMPLETE.md Command to start all production servers after the application has been built. This command is used for deploying the application. ```bash npm run start:all ``` -------------------------------- ### Install and Run Milla-Rayne Web App (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/README.md Installs dependencies, sets up environment variables, and starts the Milla-Rayne web application servers. It requires an `.env` file with API keys. The application runs on ports 5000 and 5001. ```bash npm install cp .env.example .env # Add your API keys npm run dev:all # Start both main server (5000) and proactive server (5001) ``` ```bash npm run dev # Main server only (port 5000) npm run dev:proactive # Proactive server only (port 5001) ``` -------------------------------- ### Set Up Local LLM with Ollama (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/README.md Guides users through installing Ollama, downloading a local AI model (Gemma 1B), and configuring Milla-Rayne to use local models for enhanced privacy. This is an optional setup. ```bash # Install Ollama curl -fsSL https://ollama.com/install.sh | sh # Download a model ollama pull gemma3:1b # Enable in Milla echo "ENABLE_LOCAL_MODEL=true" >> .env echo "PREFER_LOCAL_MODEL=true" >> .env ``` -------------------------------- ### Milla Rayne CLI Version Setup Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/TechManual.md Steps to run the Milla Rayne application as a command-line interface (CLI) tool. This requires starting the main server in one terminal and then launching the CLI client in a separate terminal. ```bash # Terminal 1: Start the server npm run dev # Terminal 2: Start the CLI npm run cli ``` -------------------------------- ### Milla Rayne Docker Deployment Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/TechManual.md Guides for deploying Milla Rayne using Docker. It covers both Docker Compose for a streamlined setup and manual build/run commands. Instructions for pulling pre-built images are also provided. ```bash # Using Docker Compose (recommended) cp .env.example .env # Edit with your API keys docker-compose up # Or build and run manually docker build -t milla-rayne . docker run -p 5000:5000 --env-file .env milla-rayne # Pull pre-built image docker pull ghcr.io/mrdannyclark82/milla-rayne:latest ``` -------------------------------- ### Go Project Development Commands Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/conductor/workflow.md Provides example commands for setting up a Go development environment, running daily development tasks like executing the main program and running tests, and executing pre-commit checks using a Makefile. ```bash # Example: Commands to set up the development environment (e.g., install dependencies, configure database) # e.g., for a Go project: go mod tidy # Example: Commands for common daily tasks (e.g., start dev server, run tests, lint, format) # e.g., for a Go project: go run main.go, go test ./..., go fmt ./... # Example: Commands to run all pre-commit checks (e.g., format, lint, type check, run tests) # e.g., for a Go project: make check (if a Makefile exists) ``` -------------------------------- ### API Key Setup and Git Ignore Configuration Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/TechManual.md This snippet demonstrates how to securely set up API keys using a `.env` file and ensure it's ignored by Git. It includes commands for copying the example environment file, editing it with actual keys, and verifying that `.env` is correctly git-ignored. It also provides steps for recovering from accidental API key commits. ```bash cp .env.example .env OPENROUTER_API_KEY=your_actual_openrouter_key_here OPENROUTER_GEMINI_API_KEY=your_actual_openrouter_gemini_key_here XAI_API_KEY=your_actual_xai_key_here git check-ignore .env # Should output: .env # If accidentally committed: git rm --cached .env git commit -m "Remove API keys from version control" ``` -------------------------------- ### Set Up Local Environment Configuration Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/GEMINI.md Copies the example environment file to `.env` for local configuration. This file should be populated with API keys and other settings. ```bash cp .env.example .env ``` -------------------------------- ### Roleplay Messages to Change Location Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/STATIC_BACKGROUNDS_QUICKSTART.md Provides examples of roleplay messages that trigger the adaptive scene system to change the background based on the specified location. ```text *walks into the living room* *goes to the kitchen* *steps outside* ``` -------------------------------- ### OAuth Quick Start Configuration Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/OAUTH_QUICK_REFERENCE.md Steps to configure your environment variables and start the server for OAuth integration. ```APIDOC ## Quick Start ### 1. Configure Environment ```bash # Add to .env GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret GOOGLE_OAUTH_REDIRECT_URI=http://localhost:5000/oauth/callback MEMORY_KEY=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))") ``` ### 2. Start Server ```bash npm run dev ``` ### 3. Connect Google Account Navigate to: `http://localhost:5000/oauth/google` ``` -------------------------------- ### Testing Scene Continuity - Example Interaction Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/QUICK_START_IMPROVEMENTS.md This example illustrates how to test Milla's ability to maintain roleplay scene continuity. Milla should remain within the established scene (e.g., cuddling by the fireplace) and avoid introducing unrelated memories or context. ```text You: "Let's cuddle by the fireplace" Milla: *should stay in this scene* You: "This is nice" Milla: *should continue the scene without random memory dumps* ``` -------------------------------- ### Build and Run Production Application (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/TechManual.md Commands to build the client and server for production and start the production server. These commands are executed using npm. ```bash npm run build npm run start ``` -------------------------------- ### Build and Install Milla Rayne Android App (Offline Mode) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/android/QUICKSTART.md This snippet shows how to build the Android application's APK in debug mode and install it on a connected device using ADB. This is the first step for using the app in offline mode. ```bash cd android ./gradlew assembleDebug cd ../ # Assuming the APK is generated in app/build/outputs/apk/debug/ # You might need to adjust the path based on your project structure adb install app/build/outputs/apk/debug/app-debug.apk ``` -------------------------------- ### Launch Milla-Rayne CLI (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/README.md Instructions for starting the Milla-Rayne backend server and then launching the command-line interface (CLI) for interacting with the AI assistant. ```bash npm run dev # Start server npm run cli # Launch CLI ``` -------------------------------- ### Project README Structure (Markdown) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/REPOSITORY_ENHANCEMENT_PLAN.md Defines the structure for the project's README file. It includes sections for a quick start guide, features, documentation links, and development setup instructions, aiming to provide a comprehensive overview of the project. ```markdown # Milla Rayne - AI Companion System ## Quick Start (5 minutes) 1. Clone repo 2. Install dependencies 3. Configure .env 4. Run `npm run dev` ## Features - [Visual feature showcase with screenshots] - millAlyzer YouTube Intelligence - Google Calendar/Gmail Integration - Voice Interaction - Scene System ## Documentation - [User Guide](docs/USER_GUIDE.md) - [API Reference](docs/API.md) - [Architecture](docs/ARCHITECTURE.md) - [Contributing](CONTRIBUTING.md) ## Development - [Setup Guide](docs/SETUP.md) - [Testing Guide](docs/TESTING.md) - [Deployment](docs/DEPLOYMENT.md) ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/GEMINI.md Installs all project dependencies from the root directory using npm. This is a prerequisite for building and running the application. ```bash npm install ``` -------------------------------- ### Testing Shorter Responses - Example Prompt Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/QUICK_START_IMPROVEMENTS.md This snippet demonstrates how to test the improved response length. The expected output is a concise, 2-4 sentence response that is warm and personal, indicating the system is adhering to the new token limit. ```text You: "Hey Milla, how are you today?" Expected: 2-4 sentence response, warm and personal ``` -------------------------------- ### Verify Ollama Installation (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/LOCAL_LLM_SETUP.md Command to verify if Ollama has been successfully installed on your system. ```bash ollama --version ``` -------------------------------- ### Start Production Server Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/GEMINI.md Launches the production-ready server after the application has been built. This command is used for deploying and running the application in a live environment. ```bash npm run start ``` -------------------------------- ### Install Ollama on Linux (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/LOCAL_LLM_SETUP.md Command to install Ollama on Linux systems. This script downloads and executes the official Ollama installation script. ```bash curl -fsSL https://ollama.com/install.sh | sh ``` -------------------------------- ### Prerequisites Installation for Browser Automation Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/PR_IMPLEMENTATION_SUMMARY.md Commands to verify Python installation, install Playwright, and download the Chromium browser, which are necessary for the browser automation setup. ```bash python3 --version pip install playwright playwright install chromium ``` -------------------------------- ### Tutorial Analysis User Flow Example Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/MILLALYZER_YOUTUBE_PLAN.md This example demonstrates a user flow for analyzing a YouTube tutorial. It shows the interaction from searching for a video to Milla providing a breakdown with options to view steps, code snippets, commands, or save to the knowledge base. ```text User: "YouTube how to build a Docker container" Milla: *searches and shows results* User: Clicks video #2 Milla: *plays video in PIP* User: "Analyze this video" Milla: *analyzing the Docker tutorial* I've broken down this 18-minute Docker tutorial into 8 actionable steps, babe! Found 12 CLI commands and 3 Dockerfile examples. Would you like to see: 📋 Step-by-step guide 💻 Code snippets ⚡ Quick commands 📚 Save to knowledge base ``` -------------------------------- ### Testing AI Updates Feature - Example Prompt and Response Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/QUICK_START_IMPROVEMENTS.md This snippet shows how to test the 'AI Updates' feature. Users can ask 'What's new?' and expect Milla to provide a summary of recent AI industry updates, formatted in her voice and including up to 5 items with links. ```text You: "What's new?" Milla: *brightens up* Oh babe, I've been keeping up with the AI world! Here's what's new: 1. **OpenAI Announces GPT-4 Turbo...** (Dec 10) [Summary and link] 2. **DeepSeek Releases Open Source Code Model** (Dec 9) [Summary and link] ... (up to 5 updates) ``` -------------------------------- ### Adding a New Room Background (Bash Example) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/client/public/assets/scenes/README.md Demonstrates the command-line steps to copy a prepared image file into the correct directory for the adaptive scene system. ```bash cp my-living-room-photo.jpg /client/public/assets/scenes/living_room.jpg ``` -------------------------------- ### Building and Running Docker Image Locally Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/CICD_DOCUMENTATION.md These commands show how to build the Docker image locally and run it as a container. You can build the image with a specific tag, run it, and map a port for access. Environment variables can be passed using an .env file, or you can use Docker Compose for a more integrated local setup. ```bash # Build locally docker build -t milla-rayne:latest . # Run locally docker run -p 5000:5000 --env-file .env milla-rayne:latest # Or use docker-compose docker-compose up ``` -------------------------------- ### Manually Set Up Fara Python Environment Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/FARA_INTEGRATION.md Provides commands to manually set up the Python virtual environment for Fara if automatic setup fails. This includes creating a virtual environment, installing dependencies, and installing Playwright and vLLM. ```bash cd fara_repo python3 -m venv .venv ./.venv/bin/pip install -e . ./.venv/bin/playwright install ./.venv/bin/pip install vllm ``` -------------------------------- ### Google Cloud Project Setup for Integration Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/FINAL_IMPLEMENTATION_REPORT.md Provides a step-by-step guide for setting up a Google Cloud Project to enable Google Calendar and Keep API integrations. This involves creating a project, enabling necessary APIs, and generating OAuth 2.0 credentials. ```bash 1. Create project at console.cloud.google.com 2. Enable Google Calendar API 3. Enable Google Keep API (if available) 4. Create OAuth 2.0 credentials 5. Download credentials JSON ``` -------------------------------- ### Install Playwright and Browsers with Pip Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/BROWSER_AUTOMATION_SETUP.md Installs the Playwright library for Python and downloads the necessary browser binaries (Chromium) for browser automation. This is a prerequisite for Milla Rayne's browser automation features. ```bash pip install playwright playwright install chromium ``` -------------------------------- ### Setting up .env for Local Development (Bash) Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/API_SECURITY_GUIDE.md Provides bash commands to set up a local development environment using a .env file. It includes copying an example file and editing it with actual keys, ensuring the .env file is ignored by git. ```bash cp .env.example .env # Edit .env with your real keys - this file won't be committed ``` -------------------------------- ### Docker Setup Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/REPOSITORY_ENHANCEMENT_PLAN.md Instructions for setting up Docker for the Milla Rayne project, including creating a Dockerfile and Docker Compose configuration. ```APIDOC ## Docker Setup 🐳 ### Description This section outlines the process of containerizing the Milla Rayne application using Docker, including the creation of a `Dockerfile` and a `docker-compose.yml` file for easier development and deployment. ### Create Dockerfile ```dockerfile # Dockerfile FROM node:20-alpine WORKDIR /app # Install dependencies COPY package*.json ./ RUN npm ci --production # Copy app COPY . . # Build RUN npm run build # Expose port EXPOSE 5000 # Start CMD ["npm", "start"] ``` ### Docker Compose ```yaml # docker-compose.yml (Example structure) version: '3.8' services: milla-rayne: build: context: . dockerfile: Dockerfile ports: - "5000:5000" environment: # Add environment variables here volumes: # Add volumes for development if needed ``` ``` -------------------------------- ### Start Milla Rayne Server for Online Mode Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/android/QUICKSTART.md This command initiates the Milla Rayne server, which is necessary for enabling the app's advanced AI capabilities. Ensure you are in the root directory of the Milla-Rayne project before running this command. ```bash cd /path/to/Milla-Rayne npm run dev ``` -------------------------------- ### Build Milla-Rayne Project Source: https://github.com/mrdannyclark82/milla-rayne/blob/main/docs/FARA_INTEGRATION.md Installs project dependencies and builds the Milla-Rayne application. This step is necessary after setting up the Node.js environment and before starting the server. ```bash npm install npm run build ```