Skip to content

tomasgpastore/godo-macos-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

godo

godo is a guarded macOS CLI for natural-language automation over SSH. It shows a simplified command preview and only runs after explicit approval.

Requirements

  • macOS (tested for SSH use on Mac mini)
  • Python 3.11+
  • Ollama running locally on http://localhost:11434
  • A local model pulled in Ollama (default in code: ministral-3:8b)

Install

cd /Users/server/Documents/projects/godo_macmini
chmod +x godo.py
ln -sf "$(pwd)/godo.py" /usr/local/bin/godo

If /usr/local/bin is not writable, use another PATH directory.

Usage

godo "natural language request"
godo --dry-run "natural language request"
godo --json "natural language request"

Output flow:

  1. Restated intent
  2. Risk level (LOW, MEDIUM, HIGH)
  3. Simplified script command (Script: ...)
  4. Approval prompt (Run this now? (y/N))

Only y or yes executes.

Examples

godo "pause spotify"
godo "set spotify volume to 30"
godo "what is using ram"
godo "open obsidian"
godo "git status in this folder"
godo "list all files in /Users/server/Documents"
godo "say deployment completed"
godo "read out loud \"meeting starts in 5 minutes\""

v1.2 Command Coverage

  • Built-in categories: spotify, app, sysinfo, files, speech
  • Speech supports say/read/speak/speck <text> and compiles to macOS say
  • Generic category: shell (run_shell) for broad command support with structured args
  • Shell plans compile from JSON fields (executable, arguments, optional working_directory)
  • Dangerous/unsupported requests still become non-executing manual plans

Safety Model

  • The model returns JSON only and is schema-validated.
  • godo compiles deterministic scripts from templates.
  • sudo operations are never executed by godo.
  • Banned tokens cause hard refusal (sudo, rm, chmod, chown, diskutil, shutdown, reboot, launchctl system, curl, wget, python -c, node -e).
  • osascript plans containing do shell script are refused.
  • Approved plans are logged to /Users/server/.godo/logs.

Config (in godo.py)

The CONFIG dictionary controls:

  • allowed_roots: default file-listing roots
  • ollama_base_url: local Ollama endpoint
  • ollama_model: model name
  • banned_tokens: hard safety deny-list
  • log_dir: audit log location

To add additional file roots, edit CONFIG["allowed_roots"] directly.

Notes

  • AppleScript actions target a live GUI session; godo prefers the current launchctl gui/$UID session and otherwise falls back to launchctl asuser for the console user.
  • For requests with requires_gui_session, godo refuses execution if no active desktop user is logged in and shows manual recovery steps.
  • If Ollama is unreachable or returns invalid JSON twice, godo exits with an error.
  • For local non-Ollama testing, you can inject a plan with GODO_PLAN_JSON.

About

godo is a guarded macOS CLI for natural-language automation over SSH. It shows a simplified command preview and only runs after explicit approval.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages