@chrysb/alphaclaw 0.1.21 → 0.1.22

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/bin/alphaclaw.js +5 -21
  2. package/package.json +1 -1
package/bin/alphaclaw.js CHANGED
@@ -106,36 +106,20 @@ try {
106
106
  }
107
107
 
108
108
  // ---------------------------------------------------------------------------
109
- // 4. Ensure shared ~/data/.env exists (seed from template if missing)
109
+ // 4. Ensure <rootDir>/.env exists (seed from template if missing)
110
110
  // ---------------------------------------------------------------------------
111
111
 
112
112
  const envFilePath = path.join(rootDir, ".env");
113
- const sharedDataDir = path.join(os.homedir(), "data");
114
- const sharedEnvFilePath = path.join(sharedDataDir, ".env");
115
113
  const setupDir = path.join(__dirname, "..", "lib", "setup");
116
114
  const templatePath = path.join(setupDir, "env.template");
117
115
 
118
116
  try {
119
- if (!fs.existsSync(sharedEnvFilePath) && fs.existsSync(templatePath)) {
120
- fs.mkdirSync(sharedDataDir, { recursive: true });
121
- fs.copyFileSync(templatePath, sharedEnvFilePath);
122
- console.log(`[alphaclaw] Created shared env at ${sharedEnvFilePath}`);
117
+ if (!fs.existsSync(envFilePath) && fs.existsSync(templatePath)) {
118
+ fs.copyFileSync(templatePath, envFilePath);
119
+ console.log(`[alphaclaw] Created env at ${envFilePath}`);
123
120
  }
124
121
  } catch (e) {
125
- console.log(`[alphaclaw] Shared .env setup skipped: ${e.message}`);
126
- }
127
-
128
- // ---------------------------------------------------------------------------
129
- // 5. Symlink <root>/.env -> ~/data/.env when available
130
- // ---------------------------------------------------------------------------
131
-
132
- try {
133
- if (!fs.existsSync(envFilePath) && fs.existsSync(sharedEnvFilePath)) {
134
- fs.symlinkSync(sharedEnvFilePath, envFilePath);
135
- console.log(`[alphaclaw] Symlinked ${envFilePath} -> ${sharedEnvFilePath}`);
136
- }
137
- } catch (e) {
138
- console.log(`[alphaclaw] .env symlink skipped: ${e.message}`);
122
+ console.log(`[alphaclaw] .env setup skipped: ${e.message}`);
139
123
  }
140
124
 
141
125
  // ---------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrysb/alphaclaw",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },