AI Tamagotchi Built in Swift
A developer has built a desktop Tamagotchi-style cat with an AI "brain" that lives on the macOS Dock. The entire project was created in Swift, showcasing the language's growing capabilities for building playful, AI-driven agents outside of traditional app structures.
The project, named "Murchi," utilizes Google's Gemini AI to power its conversational abilities. The AI is prompted to respond in character as a playful and mischievous cat, incorporating sounds like "mrrrow" and "purrr" into its short, 1-3 sentence replies. This personality is maintained by feeding the AI with the cat's current stats, such as its name, level, mood, and hunger levels. In a departure from conventional macOS development, the entire application is contained within a single Swift file exceeding 7,000 lines of code. The developer, Egor Fedorov, intentionally avoided using an Xcode project, storyboards, or even SwiftUI, opting for a streamlined build process using a simple bash script. This minimalist approach demonstrates the capability of building complex, interactive applications on macOS with raw Swift. The development process itself was an experiment in AI-assisted programming, with every commit to the project's repository being co-authored by the AI assistant Claude. This highlights a growing trend of using AI not just as a feature within an application, but as an integral part of the development workflow for passion projects and rapid prototyping. This AI Tamagotchi is part of a resurgence of virtual pets, evolving from the 90s trend with modern AI capabilities. Today's AI pets often leverage large language models to create unique personalities and engage in more meaningful interactions, a significant leap from the deterministic logic of their predecessors. This trend extends to physical AI companions and toys, with a market expected to grow significantly, indicating a broader interest in AI-driven companionship.