Skip to content

nucket/NekoAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

286 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NekoAI Banner NekoAI Logo

NekoAI

The AI-powered desktop pet. Nostalgic soul, modern brain.

License: MIT Built with Tauri Rust React TypeScript PRs Welcome Stars Lighthouse 100 on nekoai.dev Discord


Remember Neko chasing your cursor? Or eSheep roaming your taskbar? NekoAI brings that magic back β€” but now your pet can actually talk, think, and help you.


🌐 nekoai.dev Β· πŸš€ Download Β· 🎬 Showcase Β· πŸ“– Docs Β· 🎨 Create a pet Β· πŸ’¬ Community


✨ What is NekoAI?

NekoAI is an open-source, AI-powered desktop pet that lives on your screen. It wanders around your windows, reacts to what you do, and when you need it β€” it thinks, answers, and helps, right there on your desktop.

It's a love letter to the 90s/00s desktop companions (Neko, eSheep, Shimeji) rebuilt with a modern stack and a real AI brain inside.

You:    "Hey Neko, explain this regex real quick"
Neko:   *walks over, pops a bubble*
        "That matches one or more digits at start of line. *purrs*"

🎬 See it in action

NekoAI onboarding on Windows with Ollama

Zero-config onboarding on Windows β€” NekoAI auto-detects Ollama and walks you in.

Windows MacOS Linux
Chat on Windows NekoAI on macOS NekoAI on Ubuntu

🎞️ Full gallery β€” onboarding, chat, pet selection, sizes and settings across Windows, macOS, Ubuntu and Fedora: see docs/showcase.md.


🌟 Features

Feature Status
🐱 Animated sprite pets that roam your desktop βœ…
πŸ–±οΈ 8-direction cursor following & movement βœ…
πŸ’¬ AI chat via animated speech bubble βœ…
🧠 Persistent memory β€” remembers your name, projects, preferences βœ…
πŸ”Œ Multi-provider AI (Claude, OpenAI, Gemini, NVIDIA NIM, Ollama local) βœ…
😴 Dynamic mood β€” energy changes with time of day & idle time βœ…
🎭 Multiple pets β€” Classic Neko, Pingu, Pac-Man, BSD Daemon, Tabby, TIE Fighter βœ…
🏠 Pet house β€” spawn point at bottom-right corner, click to bring pet home βœ…
πŸ”” Proactive nudges ("coding 90 min β€” take a break!") βœ…
πŸ–₯️ System tray β€” hide/show, switch pets, settings βœ…
πŸ“ Adjustable pet size (S/M/L/XL) with pixel-perfect scaling βœ…
πŸ–±οΈ Right-click context menu β€” quick settings & pet size adjustment βœ…
πŸ’¬ Tunable AI response length β€” S / M / L / Custom (32–4096 tokens) βœ…
πŸͺ„ Zero-config onboarding β€” auto-detects Ollama; walks pet out from house corner βœ…
πŸ“Š NekoMetrics β€” anonymous keystroke / mouse / pet-step counters in a tooltip πŸ”œ v0.4
πŸ₯ BongoCat-style reactive paw animations driven by keystrokes πŸ”œ v0.4
πŸ“… Daily/weekly/monthly activity history & GitHub-style heatmap πŸ”œ v0.4
πŸ“· NekoCapture β€” screenshots with username/date/app/comment footer πŸ”œ v0.6
πŸ–ΌοΈ Customizable screenshot borders (color, thickness, rounded corners, shadow) πŸ”œ v0.6
✏️ NekoAnnotate β€” full-screen drawing overlay (pen, shapes, arrows, text) πŸ”œ v0.7
🌐 Cross-platform (Windows, macOS, Linux) πŸ”œ Planned
🧩 Plugin system for custom behaviors πŸ”œ Planned
πŸ—£οΈ Voice interaction (TTS/STT) πŸ”œ Planned

