@arcteninc/core 0.0.129 → 0.0.130

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcteninc/core",
3
- "version": "0.0.129",
3
+ "version": "0.0.130",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -64,7 +64,7 @@ Examples:
64
64
  arcten uninstall Remove Arcten configuration files
65
65
  arcten help Show help
66
66
 
67
- For more information, visit https://arcten.ai/docs
67
+ For more information, visit https://arcten.com/docs
68
68
  `);
69
69
  process.exit(0);
70
70
  }
@@ -125,23 +125,30 @@ async function confirm(rl: readline.Interface, question: string): Promise<boolea
125
125
  async function checkApiKey(rl: readline.Interface): Promise<{ apiKey: string; projectId: string }> {
126
126
  console.log('\nšŸ“‹ Step 1: Authentication\n');
127
127
 
128
- const envPath = path.join(process.cwd(), '.env');
129
128
  let apiKey: string | undefined;
130
-
131
- // Check .env file
132
- if (fs.existsSync(envPath)) {
133
- const envContent = fs.readFileSync(envPath, 'utf-8');
134
- const match = envContent.match(/ARCTEN_API_KEY=([^\s\n]+)/);
135
- if (match) {
136
- apiKey = match[1];
137
- console.log('āœ“ Found API key in .env file');
129
+ let foundInFile: string | undefined;
130
+
131
+ // Check multiple env files in order of preference
132
+ const envFiles = ['.env.local', '.env'];
133
+
134
+ for (const envFile of envFiles) {
135
+ const envPath = path.join(process.cwd(), envFile);
136
+ if (fs.existsSync(envPath)) {
137
+ const envContent = fs.readFileSync(envPath, 'utf-8');
138
+ const match = envContent.match(/ARCTEN_API_KEY=([^\s\n]+)/);
139
+ if (match) {
140
+ apiKey = match[1];
141
+ foundInFile = envFile;
142
+ console.log(`āœ“ Found API key in ${envFile}`);
143
+ break;
144
+ }
138
145
  }
139
146
  }
140
147
 
141
148
  // If not found, prompt
142
149
  if (!apiKey) {
143
- console.log('No API key found in .env file.');
144
- console.log('\nšŸ“ Get your API key from: https://arcten.ai/dashboard');
150
+ console.log('No API key found in .env or .env.local files.');
151
+ console.log('\nšŸ“ Get your API key from: https://arcten.com/dashboard');
145
152
  apiKey = await ask(rl, '\nEnter your API key: ');
146
153
 
147
154
  if (!apiKey) {
@@ -149,10 +156,11 @@ async function checkApiKey(rl: readline.Interface): Promise<{ apiKey: string; pr
149
156
  process.exit(1);
150
157
  }
151
158
 
152
- // Save to .env
159
+ // Save to .env.local (preferred for local development)
160
+ const envPath = path.join(process.cwd(), '.env.local');
153
161
  const envEntry = `\nARCTEN_API_KEY=${apiKey}\n`;
154
162
  fs.appendFileSync(envPath, envEntry);
155
- console.log('āœ“ Saved API key to .env');
163
+ console.log('āœ“ Saved API key to .env.local');
156
164
  }
157
165
 
158
166
  // Extract project ID from API key (format: sk_proj_xxxxx_yyyyy)
@@ -521,7 +529,7 @@ async function displayPlacementSuggestions(
521
529
  console.log('');
522
530
  console.log(' 3. For pre-built UI, use <ArctenAgent /> component');
523
531
  console.log('');
524
- console.log(' For more info: https://arcten.ai/docs/integration');
532
+ console.log(' For more info: https://arcten.com/docs/integration');
525
533
  console.log('');
526
534
  }
527
535
 
@@ -595,7 +603,7 @@ function MyComponent() {
595
603
  }
596
604
  \`\`\`
597
605
 
598
- For more information, visit https://arcten.ai/docs
606
+ For more information, visit https://arcten.com/docs
599
607
  `;
600
608
 
601
609
  const readmePath = path.join(arctenDir, 'README.md');
@@ -686,7 +694,7 @@ async function main() {
686
694
  await generateLocalConfig(projectId, 'default');
687
695
 
688
696
  console.log('\nāœ… Sync complete!\n');
689
- console.log(`šŸ“ Dashboard: https://arcten.ai/dashboard/projects/${projectId}`);
697
+ console.log(`šŸ“ Dashboard: https://arcten.com/dashboard/projects/${projectId}`);
690
698
  console.log(' Configure tools and agents in the dashboard.');
691
699
  } else {
692
700
  // Full wizard mode with AI analysis option
@@ -733,7 +741,7 @@ async function main() {
733
741
  }
734
742
 
735
743
  console.log('\nāœ… Setup complete!\n');
736
- console.log(`šŸ“ Dashboard: https://arcten.ai/dashboard/projects/${projectId}`);
744
+ console.log(`šŸ“ Dashboard: https://arcten.com/dashboard/projects/${projectId}`);
737
745
  console.log('');
738
746
  }
739
747