kbd://DevDeck

Documentation

Everything you need to set up and use DevDeck

Getting Started

Option A: Homebrew (CLI)

brew tap devdeck-app/homebrew-devdeck-server
brew install --cask devdeck-server

Start manually:

devdeck-server

Or as a background service:

brew services start devdeck-server

Server starts on port 4242 by default.

Option B: Mac App (includes server)

Install via Homebrew:

brew tap devdeck-app/homebrew-devdeck-server
brew install --cask devdeck

Or download the DMG directly from GitHub Releases. The Mac app bundles the server — no brew services needed; just launch the app. Adds a menu bar icon, QR code pairing, and server controls.

Connecting the App

  1. Install DevDeck from the App Store on your iPhone/iPad
  2. Start the server using either the CLI or the Mac app
  3. Ensure your phone and Mac are on the same Wi-Fi network
  4. The app auto-discovers the server via mDNS — or scan the QR code if using the Mac app
Note:Pick Option A or B — not both. The CLI server is headless; your phone discovers it automatically via mDNS. The Mac app adds GUI conveniences but is not required.

Configuration

DevDeck uses TOML configuration at ~/.config/devdeck/devdeck.toml.

Server

[server]
port = 4242

Layout

[layout]
columns           = 4
landscape_columns = 6
background_color  = "#000000"
button_size       = 60

Logging

[log]
level        = "info"  # debug, info, warn, error, fatal
file_enabled = true    # Write logs to ~/.config/devdeck/logs/

History

Command execution history is stored in ~/.config/devdeck/devdeck.db. By default, only metadata (success, exit code, duration) is stored — command output is omitted for security.

[history]
store_output = true  # Enable storing command output (use with caution)

Commands

Commands are the core building blocks of your deck.

Command Fields

FieldTypeDescription
uuidstringOptional; auto-generated if not provided
descriptionstringButton label
appstringApplication name (for open action)
actionstringShell command to execute
iconstringSF Symbol name (e.g., terminal.fill, gear)
icon_colorstringHex color for SF Symbol tinting
typestringaction or context
contextstringmain or custom context name
mainboolShow on main screen

Opening an Application

[[commands]]
app    = "Obsidian"
icon   = "doc.text"
action = "open"
type   = "action"
main   = true

Running a Shell Command

[[commands]]
description = "Git Status"
action      = "git status"
icon        = "terminal.fill"
type        = "action"
main        = true

Creating a Context with Sub-commands

[[commands]]
app     = "System Preferences"
type    = "context"
icon    = "gearshape.fill"
context = "system"
main    = true

[[commands]]
description = "Volume Down"
action      = "aerospace volume down"
type        = "action"
context     = "system"

[[commands]]
description = "Volume Up"
action      = "aerospace volume up"
type        = "action"
context     = "system"

Custom Icons

Use your own PNG/JPEG images alongside SF Symbols.

Usage

[[commands]]
description = "Company Deploy"
icon        = "custom:deploy-logo"
icon_color  = "#FF5733"
type        = "action"
context     = "main"
main        = true

Icon Directory

Place image files in ~/.config/devdeck/icons/:

~/.config/devdeck/icons/
├── deploy-logo.png
├── company-seal.jpg
└── staging-env.png

Rules

Context-Aware Deck Switching

Automatically switch decks based on the frontmost macOS application.

Configuration

[settings]
auto_context_enabled = true
auto_context_poll_ms = 500

[contexts.default]
name     = "Default"
deck     = "main"
priority = 0

[contexts.slack]
name     = "Slack"
deck     = "slack"
priority = 50
[contexts.slack.match]
frontmost_bundle_ids = ["com.tinyspeck.slackmacgap"]
frontmost_app_names  = ["Slack"]

How It Works

Browser-Aware Context Example

[contexts.github]
name     = "GitHub"
deck     = "github"
priority = 60
[contexts.github.match]
frontmost_bundle_ids = ["com.google.Chrome"]
browser_url_patterns = ["*://github.com/*"]

Workflows

Multi-step automations with user input and templating.

Basic Workflow

[workflows.search-docs]
name        = "Search Docs"
description = "Search documentation sites"
icon        = "magnifyingglass"
inputs      = ["query"]

[[workflows.search-docs.steps]]
type = "open_url"
url  = "https://docs.example.com/search?q={{query}}"

[[workflows.search-docs.steps]]
type              = "run_command"
command           = "echo 'Opened docs for {{query}}'"
timeout           = 10
continue_on_error = true

Step Types

TypeDescription
open_urlOpens URL in browser. Routes through extension when connected.
run_commandExecutes shell command (default 30s timeout)
delayPauses execution (seconds)
click_elementClicks DOM element by CSS selector (requires extension)
fill_inputFills single input by CSS selector (requires extension)
fill_formFills form fields by semantic name (requires extension)