🎬 How it works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Your Desktop                       β”‚
β”‚                                                       β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚   β”‚  VSCode  β”‚          β”‚ "You've been coding 90   β”‚  β”‚
β”‚   β”‚          β”‚          β”‚  min. Stretch break? 🐾" β”‚  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    πŸ±β†   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                  ↑ roams, reacts to what you open     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
               Click pet or type to chat
                          β”‚
                          β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   AI Provider       β”‚
              β”‚  Claude / OpenAI /  β”‚
              β”‚  Gemini / NVIDIA /  β”‚
              β”‚  Ollama (local)     β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
              Response in animated speech bubble
              Facts extracted β†’ saved to SQLite

πŸš€ Installation

Option A β€” Download the installer (easiest)

Go to Releases and grab the latest installer for your OS.

Platform File
Windows NekoAI_x.x.x_x64.msi
macOS NekoAI_x.x.x_aarch64.dmg
Linux NekoAI_x.x.x_amd64.AppImage

Linux note: The .AppImage needs no installation β€” chmod +x it and run it directly. If you prefer the .deb, install it from a terminal with sudo apt install ./nekoai_x.x.x_amd64.deb β€” GNOME Software / the Ubuntu Software Center cannot reliably install local .deb files and may fail with a generic error.

Wayland & cursor following: On a Wayland session (the default on Fedora, recent Ubuntu and others) NekoAI runs through XWayland and cannot read the global cursor position directly. To let the pet follow your mouse it reads raw motion from /dev/input, which requires your user to be in the input group:

sudo usermod -aG input $USER   # then log out and back in

Without this NekoAI still runs β€” it switches to wanderer mode and roams on its own, and tells you so once. Xorg sessions need no setup. See Cursor Tracking on Wayland for the details.

Option B β€” Build from source

# Prerequisites: Node.js 22+, pnpm 11+, Rust 1.75+, Tauri CLI
git clone https://github.com/nucket/nekoai.git
cd nekoai/NekoAI

pnpm install
pnpm tauri dev           # Development with hot reload
pnpm tauri build         # Production build

βš™οΈ Configuration

Right-click the pet to open the context menu where you can:

  • βš™ Settings β€” configure AI provider, API key, model, response length, and your name
  • 🐾 Select Pet β€” switch between available pets
  • πŸ“ Size β€” adjust pet size (S=32px, M=64px, L=96px, XL=128px) for pixel-perfect rendering
  • πŸ’¬ Response length β€” pick S / M / L (256 / 512 / 1024 tokens) or set a Custom value (32–4096). Medium is the default and covers most replies; pick Short for snappy answers on local Ollama, Long for detailed technical explanations, Custom when you want exact control.

Configuration is auto-created on first run:

# ~/.config/nekoai/config.toml  (auto-created on first run)

provider   = "gemini"            # "anthropic" | "openai" | "gemini" | "nvidia" | "ollama"
api_key    = "AIza..."           # Stored locally, never sent anywhere
model      = "gemini-2.5-flash"
pet_size   = 64                  # pixels (32, 64, 96, or 128)
max_tokens = 512                 # 256 (Short) | 512 (Medium, default) | 1024 (Long) | 32–4096 (Custom)

πŸͺ„ New user? NekoAI auto-detects a running Ollama instance and configures itself on first launch β€” no settings required. Otherwise it guides you to set up your preferred provider.

πŸ”’ Privacy first: NekoAI has no backend server. All data stays on your machine. The only outbound calls are the AI API calls you configure.


🧠 AI & Memory

NekoAI builds a persistent context for every conversation:

  • Pet personality β€” defined per-pet in pet.json via system_prompt
  • User facts β€” extracted automatically from conversations and stored in SQLite (~/.local/share/nekoai/memory.db). Includes name, current projects, preferred language, etc.
  • Conversation history β€” last 20 messages sent as context on every turn; the speech bubble also shows your recent turns when reopened, so the pet never looks like it forgot
  • Dynamic mood β€” pet's current energy/happiness/curiosity subtly influences its tone
System prompt = pet personality
             + known facts about user
             + current mood description

Facts are extracted with pattern matching after each exchange and saved to the user_facts SQLite table. You can inspect them directly:

sqlite3 ~/.local/share/nekoai/memory.db "SELECT * FROM user_facts;"

Supported AI providers

