🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
🪟 Windows TippsProfi-Edelstahlpfanne von WMF jetzt zum halben Preis erhältlich(15.09.2026 um 08:05 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
🪟 Windows TippsProfi-Edelstahlpfanne von WMF jetzt zum halben Preis erhältlich(15.09.2026 um 08:05 Uhr)

🔧 Programmierung 🕛 vor 2 Monaten 6 Min Lesezeit
0

I Built Two AI Desktop Tools with Python — No API Keys, No Cloud Costs

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

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.







The Two Tools



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.







The Architecture: Claude Code CLI as a Subprocess



Here's the part most people find surprising: neither tool calls the Anthropic API directly.



Instead, they pipe prompts through Claude Code CLI:




CODE
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.









Rasco: Giving AI Hands on Your PC



The core of Rasco is a dispatcher that maps natural language to system actions:




CODE
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:




CODE
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.




CODE
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












Gosi: An AI That Actually Reads Your Code



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.




CODE
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:




CODE
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.









Setup






CODE
# 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:




CODE
ollama pull llama3.2
ollama serve
python codepilot_ollama.py












What I Learned



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.









Links








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.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
The Gemini desktop app is now available for Windows
1 Quelle
Burn Out, Or Fade Away
1 Quelle
Windows 11 KB5129195 is out after Microsoft confirms major issues with the September 2026 update, but it won’t fix AMD GPU errors
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten I Built Two AI Desktop Tools with Python — No API Keys, No Cloud Costs

Thematisch verwandte Begriffe: Built, Desktop, Tools, with · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...