Template variables use {{inputName}} syntax.

Form Filling (fill_form)

Fills web forms using semantic field names — no CSS selectors needed.

# Single-field: auto-submits by default
[workflows.ask-gemini]
name   = "Ask Gemini"
icon   = "sparkles"
inputs = ["query"]

[[workflows.ask-gemini.steps]]
type = "open_url"
url  = "https://gemini.google.com/"

[[workflows.ask-gemini.steps]]
type = "fill_form"
[workflows.ask-gemini.steps.fields]
prompt = "{{query}}"

auto_submit behavior:

AI Generation

Generate commands, contexts, and workflows from natural language using the Web UI, TUI, or mobile app.

Provider Configuration

[ai]
provider   = "anthropic"  # "anthropic" (default), "openai", or "ollama"
model      = ""           # Optional; uses provider default if omitted
form_model = ""           # Optional; cheaper model for form field analysis
host       = ""           # Ollama only (default: http://localhost:11434)

# Method preferences (optional, defaults to "auto")
preferred_url_method    = "auto"  # auto | extension | open | chrome-cli
preferred_action_method = "auto"  # auto | shortcut | applescript | cli

Provider Defaults

Auto-Injected Button

When [ai]is configured, an “AI Command” workflow button automatically appears on your main deck. Tap it to generate commands, contexts, or workflows from natural language prompts.

Customize the button by defining a workflow with the key generate_command:

[workflows.generate_command]
name   = "My AI"
icon   = "sparkles"
inputs = ["prompt"]

Debug AI Generation

DEVDECK_AI_LOG=true devdeck-server

What AI Can Generate

  1. Commands— single actions (app launches, shell commands) with appropriate icons
  2. Contexts— auto-switching rules with bundle IDs, priorities, and a set of commands
  3. Workflows— multi-step automations with inputs and templating

Environment-Aware Generation

AI generation automatically enriches prompts with real data from your Mac:

Method Preferences

Control how generated commands interact with your system:

SettingOptionsDescription
preferred_url_methodauto, extension, open, chrome-cliHow to open URLs. Auto picks the best available method.
preferred_action_methodauto, shortcut, applescript, cliHow to trigger app actions. Auto prefers keyboard shortcuts.

Web UI

Access the built-in web interface at http://localhost:4242/app.

Two Tabs

TabDescription
GenerateType a natural language prompt → preview the AI-generated result → edit fields → save to your deck
SettingsConfigure logging, AI provider, layout, proxy, context detection, history, and server options

Deck Simulator

The Generate tab includes a live grid preview of your deck layout that shows ghost buttons for unsaved commands before you commit them.

Localhost-only, no authentication required.

Terminal UI

The terminal UI has five tabs: Dashboard, Logs, History, Settings, and Generate.

Global Shortcuts

KeyAction
15Jump to tab
Tab / Shift+TabCycle tabs
?Toggle help overlay
oOpen web UI in browser
q / Ctrl+CQuit

Logs Tab

KeyAction
aToggle auto-scroll
d / i / w / eFilter by DEBUG / INFO / WARN / ERROR
cClear filter (show all)
xClear all logs
/ j kScroll

History Tab

KeyAction
/ j kMove selection
rRefresh history

Generate Tab

Flow: type prompt → preview result → edit fields → save to config

KeyAction
Enter / /Focus input
Enter (focused)Submit prompt
sSave generated command/context/workflow
eToggle edit mode
rRegenerate with same prompt
EscCancel / discard preview / unfocus input
Tab / Shift+TabCycle editable fields (in edit mode)

Browser Extension

The Chrome extension enables web app detection for context-aware switching and browser automation.

Installation

Install from the Chrome Web Store.

What It Does

Browser-Aware Context Example

[contexts.github]
name     = "GitHub"
deck     = "github"
priority = 60
[contexts.github.match]
frontmost_bundle_ids = ["com.google.Chrome"]
browser_url_patterns = ["*://github.com/*"]

Proxy & Remote Access

Enable automatic ngrok tunnel detection for remote access:

[proxy]
enable = true

When enabled, the server checks for a running ngrok tunnel and starts one if not found. The QR code and connection URL will use the ngrok public URL automatically.

Alternatively, set a manual external URL:

[settings]
manual_url = "example.ngrok-free.dev"

Troubleshooting

Server Not Found

Connection Drops

Camera/QR Not Working

Keystroke Commands Not Working

If you get “osascript is not allowed to send keystrokes” even though Accessibility permission appears enabled:

Config Changes Not Applying