@letterstory/cli 0.150.0 → 0.151.0
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 +3 -2
- package/lib/commands/admin.mjs +2 -1
- package/lib/commands/repo.mjs +12 -0
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
|
|
67
67
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
68
68
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
69
|
-
export const VERSION = "0.
|
|
69
|
+
export const VERSION = "0.151.0";
|
|
70
70
|
|
|
71
71
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
72
72
|
// can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
|
|
@@ -1009,7 +1009,7 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
|
|
|
1009
1009
|
[--slack a@acme.com,b@acme.com] [--invite a@acme.com[:admin]]… [--no-checklist]
|
|
1010
1010
|
| onboarding <account-id> | retry-onboarding <onboarding-id>
|
|
1011
1011
|
| onboard-plan <account-id> [--refresh]
|
|
1012
|
-
| payment-link <account-id> [--amount-cents N] [--description "…"] [--plan starter] [--ratio N] [--why "…"]
|
|
1012
|
+
| payment-link <account-id> [--amount-cents N] [--description "…"] [--plan starter] [--ratio N] [--why "…"] [--first-invoice-credit-cents N]
|
|
1013
1013
|
The staff CRM's pipeline: bulk-importing a
|
|
1014
1014
|
CSV of leads, the inbound signal
|
|
1015
1015
|
feed, recording a signal with no webhook
|
|
@@ -1446,6 +1446,7 @@ The Site (one model of your whole marketing site, keyed by host and path):
|
|
|
1446
1446
|
|
|
1447
1447
|
Repo changes (Claude Code edits your repo in a sandbox; the Letter GitHub App opens a PR):
|
|
1448
1448
|
repo repos Repos the Letter GitHub App can reach
|
|
1449
|
+
repo connect Is GitHub connected; the link a person opens to connect it
|
|
1449
1450
|
repo branches --repo owner/name Branches a change can start from (default first)
|
|
1450
1451
|
repo prs [--repo owner/name] Every open PR (whoever opened it), longest-idle first
|
|
1451
1452
|
repo suggestions Fixes found and not acted on yet, and how to start each
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -3726,7 +3726,7 @@ async function cmdAdminCrm(ctx) {
|
|
|
3726
3726
|
// The key needs crm:write + billing:write.
|
|
3727
3727
|
if (!id)
|
|
3728
3728
|
throw new CliError(
|
|
3729
|
-
'Usage: admin crm payment-link <account-id> [--amount-cents N] [--description "…"] [--plan starter] [--ratio 1|2|4|8] [--why "…"]'
|
|
3729
|
+
'Usage: admin crm payment-link <account-id> [--amount-cents N] [--description "…"] [--plan starter] [--ratio 1|2|4|8] [--why "…"] [--first-invoice-credit-cents N (Lago only)]'
|
|
3730
3730
|
);
|
|
3731
3731
|
const r = await staffPost(
|
|
3732
3732
|
ctx,
|
|
@@ -3737,6 +3737,7 @@ async function cmdAdminCrm(ctx) {
|
|
|
3737
3737
|
planCode: flagStr(flags.plan),
|
|
3738
3738
|
ratio: flagNum(flags.ratio),
|
|
3739
3739
|
exceptionReason: flagStr(flags.why),
|
|
3740
|
+
firstInvoiceCreditCents: flagNum(flags["first-invoice-credit-cents"]),
|
|
3740
3741
|
})
|
|
3741
3742
|
);
|
|
3742
3743
|
return out(
|
package/lib/commands/repo.mjs
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
// repo revise → revise_repo_change (ask for more on a preview, before the PR)
|
|
9
9
|
// repo say → send_repo_change_message (steer a build while its agent works)
|
|
10
10
|
// repo repos → list_github_app_repos repo branches → list_repo_branches
|
|
11
|
+
// repo connect → connect_github (the link a person opens to connect GitHub)
|
|
11
12
|
// repo prs → list_open_pull_requests (every open PR, whoever opened it)
|
|
12
13
|
// repo install-letterprove → letterprove_open_install_pr
|
|
13
14
|
// repo install-visitors → visitors_open_install_pr
|
|
@@ -249,6 +250,7 @@ const ARGS = {
|
|
|
249
250
|
site_host: "site",
|
|
250
251
|
},
|
|
251
252
|
list_github_app_repos: {},
|
|
253
|
+
connect_github: {},
|
|
252
254
|
list_repo_branches: {
|
|
253
255
|
repo_owner: { value: (flags) => splitRepo(flags).owner },
|
|
254
256
|
repo_name: { value: (flags) => splitRepo(flags).name },
|
|
@@ -333,6 +335,8 @@ export async function cmdRepo(ctx) {
|
|
|
333
335
|
return repoSay(rest);
|
|
334
336
|
case "repos":
|
|
335
337
|
return repoRepos(rest);
|
|
338
|
+
case "connect":
|
|
339
|
+
return repoConnect(rest);
|
|
336
340
|
case "branches":
|
|
337
341
|
return repoBranches(rest);
|
|
338
342
|
case "prs":
|
|
@@ -717,6 +721,14 @@ async function repoRepos(ctx) {
|
|
|
717
721
|
return 0;
|
|
718
722
|
}
|
|
719
723
|
|
|
724
|
+
/** `repo connect`: whether GitHub is connected, and the link a person opens to connect it. */
|
|
725
|
+
async function repoConnect(ctx) {
|
|
726
|
+
const { client, flags, io } = ctx;
|
|
727
|
+
const result = await client.callTool("connect_github", argsFromFlags(ARGS.connect_github, flags));
|
|
728
|
+
printResult(io, flags, result, (r) => r.message);
|
|
729
|
+
return 0;
|
|
730
|
+
}
|
|
731
|
+
|
|
720
732
|
/** `repo prs [--repo owner/name]`: every open PR, longest-idle first, and which Letter opened. */
|
|
721
733
|
async function repoPrs(ctx) {
|
|
722
734
|
const { client, flags, io } = ctx;
|