@letterstory/cli 0.177.11 → 0.177.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cli.mjs CHANGED
@@ -88,7 +88,7 @@ import {
88
88
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
89
89
 
90
90
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
91
- export const VERSION = "0.177.11";
91
+ export const VERSION = "0.177.12";
92
92
 
93
93
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
94
94
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -1908,6 +1908,7 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letter GitHub App op
1908
1908
  repo repos [--gitlab [--search <text>] [--page n]] Repos the Letter GitHub App can reach (--gitlab: the GitLab
1909
1909
  projects the organization's connection can push to)
1910
1910
  repo connect [--gitlab] Is GitHub (or GitLab) connected; the link a person opens to connect it
1911
+ repo disconnect --installation <id> Disconnect a GitHub account (its installationId)
1911
1912
  repo branches --repo owner/name Branches a change can start from (default first)
1912
1913
  repo prs [--repo owner/name] Every open PR (whoever opened it), longest-idle first
1913
1914
  repo suggestions Fixes found and not acted on yet, and how to start each
@@ -11,6 +11,7 @@
11
11
  // repo say → send_repo_change_message (steer a build while its agent works)
12
12
  // repo repos → list_github_app_repos repo branches → list_repo_branches
13
13
  // repo connect → connect_github (the link a person opens to connect GitHub)
14
+ // repo disconnect --installation <id> → disconnect_github_account
14
15
  // repo repos --gitlab → list_gitlab_repos repo connect --gitlab → connect_gitlab
15
16
  // repo prs → list_open_pull_requests (every open PR, whoever opened it)
16
17
  // repo install-letterprove → letterprove_open_install_pr
@@ -304,6 +305,7 @@ const ARGS = {
304
305
  },
305
306
  list_github_app_repos: {},
306
307
  connect_github: {},
308
+ disconnect_github_account: { installation_id: { flag: "installation", type: "num" } },
307
309
  list_gitlab_repos: { search: "search", page: { flag: "page", type: "num" } },
308
310
  connect_gitlab: {},
309
311
  list_repo_branches: {
@@ -406,6 +408,8 @@ export async function cmdRepo(ctx) {
406
408
  return repoRepos(rest);
407
409
  case "connect":
408
410
  return repoConnect(rest);
411
+ case "disconnect":
412
+ return repoDisconnect(rest);
409
413
  case "branches":
410
414
  return repoBranches(rest);
411
415
  case "prs":
@@ -420,7 +424,7 @@ export async function cmdRepo(ctx) {
420
424
  return repoSlackTest(rest);
421
425
  default:
422
426
  throw new CliError(
423
- `Unknown repo subcommand: ${sub ?? "(none)"}. Try: start, fix-audit, install-letterprove, install-visitors, sites, set-site, reset-site, secrets, set-secret, delete-secret, status, list, publish, merge, retry, revise, say, cancel, repos, branches, prs, settings, suggestions, slack-targets, slack-test`
427
+ `Unknown repo subcommand: ${sub ?? "(none)"}. Try: start, fix-audit, install-letterprove, install-visitors, sites, set-site, reset-site, secrets, set-secret, delete-secret, status, list, publish, merge, retry, revise, say, cancel, repos, branches, prs, settings, suggestions, slack-targets, slack-test, connect, disconnect`
424
428
  );
425
429
  }
426
430
  }
@@ -874,6 +878,20 @@ async function repoConnect(ctx) {
874
878
  return 0;
875
879
  }
876
880
 
881
+ /** `repo disconnect --installation <id>`: disconnect one GitHub account (its installationId on `repo repos --json`). */
882
+ async function repoDisconnect(ctx) {
883
+ const { client, flags, io } = ctx;
884
+ refuseUnknownFlags(ctx, {}, ["installation"]);
885
+ if (flags.installation === undefined)
886
+ throw new CliError("Pass --installation <id>: the installationId shown by `repo repos --json`.");
887
+ const result = await client.callTool(
888
+ "disconnect_github_account",
889
+ argsFromFlags(ARGS.disconnect_github_account, flags)
890
+ );
891
+ printResult(io, flags, result, (r) => r.message);
892
+ return 0;
893
+ }
894
+
877
895
  /** `repo prs [--repo owner/name]`: every open PR, longest-idle first, and which Letter opened. */
878
896
  async function repoPrs(ctx) {
879
897
  const { client, flags, io } = ctx;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.11",
3
+ "version": "0.177.12",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",