Skip to content

[Feature] Add CLI agent integration launch commands #763

@olegshulyakov

Description

@olegshulyakov

Summary

Add an Integrations page that generates oMLX-style one-shot launch commands for supported CLI agents.
The first version should focus on commands shaped like:

'/Applications/oMLX.app/Contents/MacOS/omlx-cli' launch codex --model 'OmniCoder-9B-4bit' --api-key
'access-api-key'
'/Applications/oMLX.app/Contents/MacOS/omlx-cli' launch opencode --model 'OmniCoder-9B-4bit' --api-key
'access-api-key'
'/Applications/oMLX.app/Contents/MacOS/omlx-cli' launch pi --model 'OmniCoder-9B-4bit' --api-key
'access-api-key'

For llama-swap, the executable path should resolve to the appropriate packaged or local CLI path, but
the user experience should stay the same: select tool, model, API key, copy command, run agent.

User Story

As a local model user,
I want llama-swap to generate ready-to-run CLI agent launch commands,
so that I can start Codex, OpenCode, or Pi against my configured llama-swap models without hand-
writing tool-specific config.

Acceptance Criteria

  • Given the user opens Integrations, when models are configured, then they can choose a model or
    alias.
  • Given the user selects Codex, OpenCode, or Pi, then the UI generates a launch command using
    launch --model --api-key .
  • Given model IDs, executable paths, or API keys contain spaces or punctuation, then generated
    shell commands quote arguments safely.
  • Given no API key is entered locally in the browser, then the command shows a placeholder rather
    than exposing stored secrets.
  • Given OpenAI and Anthropic integrations diverge later, then base URL rules remain explicit:
    OpenAI defaults to /v1, Anthropic defaults to server root when the client appends /v1/messages.
  • Generated integration metadata is testable and does not call external services.

Developer Tasks

# Task Effort Files / Modules
1 Define integration registry schema for launch commands, support level, API family, snippets, and base URL rules M proxy/, config/
2 Add initial registry entries for codex, opencode, and pi S proxy/
3 Add /api/integrations endpoint returning registry, models, aliases, base URLs, and resolved CLI executable M proxy/
4 Implement safe shell-quoting for executable path, model, and API key placeholders S proxy/
5 Add Integrations UI page with tool selector, model selector, API key input, command preview, and copy button M ui-svelte/
6 Add focused tests for registry validation, command rendering, and shell quoting M proxy/*_test.go

PRD.md
SPEC.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions