@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 +1 -1
- package/scripts/arcten-cli.cjs +1 -1
- package/scripts/cli-init-wizard.ts +25 -17
package/package.json
CHANGED
package/scripts/arcten-cli.cjs
CHANGED
|
@@ -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
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
|
144
|
-
console.log('\nš Get your API key from: https://arcten.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
744
|
+
console.log(`š Dashboard: https://arcten.com/dashboard/projects/${projectId}`);
|
|
737
745
|
console.log('');
|
|
738
746
|
}
|
|
739
747
|
|