Commit Graph

7 Commits

Author SHA1 Message Date
f-trycua
73c0f3e52e Add automatic CUA_API_KEY environment variable support for Computer and CloudProvider
Previously, users had to explicitly read the CUA_API_KEY environment variable
and pass it to the Computer/CloudProvider constructor. This change makes the
API key parameter optional and automatically reads from the CUA_API_KEY
environment variable if not provided.

Changes:
- CloudProvider.__init__: Made api_key parameter optional, reads from CUA_API_KEY env var
- Computer.__init__: Added fallback to CUA_API_KEY env var for api_key parameter
- Updated documentation examples to show simplified usage without explicit api_key
- Updated cloud_api_examples.py to demonstrate the new simpler pattern

This provides a cleaner API while maintaining backward compatibility with
explicit api_key parameter passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 19:35:32 +01:00
James Murdza
ddc5a5de91 Format codebase with uv run pre-commit run --all-files 2025-10-22 11:35:31 -07:00
Dillon DuPont
86a339d1cd add restart_vm to all providers 2025-10-14 11:30:40 -04:00
Dillon DuPont
50d8521e3e added computer.start(), computer.restart() 2025-10-09 13:27:24 -04:00
Dillon DuPont
9595f5affa updated api examples 2025-10-09 13:12:55 -04:00
Dillon DuPont
b29f89597f added shared provider vm type 2025-10-09 12:36:43 -04:00
Dillon DuPont
844f138881 Added VM management example to /examples 2025-10-09 12:08:39 -04:00