기능: /commands를 CLI가 내보낸 commands.json에서 렌더링 - #13
Merged
Merged
Conversation
omm CLI가 `scripts/export_command_reference.py`로 만드는 `docs/commands.json`을 `src/data/commands.json`으로 복사해 두고, 사용법·인자·옵션·하위 명령을 그 파일에서 그대로 렌더링한다. 손으로 쓴 해설은 그대로 두고, CLI가 출력하는 사실만 생성물로 바꿨다. - 명령 문서 페이지에 "CLI 레퍼런스"(07) 섹션 추가. 그룹은 하위 명령을 `#<sub>` 앵커로 깔아 `/commands/setting#version`이 실제로 열린다. - `/commands` 인덱스에 CLI가 가진 전체 명령 표 추가(별칭·하위 명령 수). - `src/app/[locale]/commands/[name]`: 손으로 쓴 페이지가 아직 없는 명령(export·pin·rollback·unlink·unpin)도 레퍼런스 페이지를 갖는다. 없는 이름은 404. - `npm run sync-commands` / `npm run check-commands`와 매일 도는 `commands-sync.yml`로 복사본이 낡으면 CI가 잡는다. 릴리스마다 바뀌는 `omm_version`은 비교에서 뺐다. omm-hippo/omm#347 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
omm | d3f1b8d | Commit Preview URL Branch Preview URL |
Sep 16 2026, 12:19 PM |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
한줄 요약
omm.run의 명령어 페이지가 이제 CLI가 직접 내보낸 파일을 그대로 읽어서 보여줍니다. CLI가 바뀌면 사이트도 따라 바뀌고, 안 따라오면 CI가 잡아냅니다.
배경
지금까지
omm <명령> --help가 알려주는 내용, GitHub README, 그리고 이 웹사이트는 서로 따로 관리됐습니다. 그래서 셋이 조금씩 어긋나도 아무도 모르고 지나갔습니다. 이 문제를 다루는 이슈가 omm-hippo/omm#347 입니다.해결 방법은 "한 곳에서만 쓰고 나머지는 베껴온다"입니다. omm CLI 저장소가 자기 소스 코드(
src/omm/cli.py)에서 명령어 목록을 뽑아docs/commands.json파일로 내보내고(CLI 쪽 PR: omm-hippo/omm#350), 이 사이트는 그 파일을 복사해서 화면에 그립니다. 사람이 손으로 옮겨 적는 단계가 없어집니다.무엇을 바꿨나
/commands/install같은 곳) 맨 아래에 "CLI 레퍼런스" 칸이 생겼습니다. 사용법 한 줄, 받는 인자, 옵션 목록, 기본값이 터미널에서 보는 것과 글자 그대로 같습니다.omm setting,omm engine처럼 하위 명령이 있는 그룹은 하위 명령이 한 줄씩 펼쳐지고, 각각 바로 가는 주소가 생겼습니다. 예:/commands/setting#version--json,--yes처럼 모든 명령이 공통으로 받는 옵션은 명령마다 반복하지 않고 "공통 옵션" 한 칸에만 적었습니다./commands목록 페이지 아래에 CLI가 가진 전체 명령 표가 붙었습니다. 별칭(ls같은 것)과 그룹의 하위 명령 개수도 함께 보입니다.export,pin,rollback,unlink,unpin)도 자동으로 페이지가 생깁니다. 예전에는 CLI에 명령이 추가돼도 사이트에는 아무것도 없었습니다. 없는 이름을 치면 그대로 404입니다.npm run sync-commands— CLI 저장소에서 최신 파일을 받아옵니다.npm run check-commands— 받아온 것과 저장된 것이 다르면 실패하고, 어떤 명령이 달라졌는지 알려줍니다.omm_version)는 릴리스마다 바뀌니 비교 대상에서 뺐습니다. 명령이나 옵션이 진짜로 바뀐 경우에만 실패합니다.design/FACTS.md와README.md에 적어 뒀습니다.src/data/commands.json은 손으로 고치면 안 되는 파일입니다.어떻게 확인했나
로컬에서 돌린 것:
npm run build(OpenNext)는 Windows에서 exit 127로 멈춥니다. OpenNext가 원래 Windows를 지원하지 않는다고 경고하는 부분이라 이 PR과는 무관하며, CI는 리눅스에서 기존 워크플로로 같은 빌드를 돌립니다.next build결과에서/[locale]/commands/[name]이export,pin,rollback,unlink,unpin5개 × 2개 언어 = 10개 페이지를 미리 만들어 두는 것을 확인했습니다.브라우저(개발 서버)에서 직접 열어 본 것:
/commands— 맨 아래 "CLI가 가진 모든 명령어" 표에 최상위 29개가 뜨고,omm engine에 "5 sub-commands",omm setting에 "11 sub-commands",omm list에 "alias: ls"가 붙어 있었습니다./commands/install— 목차가 07까지 늘어났고, "CLI 레퍼런스" 칸에omm install [OPTIONS] NAME과 인자·옵션·기본값이 떴습니다./commands/setting#version— 주소를 치면omm setting version항목 위치로 정확히 이동했습니다./commands/pin— 손으로 쓴 해설이 없는 새 명령인데도 레퍼런스 페이지가 정상으로 떴습니다./commands/not-a-real-command— 404./ko/commands,/ko/commands/list— 안내 문구는 한국어, 옵션은 원문 그대로였습니다.동기화 스크립트는 가짜 서버를 띄워 세 가지 경우를 직접 확인했습니다. 같으면 통과, 명령이 하나 늘면 실패하며
only upstream: teleport라고 알려주고, 버전 번호만 다를 때는 통과했습니다.🤖 Generated with Claude Code