@braingrid/cli 0.2.22 → 0.2.23

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/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.23] - 2025-12-18
11
+
12
+ ### Added
13
+
14
+ - **Automatic README.md installation**
15
+ - Copies `.braingrid/README.md` documentation during `init`, `update`, and `setup` commands
16
+ - Ensures users always have the latest BrainGrid integration documentation
17
+ - Fails silently if GitHub is unreachable (non-blocking operation)
18
+
10
19
  ## [0.2.22] - 2025-12-18
11
20
 
12
21
  ### Added
package/dist/cli.js CHANGED
@@ -422,7 +422,7 @@ import axios3, { AxiosError as AxiosError2 } from "axios";
422
422
 
423
423
  // src/build-config.ts
424
424
  var BUILD_ENV = true ? "production" : process.env.NODE_ENV === "test" ? "development" : "production";
425
- var CLI_VERSION = true ? "0.2.22" : "0.0.0-test";
425
+ var CLI_VERSION = true ? "0.2.23" : "0.0.0-test";
426
426
  var PRODUCTION_CONFIG = {
427
427
  apiUrl: "https://app.braingrid.ai",
428
428
  workosAuthUrl: "https://auth.braingrid.ai",
@@ -5854,6 +5854,17 @@ async function installStatusLineScript(scriptContent, targetPath = ".claude/stat
5854
5854
  throw new Error(`Failed to install status line script to ${targetPath}: ${errorMessage}`);
5855
5855
  }
5856
5856
  }
5857
+ async function copyBraingridReadme(targetPath = ".braingrid/README.md") {
5858
+ try {
5859
+ const content = await fetchFileFromGitHub("claude-code/README.md");
5860
+ const parentDir = path3.dirname(targetPath);
5861
+ await fs3.mkdir(parentDir, { recursive: true });
5862
+ await fs3.writeFile(targetPath, content, { encoding: "utf8", mode: 420 });
5863
+ return true;
5864
+ } catch {
5865
+ return false;
5866
+ }
5867
+ }
5857
5868
  async function updateClaudeSettings(settingsPath = ".claude/settings.json", scriptPath = ".claude/statusline.sh") {
5858
5869
  try {
5859
5870
  let settings = {};
@@ -6056,6 +6067,7 @@ async function _handleSetup(config, opts) {
6056
6067
  );
6057
6068
  }
6058
6069
  }
6070
+ await copyBraingridReadme();
6059
6071
  const statusLineMessage = statusLineInstalled ? chalk12.dim(" Status line: .claude/statusline.sh\n") : "";
6060
6072
  return {
6061
6073
  success: true,
@@ -6145,6 +6157,7 @@ async function handleUpdate(opts) {
6145
6157
  if (comparison === 0) {
6146
6158
  output += chalk13.green("\u2705 You are already on the latest version!\n");
6147
6159
  console.log(output);
6160
+ await copyBraingridReadme();
6148
6161
  const setupOutput2 = await promptForIdeUpdates();
6149
6162
  return {
6150
6163
  success: true,
@@ -6181,6 +6194,7 @@ async function handleUpdate(opts) {
6181
6194
  output += chalk13.dim("Running: ") + chalk13.cyan(updateCommand) + "\n\n";
6182
6195
  console.log(output);
6183
6196
  executeUpdate(packageManager, PACKAGE_NAME);
6197
+ await copyBraingridReadme();
6184
6198
  const setupOutput = await promptForIdeUpdates();
6185
6199
  return {
6186
6200
  success: true,
@@ -6860,6 +6874,7 @@ async function handleInit(opts) {
6860
6874
  created_at: project2.created_at
6861
6875
  };
6862
6876
  await saveProjectConfig(localConfig);
6877
+ await copyBraingridReadme();
6863
6878
  console.log(
6864
6879
  chalk15.green("\u2705 Repository initialized successfully!\n\n") + chalk15.dim("Project: ") + chalk15.cyan(project2.name) + chalk15.dim(` (${project2.short_id})`) + "\n" + chalk15.dim("Config: ") + chalk15.gray(".braingrid/project.json") + "\n"
6865
6880
  );