Skip to content

silasWorked/gemini-assistant

Repository files navigation

Gemini Assistant

Flutter Dart Platform License

AI-powered desktop assistant built with Flutter and Google Gemini 2.0 Flash API with full OS interaction capabilities.

✨ Features

  • πŸ’¬ Natural Conversation with Google Gemini AI (2.0 Flash model)
  • πŸ› οΈ 26 OS Tools - AI can interact with your computer
  • 🧠 Persistent Memory - AI remembers important information between sessions
  • ⏰ Timers & Reminders - Set timers with notifications
  • 🌍 Localization - Russian and English languages
  • πŸ”’ Proxy Support - Works in restricted regions
  • πŸ“₯ System Tray - Minimize to tray, quick access
  • 🎨 Beautiful Dark UI - Elegant gradient design with purple accents
  • ✨ Smooth Animations - Optional, can be disabled
  • πŸ“œ Chat History - Persistent chat sessions
  • πŸ” Secure Storage - API keys stored securely
  • πŸ“ Markdown Support - Rich text with code highlighting

πŸ› οΈ Available Tools (26 total)

πŸ“ File System (6 tools)

Tool Description
read_file Read text file contents
write_file Create or overwrite files
list_directory Show folder contents
create_directory Create new folders
delete Delete files or folders
search_files Search files by name pattern

πŸ’» System (6 tools)

Tool Description
system_info OS, CPU, memory info
disk_info Disk space information
network_info Network interfaces and IPs
list_processes List running processes
get_process_path Find process executable path
kill_process Terminate process by PID

⚑ Commands (5 tools)

Tool Description
run_command Execute PowerShell commands
run_admin_command Execute as administrator
launch_app Launch applications
open_file Open file in default app
open_url Open URL in browser

πŸ“‹ Clipboard (2 tools)

Tool Description
read_clipboard Read clipboard text
write_clipboard Copy text to clipboard

⏰ Timers (3 tools)

Tool Description
set_timer Create timer with message
list_timers Show active timers
cancel_timer Cancel timer by ID

🧠 Memory (4 tools)

Tool Description
save_memory Remember information
recall_memory Retrieve saved info
list_memories Show all memories
forget_memory Delete memory entry

πŸ“‹ Prerequisites

πŸš€ Installation

Option 1: Download Release (Recommended)

  1. Go to Releases
  2. Download gemini-assistant-windows-x64.zip
  3. Extract to any folder
  4. Run gemini_assistant.exe
  5. Enter your API key in settings

Option 2: Build from Source

Requirements: Flutter SDK 3.10.3 or higher

  1. Clone the repository:
git clone https://github.com/silasWorked/gemini-assistant.git
cd gemini-assistant
  1. Install dependencies:
flutter pub get
  1. Run the app:
flutter run -d windows

βš™οΈ Configuration

On first launch, you'll be prompted to enter your Gemini API key:

  1. Click the settings icon (βš™οΈ) in the sidebar
  2. Enter your API key from Google AI Studio
  3. The key will be securely stored locally

Proxy Setup (Optional)

If you're in a region where Google API is blocked:

  1. Go to Settings
  2. Enable HTTP Proxy
  3. Enter your proxy details (host, port, optional auth)
  4. Click "Check" to verify connection

πŸ“ Project Structure

lib/
β”œβ”€β”€ main.dart                     # App entry point
β”œβ”€β”€ l10n/
β”‚   └── app_localizations.dart    # Localization strings
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ app_settings.dart         # Settings model
β”‚   β”œβ”€β”€ chat_message.dart         # Message model
β”‚   └── chat_session.dart         # Session model
β”œβ”€β”€ screens/
β”‚   β”œβ”€β”€ chat_screen.dart          # Main chat UI
β”‚   β”œβ”€β”€ tools_page.dart           # Tools management
β”‚   └── memory_page.dart          # Memory viewer
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ gemini_service.dart       # Gemini API client
β”‚   β”œβ”€β”€ chat_history_service.dart # History persistence
β”‚   β”œβ”€β”€ tray_service.dart         # System tray
β”‚   └── tools/                    # OS tools
β”‚       β”œβ”€β”€ tool_base.dart
β”‚       β”œβ”€β”€ tool_registry.dart
β”‚       β”œβ”€β”€ file_tools.dart
β”‚       β”œβ”€β”€ system_tools.dart
β”‚       β”œβ”€β”€ command_tools.dart
β”‚       β”œβ”€β”€ clipboard_tools.dart
β”‚       β”œβ”€β”€ timer_tools.dart
β”‚       └── memory_tools.dart
β”œβ”€β”€ viewmodels/
β”‚   └── chat_viewmodel.dart       # State management
└── widgets/
    β”œβ”€β”€ chat_bubble.dart
    β”œβ”€β”€ chat_input.dart
    β”œβ”€β”€ navigation_sidebar.dart
    β”œβ”€β”€ settings_dialog.dart
    └── ...

πŸ“¦ Dependencies

Package Purpose
provider State management
http API requests
flutter_secure_storage Secure key storage
flutter_markdown Markdown rendering
path_provider Local storage paths
uuid Unique IDs
system_tray System tray integration
window_manager Window control
local_notifier Desktop notifications

πŸ’¬ Usage Examples

Ask the AI to:

English:

  • "Show what's on my desktop"
  • "Find all .log files in Windows folder"
  • "What processes are using the most memory?"
  • "Open google.com"
  • "Remember that my project is in C:\Projects\MyApp"
  • "Set a timer for 5 minutes"

Russian:

  • "ПокаТи Ρ‡Ρ‚ΠΎ Π½Π° Ρ€Π°Π±ΠΎΡ‡Π΅ΠΌ столС"
  • "Найди всС .log Ρ„Π°ΠΉΠ»Ρ‹ Π² ΠΏΠ°ΠΏΠΊΠ΅ Windows"
  • "КакиС процСссы Π·Π°Π½ΠΈΠΌΠ°ΡŽΡ‚ большС всСго памяти?"
  • "ΠžΡ‚ΠΊΡ€ΠΎΠΉ google.com"
  • "Π—Π°ΠΏΠΎΠΌΠ½ΠΈ Ρ‡Ρ‚ΠΎ ΠΌΠΎΠΉ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ находится Π² C:\Projects\MyApp"
  • "ΠŸΠΎΡΡ‚Π°Π²ΡŒ Ρ‚Π°ΠΉΠΌΠ΅Ρ€ Π½Π° 5 ΠΌΠΈΠ½ΡƒΡ‚"

πŸ”¨ Building for Production

⚠️ Note: OS tools are optimized for Windows. On macOS/Linux the chat works, but some tools (commands, processes, system info) may not work correctly or require adaptation.

Windows

flutter build windows --release

The executable will be at build/windows/x64/runner/Release/

macOS

flutter build macos --release

Linux

flutter build linux --release

πŸ”’ Security Notes

  • API keys are stored using platform-secure storage
  • Dangerous operations (delete, kill process) require user confirmation
  • Tool execution can be disabled in settings
  • Individual tool categories can be toggled on/off

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments