AHK Integration
Switch profiles and stop all tools from AutoHotKey scripts without opening the GUI. The Python sidecar (kalam-core.exe) is a standalone CLI that AHK calls via RunWait.
Commands
| Command | Args | What it does |
|---|---|---|
list | appDataDir list | Prints JSON array [{id, name}, ...] to stdout |
current | appDataDir current | Prints {id, name} of active profile or null |
apply-by-name | appDataDir apply-by-name "Profile Name" | Looks up profile by name and applies it |
stop-all | appDataDir stop-all | Stops all managed tools |
appDataDir is %APPDATA%\Kalam.
Example AHK Script (v2)
#SingleInstance
Sidecar := "C:\Program Files\Kalam\kalam-core.exe"
AppData := A_AppData . "\Kalam"
; Win+1 → Gaming profile
#1:: RunWait('"' Sidecar '" "' AppData '" apply-by-name "Gaming"', , "Hide")
; Win+2 → Work profile
#2:: RunWait('"' Sidecar '" "' AppData '" apply-by-name "Work"', , "Hide")
; Ctrl+Win+S → Stop all
^#s:: RunWait('"' Sidecar '" "' AppData '" stop-all', , "Hide")
Sidecar CLI Reference
| Command | Args | Output | Description |
|---|---|---|---|
list | appDataDir list | JSON array [{id, name}] | List all profiles |
current | appDataDir current | {id, name} or null | Show active profile |
apply-by-name | appDataDir apply-by-name "Name" | (none) | Look up profile by name and apply it |
stop-all | appDataDir stop-all | Status text | Stop all managed tools |
<id> | appDataDir <id> | (none) | Apply profile by numeric ID |
Windhawk Smart Restart
When applying profiles with Windhawk-Mods, the sidecar compares the desired mod settings against the current registry state. If nothing changed (re-applying the same profile, or switching between profiles with identical Windhawk configs), the service restart is skipped entirely — no UAC prompt, no service interruption.