Astra logo # ASTRA AI ### Voice-First Windows Assistant **Adaptive System for Tactical Reasoning & Automation** A Windows desktop assistant that can talk with you, understand your PC, and carry out local tasks. An open-source portfolio project by [Chinmay Bitne](https://github.com/ChinmayBitne), built for practical Windows automation and community contributions. [![Windows 10/11](https://img.shields.io/badge/Windows-10%20%7C%2011-0078D4?logo=windows&logoColor=white)](#requirements) [![Desktop beta](https://img.shields.io/badge/status-desktop%20beta-8B5CF6)](#project-status) [![Electron](https://img.shields.io/badge/desktop-Electron-47848F?logo=electron&logoColor=white)](https://www.electronjs.org/) [![Gemini Live](https://img.shields.io/badge/voice-Gemini%20Live-4285F4?logo=google&logoColor=white)](https://ai.google.dev/gemini-api/docs/live) [![Node.js 20+](https://img.shields.io/badge/Node.js-20%2B-339933?logo=node.js&logoColor=white)](#requirements) [![MIT license](https://img.shields.io/badge/license-MIT-F5C518)](LICENSE) Astra Windows desktop interface with system telemetry, voice controls, and status panels Fresh desktop capture using isolated demo data. No personal settings or credentials are shown.
## What Astra is Astra is an installable Windows application, not a hosted website. Electron owns the window, tray, startup behavior, microphone permissions, and packaged runtime. A local Express service handles system tools and integrations, while the React interface runs the Gemini Live voice session. The result is one desktop assistant with a focused boundary: local control stays on your computer, and cloud services are contacted only for the features that need them. > [!CAUTION] > Astra can launch programs, run commands, manage files, and interact with Windows. Review its tool permissions and test it with non-sensitive data before relying on it for important work. ## Highlights | Area | What is included | |---|---| | Voice | Real-time Gemini Live conversation, microphone mute, interruption handling, reconnect recovery, and typed commands | | Windows control | App and game launching, file operations, screenshots, volume, timers, reminders, notes, focus mode, and window tools | | System awareness | CPU, memory, temperature, GPU, network, uptime, local media, installed applications, and proactive alerts | | Local search | Automatic indexing plus an optional Python TF-IDF service for typo-tolerant searches across apps, games, media, and notes | | Google Workspace | Optional Gmail, Calendar, Drive, Docs, Sheets, Slides, and Forms tools through your own OAuth client | | Vertex AI | Optional grounded search, deep research, screen analysis, and slide generation through your Google Cloud project | | Desktop runtime | NSIS installer, system tray, single-instance handling, start with Windows, window-state persistence, and clean backend shutdown | | Security boundary | Loopback-only backend, isolated Electron renderer, scoped microphone permission, blocked external navigation, and per-launch packaged API authentication | ## Desktop interface
Astra desktop settings panel
Local settings and optional integrations
Astra setup guide showing required and optional services
Setup guide included with the application
## Requirements ### To run from source - Windows 10 or Windows 11, 64-bit - Node.js 20 or newer - npm - A microphone for voice input - A Gemini API key from [Google AI Studio](https://aistudio.google.com/apikey) Python 3.10 or newer is optional. It is needed only for the Astra Intel semantic-search service. ### To run a packaged build The packaged desktop application contains its own Electron and Node runtime. An end user does not need to install Node.js. Python remains optional for semantic search. ## Run Astra from source ```powershell git clone https://github.com/ChinmayBitne/ASTRA-AI.git cd ASTRA-AI npm ci npm run dev ``` `npm run dev` starts the Express backend, Vite renderer, and Electron desktop window. Use `npm run dev:web` only when working on the renderer in a browser. On first launch: 1. Enter the name Astra should use for you. 2. Add your Gemini API key. 3. Allow microphone access for desktop applications in Windows. 4. Add Google Cloud, Google Workspace, media folders, or Pexels only if you want those optional features. 5. Select **Start** and speak or type a command. The full walkthrough is available at [public/setup.html](public/setup.html) and from the **Setup Guide** button inside Settings. ## Build the Windows application Run the complete validation and create an NSIS installer: ```powershell npm run dist ``` Generated files are placed under `release/`: - `win-unpacked/` contains the unpacked desktop application for smoke testing. - `Astra-Setup-x.y.z-x64.exe` is the Windows installer. Build output is ignored by Git. Development installers are unsigned and can trigger Microsoft SmartScreen. Do not distribute an installer as a trusted public release until it is code-signed and has passed the installation checklist in [docs/RELEASING.md](docs/RELEASING.md). ## Configuration Settings entered in the application are saved outside the repository at `~/.astra/settings.json`. UI values take precedence over optional `.env` fallbacks. | Setting | Required | Used for | |---|:---:|---| | Gemini API key | Yes | Voice, code generation, translation, and Gemini vision | | User name | No | How Astra addresses you | | Google Cloud project and location | No | Vertex AI search, research, screen vision, and slides | | Google OAuth client ID and secret | No | Gmail, Calendar, Drive, Docs, Sheets, Slides, and Forms | | Media and game folders | No | Additional locations beyond normal Windows libraries and detected game libraries | | Torrent watch folder | No | Detecting newly completed local downloads | | Weather location | No | Local weather when automatic lookup is unavailable or unwanted | | Pexels API key | No | Stock imagery for generated presentations | Copy [.env.example](.env.example) to `.env` only for advanced or headless development. Never commit the resulting file. ## Example requests ```text Open Visual Studio Code What is using the most memory? Launch Cyberpunk 2077 Find the movie I downloaded yesterday Set a reminder for 4:30 PM Save a note to renew my passport Show my latest unread email Create a presentation about renewable energy Read the active window Speak in Hindi ``` Available actions depend on your installed programs, configured folders, credentials, Windows permissions, and optional services. ## How it works ```text ┌──────────────────────────────────────────────────────────────┐ │ Electron desktop process │ │ Window · tray · startup · permissions · packaged supervision │ └───────────────────────────┬──────────────────────────────────┘ │ narrow preload bridge ┌───────────────────────────▼──────────────────────────────────┐ │ React renderer │ │ Desktop UI · Gemini Live · microphone · audio playback │ └───────────────────────────┬──────────────────────────────────┘ │ authenticated loopback HTTP ┌───────────────────────────▼──────────────────────────────────┐ │ Express control plane │ │ Tools · settings · schedules · indexing · integrations │ └───────────────────────────┬──────────────────────────────────┘ │ starts on demand ┌───────────────────────────▼──────────────────────────────────┐ │ Astra Intel (optional Python service) │ │ Character trigrams · TF-IDF · cosine similarity │ └──────────────────────────────────────────────────────────────┘ ``` Development uses Vite on `127.0.0.1:3000` and Express on `127.0.0.1:3001`. A packaged build starts the bundled backend with Electron's Node runtime and serves the renderer and API from one loopback origin. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for runtime responsibilities and trust boundaries. ### Native Windows volume control The `set_volume` tool does not depend on `nircmd.exe`. Astra starts `server/ps/volume.ps1` with an argument array, and that script calls the Windows Core Audio endpoint API through `IAudioEndpointVolume`. The native path supports four operations: - Read the current master volume and mute state. - Set the master volume from 0 to 100. - Mute the default playback device. - Unmute the default playback device. `nircmd.exe` was used by the original implementation only for set, mute, and unmute. It has been removed from the source and packaged resources. ## Repository layout ```text electron/ Electron main process, preload bridge, tray, permissions server/ Local Express control plane and Windows tool services server/agents/ Local intent and memory classifiers server/ps/ PowerShell helpers for Windows integration python/astra_intel/ Optional semantic-search service src/ React desktop renderer src/components/ HUD, transcript rail, settings, orb, and terminal src/lib/ Gemini tools, audio, lifecycle, settings, and memory tests/ Node and TypeScript behavior tests python/tests/ Python search tests public/ Icons and the bundled setup guide assets/ README screenshots scripts/ Build and development utilities docs/ Architecture, development, privacy, and release guides .github/ CI, issue forms, and pull request template ``` ## Development commands | Command | Purpose | |---|---| | `npm run dev` | Start backend, renderer, and Electron in development mode | | `npm run dev:web` | Start backend and browser renderer without Electron | | `npm run lint` | Run the TypeScript type check | | `npm test` | Run the Node and TypeScript test suite | | `npm run test:python` | Run the optional Python search tests | | `npm run build` | Build the production renderer | | `npm run build:server` | Bundle the production backend | | `npm run check` | Run type checking, Node tests, and both production builds | | `npm run dist:dir` | Build the unpacked Windows desktop application | | `npm run dist` | Build the versioned NSIS installer | The validation matrix and desktop smoke-test steps are in [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md). ## Privacy and security - The local server binds to `127.0.0.1` by default. - Packaged builds generate a random API token for each launch. Electron adds it to local API requests without exposing it to renderer JavaScript. - Renderer Node integration is disabled. Context isolation, sandboxing, navigation restrictions, and audio-only permission checks are enabled. - Credentials and personal indexes live outside the repository. - External services receive data only when the associated feature is invoked. Credentials in `~/.astra/settings.json` are not currently encrypted by Astra. Windows account and filesystem permissions are the storage boundary. Read [docs/PRIVACY.md](docs/PRIVACY.md) and [SECURITY.md](SECURITY.md) before using sensitive accounts or files. ## Project status Astra is a Windows x64 desktop beta. The source, test suite, packaged runtime, and installer workflow are present, but the following work remains before treating it as a production desktop release: - Code-sign the executable and NSIS installer. - Complete fresh-install, upgrade, and uninstall testing on a clean Windows machine. - Complete extended physical microphone, speaker, sleep/wake, and reconnect testing. - Move stored credentials to Windows-protected storage. - Add a signed update channel after a release host is selected. Static tests cannot prove real microphone timing or long-running Gemini Live behavior. Please include the Windows version, audio device, Astra commit, and sanitized logs when reporting a voice issue. ## Troubleshooting | Problem | Check | |---|---| | Astra cannot hear you | Windows Settings → Privacy & security → Microphone → allow desktop apps | | Gemini setup fails | Confirm the API key in Settings and restart the neural link after changing credentials | | Google tools are unavailable | Follow the OAuth and API steps in [public/setup.html](public/setup.html) | | Voice becomes delayed | Check system load, audio-device changes, and whether another app has exclusive audio access | | Semantic search is unavailable | Install `python/requirements.txt` with Python 3.10 or newer | | A packaged build shows SmartScreen | Development builds are unsigned; public installers must be code-signed | ## Contributing Focused bug fixes, tests, documentation improvements, and Windows compatibility reports are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before opening a pull request. Report security problems privately using [SECURITY.md](SECURITY.md), not through a public issue. ## License Astra is available under the [MIT License](LICENSE).