create-egregore 0.11.1 → 0.12.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/auth.js CHANGED
@@ -5,8 +5,8 @@
5
5
 
6
6
  const https = require("node:https");
7
7
 
8
- const CLIENT_ID = "Ov23liYZjJbbbNgnJ9vH";
9
- const SCOPE = "repo,read:org";
8
+ const CLIENT_ID = "Iv23li2obNsAjakoK2RE";
9
+ const SCOPE = "";
10
10
 
11
11
  function post(url, body) {
12
12
  return new Promise((resolve, reject) => {
@@ -135,4 +135,4 @@ async function deviceFlow(ui) {
135
135
  throw new Error("Timed out waiting for authorization (5 minutes)");
136
136
  }
137
137
 
138
- module.exports = { deviceFlow };
138
+ module.exports = { deviceFlow, openBrowser };
package/lib/local.js CHANGED
@@ -6,7 +6,7 @@
6
6
  const fs = require("node:fs");
7
7
  const path = require("node:path");
8
8
  const { execFileSync } = require("node:child_process");
9
- const { deviceFlow } = require("./auth");
9
+ const { deviceFlow, openBrowser } = require("./auth");
10
10
  const {
11
11
  ghApi,
12
12
  acceptPendingInvitations,
@@ -22,6 +22,9 @@ const {
22
22
  const TEMPLATE_OWNER = "egregore-labs";
23
23
  const TEMPLATE_REPO = "egregore";
24
24
 
25
+ // GitHub App installation URL
26
+ const APP_INSTALL_URL = "https://github.com/apps/egregore-labs/installations/new";
27
+
25
28
  // ── GitHub API helpers ──────────────────────────────────────────────
26
29
 
27
30
  async function getUser(token) {
@@ -179,8 +182,15 @@ function createSymlink(egregoreDir, memoryDir, ui) {
179
182
  // ── Flow 1: Founder (local mode) ───────────────────────────────────
180
183
 
181
184
  async function localFounderFlow(ui) {
182
- // 1. GitHub auth
183
- ui.info("Let's set up Egregore. First, sign in with GitHub.\n");
185
+ // 1. Install GitHub App — grants Egregore access to the repos the user selects
186
+ ui.info("Let's set up Egregore.\n");
187
+ ui.info("First, install the Egregore app on your GitHub account.");
188
+ ui.info("You'll choose exactly which repos to share.\n");
189
+ openBrowser(APP_INSTALL_URL);
190
+ await ui.prompt("Press Enter when done...");
191
+
192
+ // 2. GitHub auth (auto-approved — user just authorized during App install)
193
+ ui.info("");
184
194
  let githubToken;
185
195
  try {
186
196
  githubToken = await deviceFlow(ui);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-egregore",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "Set up Egregore for your team in one command",
5
5
  "license": "MIT",
6
6
  "bin": {