Skip to content

Add OpenCode CLI Provider #534

Closed

Description

@Yoseph-Zuskin

As an OpenCode user, I want SkillSpector to support OpenCode as an LLM provider so I can run semantic security scans on my skills without leaving my OpenCode session.

The gap

OpenCode users currently get static-only scans because SkillSpector lacks an opencode_cli provider: there is no way to set SKILLSPECTOR_PROVIDER=opencode_cli, so llm_available stays false and the semantic analyzers are skipped.

What I am asking for

Please consider OpenCode a supported CLI provider, on par with the existing Claude/Codex/Gemini CLI providers: selectable via SKILLSPECTOR_PROVIDER=opencode_cli, using the local opencode binary's own login (no API key handling), with the prompt delivered via stdin and the reply parsed from opencode run --format json events. Done when an OpenCode user can run a semantic scan with the CLI-default model (or a SKILLSPECTOR_MODEL override) and get llm_available: true with findings carried by the semantic analyzers.

This could be achieved by

  • Adding providers/opencode_cli/provider.py and __init__.py mirroring the codex_cli pattern
  • Registering the provider in _agent_cli.py with argv builder (opencode run --format json --pure), JSON-event parser, and opencode auth list auth check
  • Wiring selection via SKILLSPECTOR_PROVIDER=opencode_cli in providers/__init__.py and inference_usage.py
  • Updating docs trio: README provider table, .env.example, docs/DEVELOPMENT.md
  • Registry scope kept minimal: free-model token-budget catalog split out of this change (separate chore), so the provider diff stays wiring-only
  • TDD test suite in tests/provider/test_opencode_cli.py covering argv, auth, parser, wiring, registry label
  • Live verification: nonce round-trip proves stdin piping works despite no documented flag

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions