From 30744348878e18e7ae94ec9892f7979c2b563f58 Mon Sep 17 00:00:00 2001 From: Junho Yeo Date: Fri, 30 Jan 2026 15:58:56 +0900 Subject: [PATCH] fix: use correct gh api command for starring repo (#1274) `gh repo star` is not a valid GitHub CLI command. Use `gh api --silent --method PUT /user/starred/OWNER/REPO` instead. --- docs/guide/installation.md | 2 +- src/cli/install.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index cef859de..e80fd8eb 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -278,7 +278,7 @@ After everything is set up and working, ask the user: If the user agrees, run: ```bash -gh repo star code-yeongyu/oh-my-opencode +gh api --silent --method PUT /user/starred/code-yeongyu/oh-my-opencode >/dev/null 2>&1 || true ``` **Important**: Only run the command if the user explicitly says yes. Never run it automatically without consent. diff --git a/src/cli/install.ts b/src/cli/install.ts index fd7bf985..c5c4a33b 100644 --- a/src/cli/install.ts +++ b/src/cli/install.ts @@ -400,7 +400,7 @@ async function runNonTuiInstall(args: InstallArgs): Promise { ) console.log(`${SYMBOLS.star} ${color.yellow("If you found this helpful, consider starring the repo!")}`) - console.log(` ${color.dim("gh repo star code-yeongyu/oh-my-opencode")}`) + console.log(` ${color.dim("gh api --silent --method PUT /user/starred/code-yeongyu/oh-my-opencode >/dev/null 2>&1 || true")}`) console.log() console.log(color.dim("oMoMoMoMo... Enjoy!")) console.log() @@ -518,7 +518,7 @@ export async function install(args: InstallArgs): Promise { ) p.log.message(`${color.yellow("★")} If you found this helpful, consider starring the repo!`) - p.log.message(` ${color.dim("gh repo star code-yeongyu/oh-my-opencode")}`) + p.log.message(` ${color.dim("gh api --silent --method PUT /user/starred/code-yeongyu/oh-my-opencode >/dev/null 2>&1 || true")}`) p.outro(color.green("oMoMoMoMo... Enjoy!"))