### Install Kai via Homebrew Source: https://github.com/aeldergentics/kai/blob/main/docs/getting-started.md Use this command to install the Kai application on macOS systems using Homebrew. ```bash brew install --cask simonschubert/tap/kai ``` -------------------------------- ### Install Kai via Package Managers Source: https://github.com/aeldergentics/kai/blob/main/site/index.html Commands to install the Kai application on macOS, Windows, and Arch Linux. ```bash brew install --cask simonschubert/tap/kai ``` ```powershell winget install SimonSchubert.Kai ``` ```bash yay -S kai-bin ``` -------------------------------- ### Install Kai via Winget Source: https://github.com/aeldergentics/kai/blob/main/docs/getting-started.md Use this command to install the Kai application on Windows systems using the Windows Package Manager. ```bash winget install SimonSchubert.Kai ``` -------------------------------- ### Install a new skill Source: https://github.com/aeldergentics/kai/blob/main/composeApp/src/commonMain/composeResources/files/skills/create-skill/SKILL.md Use this shell command to create the skill directory and write the SKILL.md file. The quoted heredoc delimiter ensures that YAML and markdown characters are preserved exactly. ```sh mkdir -p /root/skills/ && cat > /root/skills//SKILL.md <<'SKILLEOF' --- name: description: --- SKILLEOF ``` -------------------------------- ### Install Xcode command line tools Source: https://github.com/aeldergentics/kai/blob/main/fastlane/README.md Ensures the necessary Xcode command line tools are installed on the system. ```sh xcode-select --install ``` -------------------------------- ### Install Kai via AUR Source: https://github.com/aeldergentics/kai/blob/main/docs/getting-started.md Use this command to install the Kai binary package on Arch Linux systems using yay. ```bash yay -S kai-bin ``` -------------------------------- ### Run Desktop Release Build Source: https://github.com/aeldergentics/kai/blob/main/docs/desktop-release-smoketest.md Executes the application using the release configuration to verify ProGuard behavior. ```bash ./gradlew :composeApp:runRelease ``` ```bash JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home \ ./gradlew :composeApp:runRelease -Dorg.gradle.java.home=$JAVA_HOME ``` -------------------------------- ### Verify model catalog changes Source: https://github.com/aeldergentics/kai/blob/main/docs/knowledge/model-catalog/refresh-playbook.md Run these Gradle commands to compile the project, execute model catalog tests, and apply code formatting. ```bash ./gradlew :composeApp:compileKotlinDesktop ``` ```bash ./gradlew :composeApp:desktopTest --tests '*ModelCatalog*' ``` ```bash ./gradlew spotlessApply ``` -------------------------------- ### Execute verification and build tasks Source: https://github.com/aeldergentics/kai/blob/main/docs/knowledge/free-tier/refresh-playbook.md Gradle commands to compile, test, and format the project after updating model sets. ```bash ./gradlew :composeApp:compileKotlinDesktop ``` ```bash ./gradlew :composeApp:desktopTest --tests '*FreeTierModels*' --tests '*ModelTransformations*' ``` ```bash ./gradlew spotlessApply ``` -------------------------------- ### Generate and upload store screenshots Source: https://github.com/aeldergentics/kai/blob/main/README.md Generates localized screenshots for the Play Store across all supported locales and uploads them using Fastlane. ```bash ./gradlew :screenshotTests:generateStoreScreenshots bundle exec fastlane android upload_screenshots ``` -------------------------------- ### Record Kai UI component screenshots Source: https://github.com/aeldergentics/kai/blob/main/README.md Records golden images specifically for KaiUiScreenshotTest, providing a faster alternative to running the full test suite. ```bash ./gradlew :screenshotTests:recordKaiUiScreenshots ``` -------------------------------- ### open_file Source: https://github.com/aeldergentics/kai/blob/main/docs/features/tools.md Opens a file using the system's default viewer based on the file's MIME type. ```APIDOC ## open_file ### Description Fires an ACTION_VIEW Intent for a single file at the specified path. The system determines the appropriate application to open the file based on its MIME type. ### Parameters #### Path Parameters - **path** (string) - Required - The relative path to the file from the root directory. ``` -------------------------------- ### Initialize UI Animations and Carousel Source: https://github.com/aeldergentics/kai/blob/main/site/index.html JavaScript for triggering fade-in animations via IntersectionObserver and managing an automatic image carousel. ```javascript const o = new IntersectionObserver((entries) => { entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('visible'); o.unobserve(e.target); } }); }, { threshold: 0.1 }); document.querySelectorAll('.fade-in').forEach(el => o.observe(el)); const slides = document.querySelectorAll('.carousel-slide'); const dots = document.querySelectorAll('.dot'); const label = document.getElementById('carousel-label'); const labels = ['Survival Game', 'Recipe Card', 'EcoPulse Brainstorm', 'Memories']; let current = 0; let timer; function goTo(i) { slides[current].classList.remove('active'); dots[current].classList.remove('active'); current = i; slides[current].classList.add('active'); dots[current].classList.add('active'); label.textContent = labels[current]; } function next() { goTo((current + 1) % slides.length); } function startTimer() { timer = setInterval(next, 2000); } dots.forEach((dot, i) => dot.addEventListener('click', () => { clearInterval(timer); goTo(i); startTimer(); })); startTimer(); ``` -------------------------------- ### manage_process Source: https://github.com/aeldergentics/kai/blob/main/docs/features/tools.md Manages background shell processes. ```APIDOC ## manage_process ### Description Performs management actions on background processes initiated via shell commands. ### Parameters - **action** (string) - Required - The action to perform: 'list', 'log', 'kill', or 'remove'. ``` -------------------------------- ### Upload Android screenshots Source: https://github.com/aeldergentics/kai/blob/main/fastlane/README.md Uploads localized screenshots to the Google Play Store. ```sh [bundle exec] fastlane android upload_screenshots ``` -------------------------------- ### execute_shell_command Source: https://github.com/aeldergentics/kai/blob/main/docs/features/tools.md Executes a shell command on the host or within the Android sandbox. ```APIDOC ## execute_shell_command ### Description Executes a shell command. Supports persistent sessions on Android and various configuration parameters for execution environment and timeouts. ### Parameters - **command** (string) - Required - The shell command to execute. - **timeout** (integer) - Optional - Timeout in seconds (Desktop: 30-120s, Android: 30-60s). - **working_dir** (string) - Optional - Working directory for the command. - **env** (object) - Optional - Environment variables as key-value pairs. - **background** (boolean) - Optional - If true, runs in background and returns a session_id. - **fresh** (boolean) - Optional - Android only; runs in a one-shot proot invocation isolated from persistent sessions. ``` -------------------------------- ### Update runtime free-tier models Source: https://github.com/aeldergentics/kai/blob/main/docs/knowledge/free-tier/refresh-playbook.md Target file for updating the runtime sets of free-tier models. ```kotlin composeApp/src/commonMain/kotlin/com/inspiredandroid/kai/data/FreeTierModels.kt ``` -------------------------------- ### Deploy Android AAB Source: https://github.com/aeldergentics/kai/blob/main/fastlane/README.md Deploys an Android App Bundle to the Play Store production track. ```sh [bundle exec] fastlane android deploy ``` -------------------------------- ### Update README screenshots Source: https://github.com/aeldergentics/kai/blob/main/README.md Updates the screenshots used in the README file. This command is executed automatically by CI on every push. ```bash ./gradlew :screenshotTests:updateScreenshots ``` -------------------------------- ### Heartbeat Prompt Builder Notification Section Source: https://github.com/aeldergentics/kai/blob/main/docs/features/notifications.md Format for the notification section within the heartbeat prompt builder. ```markdown ## New Notifications These notifications arrived since the last heartbeat. Summarise briefly; only flag items that genuinely need attention. - **WhatsApp** — Alice (id: 0|com.whatsapp|...): Hey, are we still on for tonight? - **Gmail** (id: 0|com.google.android.gm|...): New message from boss@… ``` -------------------------------- ### Read SMS Tools Source: https://github.com/aeldergentics/kai/blob/main/docs/features/sms.md Tools for retrieving SMS messages from the pending queue or inbox. Requires isSmsSupported, isSmsEnabled, and hasReadPermission. ```APIDOC ## check_sms ### Description List messages currently in the heartbeat pending queue. ### Returns - **id** (integer) - **from** (string) - **date** (integer) - **preview** (string) - **is_read** (boolean) ## read_sms ### Description Fetch the full body of a single SMS by its ID. ### Parameters - **id** (integer) - Required ## search_sms ### Description Perform a full-text search over inbox address and body, returning the newest results first (capped at 20). ``` -------------------------------- ### Send SMS Tools Source: https://github.com/aeldergentics/kai/blob/main/docs/features/sms.md Tools for drafting outgoing SMS messages. Requires isSmsSupported, isSmsSendEnabled, and hasSendPermission. ```APIDOC ## send_sms ### Description Draft an outgoing SMS to a specific phone number. ### Returns - **draft_id** (integer) ## reply_sms ### Description Draft a reply to a received SMS by its ID. The sender is automatically looked up from the inbox. ### Parameters - **id** (integer) - Required ### Returns - **draft_id** (integer) ``` -------------------------------- ### Implement Intersection Observer for Fade-in Source: https://github.com/aeldergentics/kai/blob/main/site/latex-math/index.html This JavaScript snippet observes elements with the 'fade-in' class and adds a 'visible' class when they enter the viewport. ```javascript const o = new IntersectionObserver((entries) => { entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('visible'); o.unobserve(e.target); } }); }, { threshold: 0.1 }); document.querySelectorAll('.fade-in').forEach(el => o.observe(el)); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.