Provider Models Requires
Anthropic Claude Haiku, Sonnet API Key
OpenAI GPT-4o mini, GPT-4o API Key
Google Gemini 2.5 Flash (default), 2.0 Flash... Free API Key (Google AI Studio) β€” no credit card
NVIDIA NIM Llama 3.1, Mistral, Nemotron, MiniMax... API Key (build.nvidia.com) β€” free tier available
Ollama Llama 3, Mistral, Phi-3... Ollama running locally

πŸ’‘ For full privacy: Use Ollama β€” 100% local, no API costs, no data leaves your machine. 🟒 Free models: NVIDIA NIM offers a generous free tier with 40+ open-source models at build.nvidia.com.


😴 Mood Engine

The pet's mood updates every 60 seconds based on:

Signal Effect
Time of day (6am–8pm) Energy peaks at midday, drops at night
OS idle time Energy drains gradually while inactive
Active app category Curiosity rises when coding; relaxes otherwise

Mood affects:

  • Animations β€” yawns after 3 min idle, falls asleep after 5 min
  • AI tone β€” sleepy pet gives shorter, quieter answers; curious pet asks follow-ups

🎭 Available Pets

Pet ID Personality
🐱 Classic Neko classic-neko Playful, curious β€” short bursts, occasional nya~
🐧 Pingu penguin-pixel Cheerful and clumsy, bounces back from every stumble
🟑 Pac-Man pac-man Always hungry, obsessed with dots β€” very short waka-waka replies
😈 BSD Daemon bsd-daemon Wry Unix sysadmin β€” terse, accurate, mildly smug about BSD
🐈 Tabby tabby Dignified and old-school β€” the original X11 cat, calm and unhurried
πŸš€ TIE Fighter tie-fighter Imperial officer β€” formal, brief, always scanning for Rebel scum

Switch pets via right-click β†’ Select Pet, or from the system tray menu.

Want to create your own? See Creating a Pet.


πŸ—οΈ Architecture

NekoAI/
β”œβ”€β”€ src-tauri/                   # Rust backend (Tauri v2)
β”‚   β”œβ”€β”€ capabilities/
β”‚   β”‚   └── default.json         # Window permissions (main, panel, house)
β”‚   └── src/
β”‚       β”œβ”€β”€ lib.rs               # App setup, tray, Tauri commands, resize_window
β”‚       β”œβ”€β”€ desktop_monitor.rs   # Active window & idle time (Windows + Linux/X11)
β”‚       β”œβ”€β”€ cursor_tracker.rs    # Wayland cursor fallback β€” reads /dev/input via evdev
β”‚       └── storage.rs           # SQLite: conversation history, user facts, config
β”‚
β”œβ”€β”€ src/                         # TypeScript / React frontend
β”‚   β”œβ”€β”€ App.tsx                  # Main pet window β€” movement, events, AI, rendering
β”‚   β”œβ”€β”€ HouseWindow.tsx          # Pet house widget (separate Tauri window "house")
β”‚   β”œβ”€β”€ PanelWindow.tsx          # Context menu / settings panel (window "panel")
β”‚   β”œβ”€β”€ main.tsx                 # Entry point β€” routes to App / HouseWindow / PanelWindow
β”‚   β”œβ”€β”€ ai/
β”‚   β”‚   β”œβ”€β”€ index.ts             # Provider factory, system prompt builder
β”‚   β”‚   β”œβ”€β”€ memory.ts            # Fact extraction & persistence (SQLite IPC)
β”‚   β”‚   β”œβ”€β”€ types.ts             # AIProvider interface, Message type
β”‚   β”‚   └── providers/           # anthropic.ts Β· openai.ts Β· gemini.ts Β· ollama.ts Β· nvidia.ts
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ SpeechBubble.tsx     # Animated chat bubble β€” scramble text, sprite-anchored, preloads recent history
β”‚   β”‚   β”œβ”€β”€ SettingsPanel.tsx    # Settings panel (API key, model, pet size)
β”‚   β”‚   β”œβ”€β”€ ContextMenu.tsx      # Right-click context menu (settings, pet, size)
β”‚   β”‚   └── PetSelector.tsx      # Pet picker with dynamic window resizing
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ usePetMovement.ts    # 8-direction movement, overridePosition, EdgePhase state machine
β”‚   β”‚   β”œβ”€β”€ useIdleSequencer.ts  # Classic Neko stopβ†’washβ†’scratchβ†’yawnβ†’sleep idle sequence
β”‚   β”‚   β”œβ”€β”€ useMoodEngine.ts     # Energy/happiness/curiosity + animation overrides
β”‚   β”‚   β”œβ”€β”€ useDesktopContext.ts # Active window detection & app categorization
β”‚   β”‚   └── useOnboarding.ts    # First-launch state machine (Ollama auto-detect β†’ done)
β”‚   └── store/
β”‚       β”œβ”€β”€ index.ts             # Zustand store (mood, active pet, animation)
β”‚       └── configStore.ts       # AI config & pet size persisted via Tauri commands
β”‚
└── pets/                        # Pet definitions (bundled with app)
    β”œβ”€β”€ manifest.json            # Registry of all available pets
    β”œβ”€β”€ classic-neko/            # 🐱 pet.json + sprites/
    β”œβ”€β”€ penguin-pixel/           # 🐧 pet.json + sprites/ (Pingu)
    β”œβ”€β”€ pac-man/                 # 🟑 pet.json + sprites/
    β”œβ”€β”€ bsd-daemon/              # 😈 pet.json + sprites/
    β”œβ”€β”€ tabby/                   # 🐈 pet.json + sprites/
    └── tie-fighter/             # πŸš€ pet.json + sprites/

