A comprehensive suite of PowerShell tools for interacting with the Sleepy API. This project includes an SDK, background client, and control panel for managing your Sleepy presence.
A PowerShell module providing programmatic access to the Sleepy API. Features include:
- Complete API coverage
- Configurable debug modes
- Automatic authentication
- Comprehensive error handling
- Detailed logging options
A background client that automatically updates your status based on active windows:
- Runs in the background with a simple TUI
- Automatically detects active window titles
- Periodic status updates
- Automatic offline status on exit
- Configurable refresh intervals
A user-friendly interface for managing Sleepy settings and status:
- Status management
- Device management
- Configuration settings
- Debug options
- Data persistence controls
- PowerShell 5.1 or higher
- Access to a running Sleepy API server
- Windows operating system (for Client window detection features)
-
Clone this repository:
git clone https://github.com/siiway/sleepy-powershell.git
-
Ensure PowerShell execution policy allows running scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Choose your tool:
Using the SDK:
Import-Module -Name ".\SDK\Sleepy.psm1" Set-SleepyConfig -ApiUrl "http://localhost:8080" -Secret "YourSecretHere"
Running the Client:
.\Client\Sleepy-Client.ps1
Launching the Control Panel:
.\ControlPanel\Sleepy-ControlPanel.ps1
Each component stores its configuration in a JSON file:
- SDK:
SDK\sleepy-config.json
- Client:
Client\sleepy-client-config.json
- Control Panel:
ControlPanel\sleepy-config.json
Default configuration:
{
"ApiUrl": "http://localhost:9010",
"Secret": "YourSecretHere",
"DebugMode": false,
"FullDebugMode": false,
"RefreshInterval": 5
}
All components support two debug levels:
- Basic Debug Mode: Shows basic request/response information
- Full Debug Mode: Shows complete request/response details
Enable debug modes via command line:
# For Client
.\Client\Sleepy-Client.ps1 -DebugMode
# For Control Panel
.\ControlPanel\Sleepy-ControlPanel.ps1 -FullDebugMode
Each component has its own detailed README:
Note
Different language versions of the README file aren't included in the project structure.
sleepy-powershell/
├── SDK/
│ ├── Sleepy.psm1 # Main SDK module
│ ├── Sleepy.psd1 # Module manifest
│ ├── Example-Usage.ps1 # Usage examples
│ └── README.md # SDK documentation
├── Client/
│ ├── Sleepy-Client.ps1 # Background client
│ └── README.md # Client documentation
├── ControlPanel/
│ ├── Sleepy-ControlPanel.ps1 # Control panel interface
│ └── README.md # Control panel documentation
└── README.md # This file
-
Automated Status Updates: Use the Client for automatic status updates based on your active windows.
-
Manual Status Management: Use the Control Panel for manual status and device management.
-
Custom Integration: Use the SDK to build custom solutions or integrate with other tools.
Contributions are welcome! Please feel free to submit pull requests or create issues for bugs and feature requests.
This project is licensed under the GNU GPL v3 License - see each component's documentation for details.
- NT_AUTHORITY
- SiiWay Team
For support, please create an issue in the GitHub repository or contact the development team.