Repository navigation
Expand file tree
/
Copy pathsetup.js
More file actions
52 lines (43 loc) · 1.54 KB
/
Copy pathsetup.js
File metadata and controls
52 lines (43 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env node
/**
* Setup script for Auto Tweet Post
*
* This script helps users set up their environment variables
* and initialize the system.
*/
const fs = require('fs');
const path = require('path');
console.log('🚀 Auto Tweet Post Setup');
console.log('========================\n');
// Check if .env file already exists
const envPath = path.join(__dirname, '.env');
if (fs.existsSync(envPath)) {
console.log('✅ .env file already exists');
console.log('Please verify your API keys are correctly configured.\n');
} else {
// Copy .env.example to .env
const envExamplePath = path.join(__dirname, '.env.example');
if (fs.existsSync(envExamplePath)) {
fs.copyFileSync(envExamplePath, envPath);
console.log('✅ Created .env file from template');
console.log('Please edit .env and add your API keys.\n');
} else {
console.log('❌ .env.example file not found');
console.log('Please create a .env file with your API keys.\n');
}
}
console.log('Next steps:');
console.log('1. Edit .env and add your API keys:');
console.log(' - OPENAI_API_KEY');
console.log(' - TWITTER_API_KEY');
console.log(' - TWITTER_API_SECRET');
console.log(' - TWITTER_ACCESS_TOKEN');
console.log(' - TWITTER_ACCESS_SECRET');
console.log(' - TWITTER_BEARER_TOKEN\n');
console.log('2. Run the system:');
console.log(' npm start\n');
console.log('3. For development:');
console.log(' npm run dev\n');
console.log('4. Run demo:');
console.log(' npm run demo\n');
console.log('Need help? Check the README.md for detailed instructions.');