Window Resizing on Windows

NekoAI uses a Tauri command (resize_window) to bypass OS-level restrictions when the window has resizable: false in its configuration. This is necessary because:

  • Why resizable: false? β€” Creates a truly frameless window (no title bar, borders, or resize handles)
  • The problem: The Windows API removes the WS_THICKFRAME window style when a window is created as non-resizable, and JavaScript APIs cannot restore it at runtime
  • The solution: A Rust-side command calls window.set_size() directly, completely bypassing the JS API limitation

This allows the speech bubble, settings panel, pet selector, and context menu to dynamically expand/collapse without the user seeing the resize handles.

NVIDIA NIM β€” Rust-side HTTP proxy

NVIDIA's integrate.api.nvidia.com endpoint is designed for server-to-server usage and does not send CORS headers. Unlike the other providers (Anthropic, OpenAI, Gemini) which explicitly support browser CORS, a direct fetch() from Tauri's WebView would be silently blocked.

NekoAI works around this with a dedicated nvidia_chat Tauri command (lib.rs) that makes the HTTP request from native Rust via reqwest, completely bypassing the WebView's CORS enforcement. The TypeScript provider uses invoke('nvidia_chat', ...) instead of fetch. This keeps the same AIProvider interface for all providers while letting NVIDIA NIM work correctly.

Cursor Tracking on Wayland (Linux)

NekoAI reads the global cursor position to make the pet follow your mouse. On Windows, macOS and Linux/Xorg this is a direct OS query. On a Wayland session it isn't: NekoAI runs as an XWayland client, and X11's XQueryPointer only reports a live position while the pointer is over one of NekoAI's own windows β€” everywhere else it returns a frozen value, so the pet appears to stop following the cursor.

The workaround lives in cursor_tracker.rs. On a Wayland session it reads raw relative mouse motion straight from /dev/input via the evdev crate, integrates an absolute position, and reconciles it against XQueryPointer whenever that reading updates. Reading /dev/input requires the user to be in the input group (sudo usermod -aG input $USER); when no device is readable the cursor_tracking_status command reports unavailable and the pet automatically falls back to wanderer mode so it still feels alive.

Pixel-Perfect Sprite Scaling

All pet sizes are integer multiples of the native 32px sprite:

  • S = 32px (1Γ—)
  • M = 64px (2Γ—)
  • L = 96px (3Γ—)
  • XL = 128px (4Γ—)

This ensures crisp, pixelated rendering without anti-aliasing artifacts. Non-integer scales (like 48px = 1.5Γ—) cause uneven pixel mapping and visible borders. CSS sizes are injected dynamically via inline styles in App.tsx, not hardcoded in App.css.


