@earntori/cli 0.2.12 → 0.2.13

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -241,13 +241,18 @@ const HARNESSES = [
241
241
  after: "Codex: trust the project, then /mcp to confirm tori and /hooks once to trust the two hooks.",
242
242
  },
243
243
  ];
244
- function init() {
244
+ async function init() {
245
245
  const pin = flag("base");
246
246
  if (pin)
247
247
  writeJson(join(".tori", "project.json"), { base: pin.replace(/\/$/, "") });
248
- const cfg = loadCfg();
249
- if (!cfg)
250
- die(pin ? `Not signed in for ${pin} \u2014 run: tori login --base ${pin}` : "Not signed in \u2014 run: tori login");
248
+ let cfg = loadCfg();
249
+ if (!cfg) {
250
+ console.log(pin ? `Not signed in for ${pin} \u2014 signing in first` : "Not signed in \u2014 signing in first");
251
+ await login();
252
+ cfg = loadCfg();
253
+ if (!cfg)
254
+ die("Sign-in did not return a session");
255
+ }
251
256
  const local = has("local");
252
257
  const cliBin = resolve(process.argv[1] ?? "");
253
258
  const mcpBin = resolve(dirname(cliBin), "..", "..", "mcp", "dist", "index.js");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@earntori/cli",
3
- "version": "0.2.12",
4
- "description": "Tori CLI \u2014 sign in with GitHub, check your credits, mint a capped AI key into your tools.",
3
+ "version": "0.2.13",
4
+ "description": "Tori CLI — sign in with GitHub, check your credits, mint a capped AI key into your tools.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "bin": {
@@ -20,8 +20,8 @@
20
20
  "test": "echo no tests"
21
21
  },
22
22
  "devDependencies": {
23
- "typescript": "^5.6.0",
24
- "@types/node": "^20.0.0"
23
+ "@types/node": "^20.19.43",
24
+ "typescript": "^5.9.3"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"