Skip to content

CLI mode: read-only JSON device list (R1) #11

Description

@janthoXO

Future work, DESIGN.md sections 7.1 and 7.4 (decision R1).

The same binary runs in CLI mode when it gets arguments (for example KlangLadder list output).

Behavior

  • Read devices and the current default from Core Audio.
  • Read config.json.
  • Compute ranks and status (active, connected, disconnected, disabled).
  • Print JSON and exit.
  • Never write the config. Never switch devices. Never start the menu bar UI.
  • Reuse KlangLadderCore, so there is no second ranking implementation.
  • Read older and newer config versions it understands; report an error otherwise (section 10).

Needed by: the Raycast "Switch Device" and "Manage Priorities" commands.

Note: R1 needs an unsandboxed build. A sandboxed App Store build would use AppleScript (R2) instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions