desktop/README.md
A lightweight macOS desktop application for Onyx Cloud.
Built with Tauri for minimal bundle size (~10MB vs Electron's 150MB+).
| Shortcut | Action |
|---|---|
ā N | New Chat |
ā ā§ N | New Window |
ā R | Reload |
ā [ | Go Back |
ā ] | Go Forward |
ā , | Open Config File |
ā W | Close Window |
ā Q | Quit |
Rust (latest stable)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
Node.js (18+)
# Using homebrew
brew install node
# Or using nvm
nvm install 18
Xcode Command Line Tools
xcode-select --install
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run in debug mode
npm run debug
npm run build
# First, add the targets
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
# Build universal binary
npm run build:dmg
The built .dmg will be in src-tauri/target/release/bundle/dmg/.
Follow Build Windows apps on Linux and macOS.
TIP: if facing Error failed to build app: 'cargo-xwin' command not found., try uv tool install cargo-xwin.
Once the first-time setup is complete,
npm run build:windows
onyx-desktop/
āāā package.json # Node dependencies & scripts
āāā src/
ā āāā index.html # Fallback/loading page
āāā src-tauri/
āāā Cargo.toml # Rust dependencies
āāā tauri.conf.json # Tauri configuration
āāā build.rs # Build script
āāā icons/ # App icons
āāā src/
āāā main.rs # Rust backend code
Before building, add your app icons to src-tauri/icons/:
32x32.png128x128.png[email protected]icon.icns (macOS)icon.ico (Windows, optional)You can generate these from a 1024x1024 source image using:
# Using tauri's icon generator
npm run tauri icon path/to/your-icon.png
The app defaults to https://cloud.onyx.app but supports any Onyx instance.
Config file location:
~/Library/Application Support/app.onyx.desktop/config.json~/.config/app.onyx.desktop/config.json%APPDATA%/app.onyx.desktop/config.jsonTo use a self-hosted instance:
ā , to open the config file, or edit it manuallyserver_url:{
"server_url": "https://your-onyx-instance.company.com",
"window_title": "Onyx"
}
Quick edit via terminal:
# macOS
open -t ~/Library/Application\ Support/app.onyx.desktop/config.json
# Or use any editor
code ~/Library/Application\ Support/app.onyx.desktop/config.json
Edit src-tauri/tauri.conf.json:
{
"app": {
"windows": [
{
"url": "https://your-onyx-instance.com"
}
]
}
}
Edit src-tauri/src/main.rs in the setup_shortcuts function.
Modify the window configuration in src-tauri/tauri.conf.json:
titleBarStyle: "Overlay" (macOS native) or "Visible"decorations: Window chrometransparent: For custom backgroundsMake sure you have an internet connection. The app loads content from cloud.onyx.app.
# Ensure you have the right target
rustup target add aarch64-apple-darwin
For distributing outside the App Store, you'll need to:
codesign --deep --force --sign "Developer ID" target/release/bundle/macos/Onyx.appMIT