@brainbase-labs/cli 0.2.0 → 0.2.1

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 +8 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9864,6 +9864,7 @@ async function showTokenListCard(props) {
9864
9864
  }
9865
9865
 
9866
9866
  // src/cli/token.ts
9867
+ var DEFAULT_SCOPES = ["read", "publish"];
9867
9868
  async function runTokenCreate(args) {
9868
9869
  banner("token create — make a long-lived CLI key");
9869
9870
  let name = args.name;
@@ -9875,11 +9876,12 @@ async function runTokenCreate(args) {
9875
9876
  });
9876
9877
  name = ensureNotCancelled(ans);
9877
9878
  }
9879
+ const scopes = args.scopes && args.scopes.length > 0 ? args.scopes : DEFAULT_SCOPES;
9878
9880
  const spinner17 = p21.spinner();
9879
9881
  spinner17.start("Creating token…");
9880
9882
  const created = await registryApi.createCliToken({
9881
9883
  name,
9882
- scopes: args.scopes
9884
+ scopes
9883
9885
  });
9884
9886
  spinner17.stop("Token created.");
9885
9887
  writeToken(created.token, name);
@@ -9989,6 +9991,11 @@ function printTokenHelp() {
9989
9991
  out.push(` ${pc30.cyan("revoke")} ${pc30.dim("<id>")} ${pc30.dim("revoke a token by id")}`);
9990
9992
  out.push(` ${pc30.cyan("clear")} ${pc30.dim("forget the local token (does not revoke)")}`);
9991
9993
  out.push("");
9994
+ out.push(` ${pc30.bold("create flags")}`);
9995
+ out.push(` ${pc30.cyan("--name, -n")} ${pc30.dim("<label>")} ${pc30.dim("token label (prompted if omitted)")}`);
9996
+ out.push(` ${pc30.cyan("--scopes")} ${pc30.dim("<list>")} ${pc30.dim("comma-separated; allowed: read, publish, admin")}`);
9997
+ out.push(` ${pc30.dim("default: read,publish")}`);
9998
+ out.push("");
9992
9999
  console.log(out.join(`
9993
10000
  `));
9994
10001
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainbase-labs/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Pack, share, and install agent templates across harnesses (Claude Code, Codex, ...).",
5
5
  "type": "module",
6
6
  "bin": {