install-rynude 1.0.0 → 1.0.2

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/index.js +27 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -109,6 +109,24 @@ async function run() {
109
109
  execSync('cmd.exe /c setup-global.bat', { cwd: INSTALL_DIR, stdio: 'ignore' });
110
110
  } else {
111
111
  execSync('bash setup-global.sh', { cwd: INSTALL_DIR, stdio: 'ignore' });
112
+
113
+ // Auto add to PATH for Mac/Linux
114
+ const bashrcPath = path.join(os.homedir(), '.bashrc');
115
+ const zshrcPath = path.join(os.homedir(), '.zshrc');
116
+ const zprofilePath = path.join(os.homedir(), '.zprofile');
117
+ const pathExport = `\nexport PATH="$HOME/.local/bin:$PATH"\n`;
118
+
119
+ [bashrcPath, zshrcPath, zprofilePath].forEach(profilePath => {
120
+ try {
121
+ fs.ensureFileSync(profilePath);
122
+ const content = fs.readFileSync(profilePath, 'utf8');
123
+ if (!content.includes('.local/bin')) {
124
+ fs.appendFileSync(profilePath, pathExport);
125
+ }
126
+ } catch (err) {
127
+ // ignore if permission denied
128
+ }
129
+ });
112
130
  }
113
131
  globalSpinner.succeed('Global command berhasil diatur.');
114
132
  } catch (e) {
@@ -117,8 +135,15 @@ async function run() {
117
135
  }
118
136
 
119
137
  console.log(chalk.green.bold('\nšŸŽ‰ Instalasi Rynude AI Berhasil Selesai!\n'));
120
- console.log(`Sekarang Anda tidak perlu lagi masuk ke folder project untuk menjalankan aplikasi.`);
121
- console.log(`Silakan buka terminal baru dari folder mana saja (misal di Desktop), lalu ketik:`);
138
+
139
+ if (os.platform() !== 'win32') {
140
+ console.log(chalk.bgYellow.black.bold(' āš ļø PENTING UNTUK MAC/LINUX '));
141
+ console.log(chalk.yellow(`Harap TUTUP terminal ini sepenuhnya (Quit) lalu buka terminal yang baru, agar perintah dikenali.\n`));
142
+ } else {
143
+ console.log(`Sekarang Anda tidak perlu lagi masuk ke folder project untuk menjalankan aplikasi.`);
144
+ }
145
+
146
+ console.log(`Buka terminal baru dari folder mana saja (misal di Desktop), lalu ketik:`);
122
147
  console.log(chalk.magenta.bold(' rynude\n'));
123
148
  }
124
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "install-rynude",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Auto-installer for Rynude AI",
5
5
  "main": "index.js",
6
6
  "type": "module",