Language guide
Build repeatable terminal workflows
Compose cURL and your existing shell tools instead of depending on an unpublished Supervisor command line package.
Language guide
01
Use the HTTP contract
Supervisor does not require a dedicated command line client. Use cURL for requests and pipe JSON into the parser already approved by your team.
Keep workspace ids and nonsecret defaults in a local configuration file. Keep the API key in the environment or a secret manager.
import jsonimport osimport urllib.requesturl = "https://api.trysupervisor.com/workspaces/user/me"request = urllib.request.Request(url, method="GET")request.add_header("Authorization", f"Bearer {os.environ['SUPERVISOR_API_KEY']}")request.add_header("Content-Type", "application/json")with urllib.request.urlopen(request) as response:result = json.load(response)print(json.dumps(result, indent=2))
02
Automate carefully
Use a read key for reporting scripts. Use read and write access only when the script must change workspace state, and restrict that key to one workspace when possible.