How yonko-sid/assistant-in-c- works
Purpose and Entry Points
Jarvis is a native C, command-line desktop assistant for Windows/Linux-style environments. It accepts interactive text commands and routes them to system, web, developer-automation, and AI/NLP capabilities. The executable entry point and primary command loop are in jarvis.c; build entry points are compile_jarvis.sh and compile_jarvis.bat.
Core Command Shell
jarvis.c owns terminal presentation, user input, command parsing/dispatch, help output, logging, and the baseline assistant features (system control, files, time, math, search, weather, and entertainment). It is the boundary between untrusted CLI input and downstream operations, including potentially destructive OS commands.
Paths: jarvis.c, jarvis.conf
Automation Subsystem
Developer-oriented commands are separated into an automation module: Git workflows, project creation/execution, HTTP requests, process/port management, log viewing, snippets, and code-quality actions. jarvis.c delegates these recognized commands through the module interface, keeping the main command shell as the orchestration layer.
Paths: automation.c, automation.h, jarvis.c
AI/NLP Subsystem
AI-facing commands are isolated behind the NLP interface: voice mode, local AI chat, RAG queries, language detection, and intent management. The design intends local/offline model-backed behavior through Vosk and llama.cpp-compatible assets, while intent parsing allows natural-language aliases to map back into command execution.
Paths: ai_nlp.c, ai_nlp.h, jarvis.c
Primary Control and Data Flow
1. The process starts and initializes the interactive CLI in jarvis.c.
2. User text is read, normalized/parsed, logged, and matched to built-in, automation, or AI/NLP command families.
3. Built-in commands execute local logic or invoke platform commands; automation and NLP commands cross module APIs via automation.h and ai_nlp.h.
4. Results/errors return to the CLI for formatted terminal output.
5. Runtime activity is persisted to the log, and optional user customization is represented by the configuration file.
Paths: jarvis.c, automation.h, ai_nlp.h
Runtime, Platform, and External Boundaries
The project compiles as C11 with GCC and standard C libraries. It targets Windows and Linux/Mac command environments, relying on platform utilities/system calls for application launch, power/session actions, filesystem/process operations, Git, and developer tools. Internet-facing operations open browser searches or request remote data (such as weather/HTTP endpoints). AI assets are expected outside the tracked source tree under model/document directories at runtime.
Paths: compile_jarvis.sh, compile_jarvis.bat, jarvis.conf
Extension Model
New top-level capabilities generally require dispatch changes in jarvis.c; developer actions belong in automation.c with declarations in automation.h; conversational or model-oriented behavior belongs in ai_nlp.c with declarations in ai_nlp.h. This three-part split is the repository’s principal architectural boundary.
Paths: jarvis.c, automation.c, ai_nlp.c
Main entry points: jarvis.c Jarvis CLI and dispatcher · automation.c Developer automation · ai_nlp.c AI/NLP services · automation.h Automation API
Components 13
Build
- Unix build script · Compiles the C11 executable with GCC.
compile_jarvis.sh - Windows build script · Compiles the C11 executable with GCC.
compile_jarvis.bat
Command Shell
- Jarvis CLI and dispatcher · Owns the interactive loop, parsing, logging, built-ins, and terminal output.
jarvis.c - User configuration · Optional user customization.
jarvis.conf
Capability Modules
- Automation API · Module interface used by the command shell.
automation.h - Developer automation · Git, projects, HTTP, process, logs, snippets, and quality actions.
automation.c - AI/NLP API · Module interface used by the command shell.
ai_nlp.h - AI/NLP services · Voice, chat, RAG, language detection, and intent management.
ai_nlp.c
Runtime Boundaries
- Interactive user
- OS and developer tools · System commands, filesystem, processes, Git, and developer utilities.
- Web and remote data · Browser searches, weather, and HTTP endpoints.
- Local AI assets · External Vosk, llama.cpp-compatible models, and document directories.
- Runtime log · Persists command activity.
Connections 17
- Unix build script → Jarvis CLI and dispatcher: builds
- Windows build script → Jarvis CLI and dispatcher: builds
- Interactive user → Jarvis CLI and dispatcher: commands
- User configuration → Jarvis CLI and dispatcher: customizes
- Jarvis CLI and dispatcher → Runtime log: records activity
- Jarvis CLI and dispatcher → OS and developer tools: built-ins and OS actions
- Jarvis CLI and dispatcher → Web and remote data: searches and remote data
- Jarvis CLI and dispatcher → Automation API: delegates automation
- Automation API → Developer automation: declares
- Developer automation → OS and developer tools: runs tools and manages processes
- Developer automation → Web and remote data: HTTP requests
- Jarvis CLI and dispatcher → AI/NLP API: delegates AI commands
- AI/NLP API → AI/NLP services: declares
- AI/NLP services → Local AI assets: loads models and documents
- Developer automation → Jarvis CLI and dispatcher: results and errors
- AI/NLP services → Jarvis CLI and dispatcher: results and intents
- Jarvis CLI and dispatcher → Interactive user: formatted output