🀝 Contributing

NekoAI is community-first. Ways to contribute:

  • 🐾 Create a new pet β€” see Creating a Pet
  • πŸ› Report bugs β€” open a detailed Issue
  • πŸ’‘ Suggest features β€” Discussions tab
  • πŸ§‘β€πŸ’» Code β€” check good first issues

Read CONTRIBUTING.md before submitting.


πŸ’¬ Community {#community}

Join our Discord server to chat, share your pets, get help, and follow development:

Discord

Channels available in: English πŸ‡¬πŸ‡§ | EspaΓ±ol πŸ‡ͺπŸ‡Έ | PortuguΓͺs πŸ‡§πŸ‡·


πŸ—ΊοΈ Roadmap

Version Focus
v0.1 βœ… Core: transparent window, Neko sprite, cursor tracking, AI chat
v0.2 βœ… Persistent memory, dynamic mood engine, pet house window, new pets (Pingu, Pac-Man, BSD Daemon, Tabby, TIE Fighter), 8-direction movement
v0.3 βœ… Zero-config onboarding (Ollama auto-detect), Gemini as default provider, NVIDIA NIM provider, classic Neko idle/edge sequencer, restrictive CSP, multi-OS CI matrix, passive install metrics pipeline, Wayland cursor tracking via evdev, tunable response length (S/M/L)
v0.4 πŸ”œ NekoMetrics β€” anonymous keystroke / mouse / pet-step counters with house right-click menu, animated tooltip above the house, daily/weekly/monthly history, GitHub-style heatmap, BongoCat-style reactive paw animations
v0.5 πŸ”œ Accessories/skins system, sound effects, sprite scale slider, community pet gallery in-app, mini-games
v0.6 πŸ”œ NekoCapture β€” native screenshots with metadata footer (username, timestamp, app name, comments), customizable borders & shadows, clipboard/file export, hotkeys
v0.7 πŸ”œ NekoAnnotate β€” full-screen drawing overlay (pen, shapes, arrows, text, highlighter) with undo/redo, inspired by ZoomIt Draw; annotate before saving screenshots
v1.0 πŸ”œ Cross-platform stable release, plugin API, voice support

πŸ™ Inspiration & Credits

NekoAI is the latest chapter in a 38-year chain started by a tiny Japanese program in 1988.

The original creators β€” their work made this possible:

Name Contribution Year
Naoshi Watanabe (θ‹₯田部 η›΄) Created NEKO.COM β€” the original cursor-chasing cat ~1988
Kenji Gotoh (εΎŒθ—€ε―ΏεΊ΅) Designed the iconic 32Γ—32 sprites; released them to the public domain 1989
Masayuki Koba (叀場正葌) xneko β€” X11 port that spawned all Unix lineage 1990
Tatsuya Kato (εŠ θ—€ι”δΉŸ) oneko β€” Linux/BSD port; still installable today (apt install oneko) 1990
David Harvey Neko95/Neko98 β€” Win32 port with footprints and installer 1997–2000

Standing on the shoulders of:

  • eSheep β€” the Windows XP sheep that proved desktop pets still had an audience
  • Shimeji β€” Japanese desktop mascot framework with physics and interactions
  • Eliot Akira's WebNeko β€” the browser revival that brought Neko to a new generation
  • Tauri β€” for making sub-10MB native desktop apps actually possible in 2026

πŸ“– The full story β€” from a 1988 NEC PC-9801 to AI-powered conversations β€” is in STORY-Neko.md.


πŸ“„ License

MIT Β© 2026 Naudy Castellanos

Free to use, modify, and distribute. Attribution appreciated.


If NekoAI made you smile, give it a ⭐ β€” it helps a lot!

🌐 nekoai.dev Β· βœ‰ hi@nekoai.dev Β· πŸ‘€ naudycastellanos.com

Made with β˜• and deep nostalgia for Windows XP β€” by Naudy Castellanos

About

🐱 AI-powered desktop pet inspired by the classic Neko. Roams your screen, reacts to your windows, and chats with you via Gemini, Claude, OpenAI, nVidia NIM or Ollama. Built with Tauri + Rust.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages