I Built Two AI Desktop Tools with Python — No API Keys, No Cloud Costs A developer built two AI desktop tools, Rasco and Gosi, using Python and Tkinter that run entirely locally without API keys. Rasco is a JARVIS-style assistant that executes system commands via natural language, while Gosi understands a codebase by finding relevant files before querying Claude. Both tools pipe prompts through Claude Code CLI instead of directly calling the Anthropic API, leveraging an existing subscription for cost-free operation. I got tired of switching between my code editor, terminal, browser, and an AI chat window. So I built two desktop tools that bring the AI directly into my workflow — one that controls my entire PC, and one that understands my codebase. Here's how they work, and the unusual technical choice that made them possible. Rasco — A JARVIS-style desktop assistant. You type or speak a command, it executes it: opens apps, navigates websites, manages files, takes screenshots, reads system stats. Black & gold UI, always running in the corner. Gosi — A coding assistant that actually reads your project. Point it at a folder, ask a question about a bug or an architecture decision, and it finds the relevant files, builds context, and answers based on your actual code — not generic patterns. Both are built with Python + Tkinter and run fully on your local machine. Here's the part most people find surprising: neither tool calls the Anthropic API directly . Instead, they pipe prompts through Claude Code CLI: python def run claude prompt, timeout=120 : Write prompt to temp file handles large prompts reliably on Windows with tempfile.NamedTemporaryFile mode="w", suffix=".txt", delete=False, encoding="utf-8" as tmp: tmp.write prompt tmp path = tmp.name cmd = f'type "{tmp path}" | "{CLAUDE CMD PATH}" -p --model sonnet' result = subprocess.run cmd, capture output=True, text=True, encoding="utf-8", timeout=timeout, shell=True return result.stdout.strip Why pipe through a temp file instead of stdin ? On Windows, very long prompts passed directly to subprocess through input= can fail silently. Writing to a temp file and piping with type is much more reliable. The tradeoff: You need a Claude Code subscription Pro or Max , not a pay-per-token API key. For me — a developer who uses Claude Code all day anyway — this means the tools cost me nothing extra. The core of Rasco is a dispatcher that maps natural language to system actions: COMMANDS = { "open chrome": lambda: subprocess.Popen "chrome" , "screenshot": lambda: pyautogui.screenshot .save "screen.png" , "system info": lambda: get system stats , "open youtube": lambda: browser navigate "https://youtube.com" , ... 40+ more commands } For anything not in the predefined map, it falls through to Claude with full conversation history: python def handle message user input, history : Try local commands first instant, no AI needed for keyword, action in COMMANDS.items : if keyword in user input.lower : return action Fall through to Claude with context response = ask claude user input, history speak response pyttsx3 TTS return response Browser automation uses Selenium under the hood — so "search YouTube for lofi beats" actually opens Chrome, navigates to YouTube, and types into the search box. python def browser navigate url : opts = Options opts.add experimental option "excludeSwitches", "enable-automation" driver = webdriver.Chrome service=Service ChromeDriverManager .install , options=opts driver.get url return driver The smarter challenge with Gosi was context selection . You can't dump an entire Flask project into a prompt — you hit token limits and the signal-to-noise ratio tanks. The solution: a simple relevance scorer that finds the right files before asking Claude anything. python def find relevant files self, query, max files=8 : query lower = query.lower words = w for w in query lower.split if len w 2 scored = for rel in self.files: score = 0 base = os.path.basename rel.lower Direct filename mention in query = strong signal if base in query lower: score += 10 Keyword overlap for w in words: if w in rel.lower : score += 3 Prioritize logs when user mentions errors if any k in query lower for k in "error", "exception", "log", "crash" : if rel.endswith ".log", ".txt" : score += 5 if score 0: scored.append score, rel scored.sort key=lambda x: -x 0 return rel for , rel in scored :max files The scanner walks the project directory, skips noise pycache , venv , migrations , etc. , and truncates large files at 6,000 chars to stay within context limits. The system prompt is bilingual — it detects whether the user wrote in Persian or English and responds in the same language: SYSTEM PROMPT = """You are CodePilot, an expert AI coding assistant specialized in Python, Flask, and Odoo projects. The user speaks Persian or English — always reply in the same language they used. You will be given relevant source files and/or log excerpts as CONTEXT, followed by their QUESTION. Use the context to explain bugs, suggest fixes, and help debug errors from logs.""" The file editing feature adds a diff review step before writing anything. Gosi asks Claude for the full new file content, diffs it against the original, shows the diff in the UI, and only writes to disk after the user confirms. It also makes a .bak backup automatically. 1. Clone git clone https://github.com/AlirezaRg/Rasco-Gosi cd Rasco-Gosi 2. Install Python dependencies pip install pyttsx3 pyautogui psutil selenium webdriver-manager speechrecognition 3. Install and login to Claude Code CLI npm install -g @anthropic-ai/claude-code claude login here 4. Run python rasco.py for the PC assistant python Gosi.py for the coding assistant If you don't have a Claude subscription, there's also an Ollama backend: ollama pull llama3.2 ollama serve python codepilot ollama.py Subprocess beats raw API for local tools. When you already pay for a Claude Code subscription, routing through the CLI gives you the same model with zero extra cost and zero key management. Context selection matters more than context size. A prompt with 4 perfectly-chosen files beats a prompt with 20 files dumped in. The relevance scorer, even this simple version, made a real quality difference. Tkinter is underrated. Everyone says "use Electron" or "use a web UI." But Tkinter starts in milliseconds, ships as a single Python file, and stays out of the way. For personal productivity tools, that's exactly what you want. Built this while studying Computer Engineering and integrating biometric hardware with Odoo 18 at work. Writing tools that solve my own problems is the best way I've found to actually ship something. If you build something on top of this or have questions about the Selenium integration / Ollama backend, drop a comment.