한국어
문서
명령어

명령어

OpenCode에서 사용자 정의 명령어 템플릿을 정의합니다.

설정

{
  "command": {
    "test": {
      "template": "Run full test suite with coverage report.",
      "description": "Run tests with coverage",
      "agent": "build",
      "model": "anthropic/claude-haiku-4-5"
    },
    "component": {
      "template": "Create a new React component named $ARGUMENTS with TypeScript.",
      "description": "Create a new component"
    }
  }
}

Markdown 명령어

명령어는 마크다운 파일로도 정의할 수 있습니다:

  • ~/.config/opencode/command/
  • .opencode/command/

사용법

TUI에서 /command-name으로 사용자 정의 명령어 호출.

변수

템플릿에 인수를 전달하려면 $ARGUMENTS 사용.