Warning
This is a vibe coded MVP. I plan to manually enhance it in the future.
A lightweight macOS automation hub built with Bun — exposes macOS system actions over a local authenticated REST API via a flexible shortcut system.
- Shortcut system — Create and execute custom actions (media, brightness, apps, system) via unique IDs
- Persistent storage — Shortcuts are stored in a local SQLite database at
~/.dashwise/shortcuts.sqlite - Media controls — Play, pause, stop, next track, previous track (via AppleScript)
- Display brightness — Adjust levels via system key codes or
brightnessCLI - Do Not Disturb — Toggle macOS focus mode
- App launcher — Launch any installed
.appbundle by name or path - Local REST API — High-performance Hono-based server on
localhost:47821 - Bearer token auth — Token generated on first install, stored at
~/.dashwise/config.json
- macOS 14+ or Windows 10+
- Bun installed
- (Optional)
brightnessfor absolute brightness control (macOS):brew install brightness
You can provide the authentication token and port via environment variables:
DASHWISE_TOKEN="your-secure-token" DASHWISE_PORT=47821 bun startIf not provided, Dashwise will use the values from ~/.dashwise/config.json.
# Install dependencies (generates your bearer token on first run)
bun install
# Start the API server
bun start
# Development mode (auto-reload)
bun run devOn bun install, a script generates a unique bearer token and saves it to:
~/.dashwise/config.json
The token is printed to the terminal on creation.
The app exposes a local HTTP API on port 47821.
All /api/* endpoints require:
Authorization: Bearer <your-token>
| Method | Path | Description |
|---|---|---|
GET |
/health |
Health check (no auth required) |
GET |
/openapi.json |
Full OpenAPI specification |
GET |
/api/shortcuts |
List all available shortcuts and their IDs |
POST |
/api/shortcuts/run?id=<id> |
Execute a shortcut by its unique ID |
TOKEN="your-token-here"
BASE="http://localhost:47821"
# Get all shortcuts
curl $BASE/api/shortcuts \
-H "Authorization: Bearer $TOKEN"
# Execute a shortcut (e.g., Play/Pause)
# Find the ID from the /api/shortcuts response
curl -X POST "$BASE/api/shortcuts/run?id=ID_HERE" \
-H "Authorization: Bearer $TOKEN"dashwise-shortcuts/
├── src/
│ ├── bun/
│ │ ├── index.ts # Entry point — starts the server
│ │ ├── actions.ts # System action logic (AppleScript, CLI)
│ │ ├── server.ts # Hono API server & SQLite integration
│ │ └── config.ts # Token & port management
│ └── shared/
│ └── types.ts # Shared type definitions
├── scripts/
│ └── generate-token.js # postinstall — generates bearer token
├── openapi.json # API documentation
├── package.json
└── tsconfig.json
Some actions require macOS permissions:
- Media keys — requires Accessibility access (
System Preferences > Privacy & Security > Accessibility) - Do Not Disturb — requires running
defaults writecommands (may need to kill NotificationCenter) - App launching — works without extra permissions via
open
On first use, macOS will prompt for the required permissions.