Capabilities Reference
Declare capabilities in veloxkit.config.ts under capabilities: [].
| Capability | APIs unlocked | Notes |
|---|---|---|
fs | velox.fs β read, write, watch, stat files and directories | β |
db | velox.db β SQLite queries, migrations, vector search | β |
network | velox.network β fetch, WebSocket, mDNS | β |
ai | velox.ai β embed, generate, transcribe (on-device) | Requires model download on first use |
audio | velox.audio β playback and recording | β |
video | velox.video β video file playback | β |
camera | velox.camera β camera device enumeration and capture | β |
microphone | velox.audio recording β microphone input | β |
dialog | velox.dialog β open/save file dialogs, message boxes | β |
clipboard | velox.clipboard β read and write text (readText, writeText) | Image clipboard not yet supported |
notification | velox.notification β OS notifications | macOS requires app bundle |
credentials | velox.credentials β OS keychain (Keychain, Credential Manager, libsecret) | β |
deeplink | velox.deeplink β URL scheme registration and handling | Requires identifier field |
updater | velox.updater β in-app update checks and installation | β |
crash | velox.crash β crash report capture and retrieval | β |
perf | velox.perf β frame timing, memory stats, CPU usage | Dev / diagnostics |
system | velox.system β display info, OS info | β |
battery | velox.system.battery β battery level and charging state | β |
storage | velox.system.storage β disk usage and app data directory | β |
gamepads | velox.system.gamepads β gamepad / controller input | β |
globalShortcuts | velox.globalShortcuts β OS-level keyboard shortcut registration | β |
power | Power sleep/wake events | β |
shell | Spawn shell commands | Use with care β broad OS access |
usb | USB device enumeration | β |
mdns | mDNS service discovery and advertisement | β |
hid | HID device access (joysticks, custom peripherals) | β |
Requesting only what you need
Each capability you declare is a commitment that your app uses that API. Declare only what you genuinely need:
- Fewer capabilities = smaller attack surface
- Capability list is visible to users who inspect the binary
- Future versions may require user consent for sensitive capabilities
Checking capabilities at runtime
import { velox } from 'veloxkit'
if (velox.hasCapability('camera')) {
// camera features available
}Capability scoping (planned for v0.4)
More granular scoping is tracked in GitHub #142 (opens in a new tab):
// Planned β not yet available
capabilities: [
{ name: 'fs', paths: ['~/Documents/my-app/**'] },
{ name: 'network', origins: ['https://api.myservice.com'] },
]