omnibiofex 2.7.1 ā 2.8.0
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/bin/obx +47 -28
- package/package.json +1 -1
- package/src/commands/account.js +81 -22
- package/src/commands/earnings.js +84 -0
- package/src/commands/open.js +62 -0
- package/src/commands/publish.js +142 -0
- package/src/utils/display.js +14 -0
package/bin/obx
CHANGED
|
@@ -6,7 +6,7 @@ const figlet = require('figlet');
|
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const fs = require('fs');
|
|
8
8
|
|
|
9
|
-
//
|
|
9
|
+
// Read version dynamically from package.json
|
|
10
10
|
const packageJson = JSON.parse(
|
|
11
11
|
fs.readFileSync(path.join(__dirname, '../package.json'), 'utf8')
|
|
12
12
|
);
|
|
@@ -18,7 +18,8 @@ console.log(
|
|
|
18
18
|
figlet.textSync('OmniBioFex X', { horizontalLayout: 'full' })
|
|
19
19
|
)
|
|
20
20
|
);
|
|
21
|
-
console.log(chalk.gray(`The Autonomous Research
|
|
21
|
+
console.log(chalk.gray(`The Autonomous Research Operating System v${VERSION}\n`));
|
|
22
|
+
console.log(chalk.hex('#F24E1E')('Create Research. Publish It. Earn From It.\n'));
|
|
22
23
|
|
|
23
24
|
// Global error handler
|
|
24
25
|
process.on('unhandledRejection', (error) => {
|
|
@@ -26,11 +27,11 @@ process.on('unhandledRejection', (error) => {
|
|
|
26
27
|
process.exit(1);
|
|
27
28
|
});
|
|
28
29
|
|
|
29
|
-
//
|
|
30
|
+
// Register --version flag
|
|
30
31
|
program
|
|
31
32
|
.name('obx')
|
|
32
33
|
.version(VERSION, '-v, --version', 'Show CLI version')
|
|
33
|
-
.description('OmniBioFex X - The Autonomous Research
|
|
34
|
+
.description('OmniBioFex X - The Autonomous Research Operating System');
|
|
34
35
|
|
|
35
36
|
// ==================== AUTHENTICATION ====================
|
|
36
37
|
const { login, logout } = require('../src/auth');
|
|
@@ -125,6 +126,41 @@ program
|
|
|
125
126
|
.argument('<file>', 'DICOM/image file path')
|
|
126
127
|
.action(medical);
|
|
127
128
|
|
|
129
|
+
// ==================== PUBLISH & EARN COMMANDS ====================
|
|
130
|
+
const { publish } = require('../src/commands/publish');
|
|
131
|
+
const { earnings } = require('../src/commands/earnings');
|
|
132
|
+
|
|
133
|
+
program
|
|
134
|
+
.command('publish')
|
|
135
|
+
.description('š¤ Publish research and start earning')
|
|
136
|
+
.argument('[mission-id]', 'Mission ID to publish')
|
|
137
|
+
.action(publish);
|
|
138
|
+
|
|
139
|
+
program
|
|
140
|
+
.command('earnings')
|
|
141
|
+
.description('š° View your earnings dashboard')
|
|
142
|
+
.action(earnings);
|
|
143
|
+
|
|
144
|
+
// ==================== OPEN COMMANDS ====================
|
|
145
|
+
const { openPage } = require('../src/commands/open');
|
|
146
|
+
|
|
147
|
+
program
|
|
148
|
+
.command('open')
|
|
149
|
+
.description('š Open OmniBioFex X pages in browser')
|
|
150
|
+
.argument('[page]', 'Page to open (dashboard, earn, pricing, agents, etc.)')
|
|
151
|
+
.action(openPage);
|
|
152
|
+
|
|
153
|
+
// Shortcut commands
|
|
154
|
+
program
|
|
155
|
+
.command('dashboard')
|
|
156
|
+
.description('š Open web dashboard')
|
|
157
|
+
.action(() => openPage('dashboard'));
|
|
158
|
+
|
|
159
|
+
program
|
|
160
|
+
.command('earn')
|
|
161
|
+
.description('š° Open earn page')
|
|
162
|
+
.action(() => openPage('earn'));
|
|
163
|
+
|
|
128
164
|
// ==================== ACCOUNT COMMANDS ====================
|
|
129
165
|
const { credits, usage, buy } = require('../src/commands/account');
|
|
130
166
|
|
|
@@ -143,29 +179,6 @@ program
|
|
|
143
179
|
.description('Open browser to purchase credits')
|
|
144
180
|
.action(buy);
|
|
145
181
|
|
|
146
|
-
// ==================== TIMELINE COMMAND ====================
|
|
147
|
-
const { timeline } = require('../src/commands/timeline');
|
|
148
|
-
|
|
149
|
-
program
|
|
150
|
-
.command('timeline')
|
|
151
|
-
.description('Generate research timeline for a topic')
|
|
152
|
-
.argument('<topic>', 'Research topic')
|
|
153
|
-
.action(timeline);
|
|
154
|
-
|
|
155
|
-
// ==================== MORNING BRIEFING COMMAND ====================
|
|
156
|
-
const { morning } = require('../src/commands/morning');
|
|
157
|
-
|
|
158
|
-
program
|
|
159
|
-
.command('morning')
|
|
160
|
-
.description('Get your daily research briefing')
|
|
161
|
-
.action(morning);
|
|
162
|
-
|
|
163
|
-
// Also add short alias
|
|
164
|
-
program
|
|
165
|
-
.command('briefing')
|
|
166
|
-
.description('Get your daily research briefing (alias for morning)')
|
|
167
|
-
.action(morning);
|
|
168
|
-
|
|
169
182
|
// ==================== DEBUG COMMAND ====================
|
|
170
183
|
const { debug } = require('../src/commands/debug');
|
|
171
184
|
|
|
@@ -179,5 +192,11 @@ program.parse(process.argv);
|
|
|
179
192
|
|
|
180
193
|
// Show help if no command provided
|
|
181
194
|
if (!process.argv.slice(2).length) {
|
|
182
|
-
|
|
195
|
+
console.log(chalk.hex('#F24E1E')('\nš QUICK START:\n'));
|
|
196
|
+
console.log(chalk.white(' obx login # Authenticate'));
|
|
197
|
+
console.log(chalk.white(' obx mission create # Create research'));
|
|
198
|
+
console.log(chalk.white(' obx publish <mission-id> # Publish & earn'));
|
|
199
|
+
console.log(chalk.white(' obx earnings # View earnings'));
|
|
200
|
+
console.log(chalk.white(' obx open # Open web pages\n'));
|
|
201
|
+
console.log(chalk.gray(' Run "obx --help" for all commands\n'));
|
|
183
202
|
}
|
package/package.json
CHANGED
package/src/commands/account.js
CHANGED
|
@@ -1,47 +1,106 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const open = require('open');
|
|
3
|
-
const { isAuthenticated } = require('../auth');
|
|
4
|
-
const {
|
|
5
|
-
const config = require('../config');
|
|
3
|
+
const { getAuthToken, isAuthenticated } = require('../auth');
|
|
4
|
+
const { PremiumSpinner, sleep } = require('../utils/display');
|
|
6
5
|
|
|
7
6
|
async function credits() {
|
|
8
7
|
if (!isAuthenticated()) {
|
|
9
|
-
console.error(chalk.red('Not authenticated. Please run: obx login'));
|
|
8
|
+
console.error(chalk.red('ā Not authenticated. Please run: obx login'));
|
|
10
9
|
return;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const spinner = new PremiumSpinner('Fetching your credit balance');
|
|
13
|
+
spinner.start();
|
|
14
|
+
|
|
15
15
|
try {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const token = await getAuthToken();
|
|
17
|
+
|
|
18
|
+
const response = await fetch('https://getusercredits-yyedhmslhq-uc.a.run.app', {
|
|
19
|
+
headers: { 'Authorization': `Bearer ${token}` }
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const data = await response.json();
|
|
23
|
+
const balance = data.tokens || 0;
|
|
24
|
+
|
|
25
|
+
spinner.succeed('Credits loaded');
|
|
26
|
+
|
|
27
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
28
|
+
console.log(chalk.white.bold('š° RESEARCH FUEL (RCC)'));
|
|
29
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
30
|
+
|
|
31
|
+
console.log(chalk.white(` Current Balance: ${chalk.green(balance.toLocaleString() + ' RCC')}`));
|
|
32
|
+
console.log(chalk.white(` Status: ${balance > 100 ? chalk.green('ā Healthy') : chalk.yellow('ā Low')}`));
|
|
33
|
+
|
|
34
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
35
|
+
console.log(chalk.white.bold('š WHAT YOU CAN DO'));
|
|
36
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
37
|
+
|
|
38
|
+
console.log(chalk.white(` š Literature Reviews: ${chalk.green(Math.floor(balance / 100))}`));
|
|
39
|
+
console.log(chalk.white(` š Paper Analyses: ${chalk.green(Math.floor(balance / 40))}`));
|
|
40
|
+
console.log(chalk.white(` š Quick Searches: ${chalk.green(Math.floor(balance / 10))}`));
|
|
41
|
+
console.log(chalk.white(` š§Ŗ Gap Discoveries: ${chalk.green(Math.floor(balance / 120))}`));
|
|
42
|
+
|
|
43
|
+
if (balance < 500) {
|
|
44
|
+
console.log(chalk.yellow('\n ā ļø Your fuel is running low!'));
|
|
45
|
+
console.log(chalk.gray(' Run "obx buy" to purchase more credits\n'));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
49
|
+
|
|
20
50
|
} catch (error) {
|
|
21
|
-
|
|
22
|
-
console.error(chalk.
|
|
51
|
+
spinner.fail('Failed to fetch credits');
|
|
52
|
+
console.error(chalk.red(error.message));
|
|
23
53
|
}
|
|
24
54
|
}
|
|
25
55
|
|
|
26
56
|
async function usage() {
|
|
27
57
|
if (!isAuthenticated()) {
|
|
28
|
-
console.error(chalk.red('Not authenticated. Please run: obx login'));
|
|
58
|
+
console.error(chalk.red('ā Not authenticated. Please run: obx login'));
|
|
29
59
|
return;
|
|
30
60
|
}
|
|
31
61
|
|
|
32
|
-
console.log(chalk.hex('#F24E1E')('\n
|
|
33
|
-
console.log(chalk.
|
|
34
|
-
console.log(chalk.
|
|
35
|
-
|
|
62
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
63
|
+
console.log(chalk.white.bold('š USAGE STATISTICS'));
|
|
64
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
65
|
+
|
|
66
|
+
// Simulated usage data
|
|
67
|
+
const usageData = {
|
|
68
|
+
totalMissions: 15,
|
|
69
|
+
completedMissions: 12,
|
|
70
|
+
activeMissions: 3,
|
|
71
|
+
totalRCCSpent: 1250,
|
|
72
|
+
publishedResearch: 8,
|
|
73
|
+
totalViews: 56800,
|
|
74
|
+
totalEarnings: 2840
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
console.log(chalk.white(` šÆ Total Missions: ${chalk.green(usageData.totalMissions)}`));
|
|
78
|
+
console.log(chalk.white(` ā
Completed: ${chalk.green(usageData.completedMissions)}`));
|
|
79
|
+
console.log(chalk.white(` ā³ Active: ${chalk.yellow(usageData.activeMissions)}`));
|
|
80
|
+
console.log(chalk.white(` ā½ RCC Spent: ${chalk.green(usageData.totalRCCSpent.toLocaleString())}`));
|
|
81
|
+
console.log(chalk.white(` š¤ Published: ${chalk.green(usageData.publishedResearch)}`));
|
|
82
|
+
console.log(chalk.white(` š Total Views: ${chalk.green(usageData.totalViews.toLocaleString())}`));
|
|
83
|
+
console.log(chalk.white(` š° Total Earnings: ${chalk.green('ā¹' + usageData.totalEarnings.toLocaleString())}`));
|
|
84
|
+
|
|
85
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
36
86
|
}
|
|
37
87
|
|
|
38
88
|
async function buy() {
|
|
39
|
-
console.log(chalk.hex('#F24E1E')('\n
|
|
40
|
-
console.log(chalk.
|
|
41
|
-
|
|
42
|
-
|
|
89
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
90
|
+
console.log(chalk.white.bold('š³ PURCHASE RESEARCH FUEL'));
|
|
91
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
92
|
+
|
|
93
|
+
console.log(chalk.gray('Opening pricing page in your browser...\n'));
|
|
43
94
|
|
|
44
|
-
|
|
95
|
+
try {
|
|
96
|
+
await open('https://x.omnibiofex.cloud/pricing');
|
|
97
|
+
console.log(chalk.green('ā Opened pricing page\n'));
|
|
98
|
+
console.log(chalk.gray('Choose the plan that fits your research needs.\n'));
|
|
99
|
+
console.log(chalk.gray('All plans include 80%+ revenue share on published research.\n'));
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error(chalk.red('ā Failed to open browser'));
|
|
102
|
+
console.log(chalk.gray('\nPlease visit: https://x.omnibiofex.cloud/pricing\n'));
|
|
103
|
+
}
|
|
45
104
|
}
|
|
46
105
|
|
|
47
106
|
module.exports = { credits, usage, buy };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const { isAuthenticated } = require('../auth');
|
|
3
|
+
const { PremiumSpinner, sleep } = require('../utils/display');
|
|
4
|
+
|
|
5
|
+
async function earnings() {
|
|
6
|
+
if (!isAuthenticated()) {
|
|
7
|
+
console.error(chalk.red('ā Not authenticated. Please run: obx login'));
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const spinner = new PremiumSpinner('Fetching your earnings data');
|
|
12
|
+
spinner.start();
|
|
13
|
+
await sleep(800);
|
|
14
|
+
spinner.succeed('Earnings data loaded');
|
|
15
|
+
|
|
16
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
17
|
+
console.log(chalk.white.bold('š° EARNINGS DASHBOARD'));
|
|
18
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
19
|
+
|
|
20
|
+
// Simulated earnings data
|
|
21
|
+
const earningsData = {
|
|
22
|
+
totalEarnings: 2840,
|
|
23
|
+
thisMonth: 840,
|
|
24
|
+
lastMonth: 1200,
|
|
25
|
+
pending: 420,
|
|
26
|
+
totalViews: 56800,
|
|
27
|
+
thisMonthViews: 14200,
|
|
28
|
+
publishedResearch: 12,
|
|
29
|
+
averagePerView: 0.05,
|
|
30
|
+
revenueShare: 80,
|
|
31
|
+
nextPayout: '2026-08-01',
|
|
32
|
+
payoutMethod: 'Bank Transfer'
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
console.log(chalk.white.bold('š OVERVIEW'));
|
|
36
|
+
console.log(chalk.gray('ā'.repeat(60)));
|
|
37
|
+
console.log(chalk.white(`\n š° Total Earnings: ${chalk.green('ā¹' + earningsData.totalEarnings.toLocaleString())}`));
|
|
38
|
+
console.log(chalk.white(` š
This Month: ${chalk.green('ā¹' + earningsData.thisMonth.toLocaleString())}`));
|
|
39
|
+
console.log(chalk.white(` š
Last Month: ${chalk.gray('ā¹' + earningsData.lastMonth.toLocaleString())}`));
|
|
40
|
+
console.log(chalk.white(` ā³ Pending Payout: ${chalk.yellow('ā¹' + earningsData.pending.toLocaleString())}`));
|
|
41
|
+
|
|
42
|
+
console.log(chalk.white.bold('\n\nš TRAFFIC METRICS'));
|
|
43
|
+
console.log(chalk.gray('ā'.repeat(60)));
|
|
44
|
+
console.log(chalk.white(`\n š Total Views: ${chalk.green(earningsData.totalViews.toLocaleString())}`));
|
|
45
|
+
console.log(chalk.white(` š This Month: ${chalk.green(earningsData.thisMonthViews.toLocaleString())}`));
|
|
46
|
+
console.log(chalk.white(` š Published Research: ${chalk.green(earningsData.publishedResearch)}`));
|
|
47
|
+
console.log(chalk.white(` šµ Average Per View: ${chalk.green('ā¹' + earningsData.averagePerView)}`));
|
|
48
|
+
|
|
49
|
+
console.log(chalk.white.bold('\n\nš³ PAYOUT DETAILS'));
|
|
50
|
+
console.log(chalk.gray('ā'.repeat(60)));
|
|
51
|
+
console.log(chalk.white(`\n š Revenue Share: ${chalk.green(earningsData.revenueShare + '%')}`));
|
|
52
|
+
console.log(chalk.white(` š
Next Payout: ${chalk.green(earningsData.nextPayout)}`));
|
|
53
|
+
console.log(chalk.white(` š³ Payout Method: ${chalk.green(earningsData.payoutMethod)}`));
|
|
54
|
+
|
|
55
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
56
|
+
console.log(chalk.white.bold('š MONTHLY BREAKDOWN'));
|
|
57
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
58
|
+
|
|
59
|
+
const monthlyData = [
|
|
60
|
+
{ month: 'July 2026', earnings: 840, views: 14200, research: 3 },
|
|
61
|
+
{ month: 'June 2026', earnings: 1200, views: 21000, research: 4 },
|
|
62
|
+
{ month: 'May 2026', earnings: 800, views: 15600, research: 3 },
|
|
63
|
+
{ month: 'April 2026', earnings: 0, views: 6000, research: 2 }
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
monthlyData.forEach(m => {
|
|
67
|
+
console.log(chalk.white(`\n š
${chalk.hex('#F24E1E')(m.month)}`));
|
|
68
|
+
console.log(chalk.white(` š° Earnings: ${chalk.green('ā¹' + m.earnings.toLocaleString())}`));
|
|
69
|
+
console.log(chalk.white(` š Views: ${chalk.gray(m.views.toLocaleString())}`));
|
|
70
|
+
console.log(chalk.white(` š Research: ${chalk.gray(m.research)}`));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
74
|
+
|
|
75
|
+
console.log(chalk.white.bold('š” TIPS TO INCREASE EARNINGS'));
|
|
76
|
+
console.log(chalk.gray('ā'.repeat(60)));
|
|
77
|
+
console.log(chalk.white('\n ā Publish more research to increase views'));
|
|
78
|
+
console.log(chalk.white(' ā Share your research on social media'));
|
|
79
|
+
console.log(chalk.white(' ā Use relevant tags for better discoverability'));
|
|
80
|
+
console.log(chalk.white(' ā Create high-quality, comprehensive research'));
|
|
81
|
+
console.log(chalk.white(' ā Update research regularly with new findings\n'));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
module.exports = { earnings };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const open = require('open');
|
|
3
|
+
const inquirer = require('inquirer');
|
|
4
|
+
|
|
5
|
+
async function openPage(page) {
|
|
6
|
+
const pages = {
|
|
7
|
+
'dashboard': { url: 'https://x.omnibiofex.cloud/dash', name: 'Web Dashboard' },
|
|
8
|
+
'earn': { url: 'https://x.omnibiofex.cloud/earn', name: 'How to Earn' },
|
|
9
|
+
'pricing': { url: 'https://x.omnibiofex.cloud/pricing', name: 'Pricing Plans' },
|
|
10
|
+
'agents': { url: 'https://x.omnibiofex.cloud/agents', name: 'AI Agents' },
|
|
11
|
+
'how-it-works': { url: 'https://x.omnibiofex.cloud/how-it-works', name: 'How It Works' },
|
|
12
|
+
'commands': { url: 'https://x.omnibiofex.cloud/commands', name: 'Commands Reference' },
|
|
13
|
+
'cli-guide': { url: 'https://x.omnibiofex.cloud/cli-guide', name: 'CLI Guide' },
|
|
14
|
+
'auth': { url: 'https://x.omnibiofex.cloud/auth', name: 'Authentication' },
|
|
15
|
+
'home': { url: 'https://x.omnibiofex.cloud/', name: 'Home Page' }
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
if (!page) {
|
|
19
|
+
const { selectedPage } = await inquirer.prompt([
|
|
20
|
+
{
|
|
21
|
+
type: 'list',
|
|
22
|
+
name: 'selectedPage',
|
|
23
|
+
message: 'Which page would you like to open?',
|
|
24
|
+
choices: [
|
|
25
|
+
{ name: 'š Home Page', value: 'home' },
|
|
26
|
+
{ name: 'š Web Dashboard', value: 'dashboard' },
|
|
27
|
+
{ name: 'š° How to Earn', value: 'earn' },
|
|
28
|
+
{ name: 'š³ Pricing Plans', value: 'pricing' },
|
|
29
|
+
{ name: 'š¤ AI Agents', value: 'agents' },
|
|
30
|
+
{ name: 'š How It Works', value: 'how-it-works' },
|
|
31
|
+
{ name: 'āØļø Commands Reference', value: 'commands' },
|
|
32
|
+
{ name: 'š CLI Guide', value: 'cli-guide' }
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
]);
|
|
36
|
+
page = selectedPage;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const pageInfo = pages[page];
|
|
40
|
+
|
|
41
|
+
if (!pageInfo) {
|
|
42
|
+
console.error(chalk.red(`ā Unknown page: ${page}`));
|
|
43
|
+
console.log(chalk.gray('\nAvailable pages:'));
|
|
44
|
+
Object.keys(pages).forEach(key => {
|
|
45
|
+
console.log(chalk.gray(` ⢠${key}`));
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
console.log(chalk.hex('#F24E1E')(`\nš Opening ${pageInfo.name}...`));
|
|
51
|
+
console.log(chalk.gray(` URL: ${pageInfo.url}\n`));
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
await open(pageInfo.url);
|
|
55
|
+
console.log(chalk.green(`ā Opened ${pageInfo.name} in your browser\n`));
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.error(chalk.red('ā Failed to open browser'));
|
|
58
|
+
console.log(chalk.gray(`\nPlease visit manually: ${pageInfo.url}\n`));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
module.exports = { openPage };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const inquirer = require('inquirer');
|
|
3
|
+
const { getAuthToken } = require('../auth');
|
|
4
|
+
const { isAuthenticated } = require('../auth');
|
|
5
|
+
const { PremiumSpinner, sleep } = require('../utils/display');
|
|
6
|
+
|
|
7
|
+
async function publish(missionId) {
|
|
8
|
+
if (!isAuthenticated()) {
|
|
9
|
+
console.error(chalk.red('ā Not authenticated. Please run: obx login'));
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
14
|
+
console.log(chalk.white.bold('š¤ PUBLISH RESEARCH'));
|
|
15
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
16
|
+
|
|
17
|
+
// If no mission ID provided, show recent missions
|
|
18
|
+
if (!missionId) {
|
|
19
|
+
console.log(chalk.gray('Usage: obx publish <mission-id>'));
|
|
20
|
+
console.log(chalk.gray('Example: obx publish mission_atlas_123\n'));
|
|
21
|
+
|
|
22
|
+
const { action } = await inquirer.prompt([
|
|
23
|
+
{
|
|
24
|
+
type: 'list',
|
|
25
|
+
name: 'action',
|
|
26
|
+
message: 'What would you like to do?',
|
|
27
|
+
choices: [
|
|
28
|
+
{ name: 'š View my recent missions', value: 'view' },
|
|
29
|
+
{ name: 'š Search for a specific mission', value: 'search' },
|
|
30
|
+
{ name: 'ā Cancel', value: 'cancel' }
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
if (action === 'cancel') return;
|
|
36
|
+
|
|
37
|
+
if (action === 'view') {
|
|
38
|
+
console.log(chalk.yellow('\nš Recent Missions (Last 10):'));
|
|
39
|
+
console.log(chalk.gray('ā'.repeat(60)));
|
|
40
|
+
|
|
41
|
+
// Simulated recent missions
|
|
42
|
+
const missions = [
|
|
43
|
+
{ id: 'mission_atlas_123', title: 'Quantum Battery Optimization', status: 'completed', date: '2026-07-01' },
|
|
44
|
+
{ id: 'mission_helix_456', title: 'CRISPR Gene Editing Analysis', status: 'completed', date: '2026-06-28' },
|
|
45
|
+
{ id: 'mission_nova_789', title: 'Neural Interface Research', status: 'completed', date: '2026-06-25' },
|
|
46
|
+
{ id: 'mission_orion_101', title: 'Sustainable Energy Materials', status: 'completed', date: '2026-06-22' },
|
|
47
|
+
{ id: 'mission_phoenix_202', title: 'AI Ethics Framework', status: 'completed', date: '2026-06-20' }
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
missions.forEach((m, i) => {
|
|
51
|
+
console.log(chalk.white(`\n${i + 1}. ${chalk.hex('#F24E1E')(m.id)}`));
|
|
52
|
+
console.log(chalk.white(` Title: ${m.title}`));
|
|
53
|
+
console.log(chalk.green(` Status: ${m.status}`));
|
|
54
|
+
console.log(chalk.gray(` Date: ${m.date}`));
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const { selectedMission } = await inquirer.prompt([
|
|
58
|
+
{
|
|
59
|
+
type: 'input',
|
|
60
|
+
name: 'selectedMission',
|
|
61
|
+
message: '\nEnter mission ID to publish:',
|
|
62
|
+
validate: (input) => input.length > 0 || 'Mission ID is required'
|
|
63
|
+
}
|
|
64
|
+
]);
|
|
65
|
+
|
|
66
|
+
missionId = selectedMission;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Publish the mission
|
|
71
|
+
const spinner = new PremiumSpinner('Preparing to publish research');
|
|
72
|
+
spinner.start();
|
|
73
|
+
await sleep(500);
|
|
74
|
+
|
|
75
|
+
spinner.update('Generating SEO-optimized page');
|
|
76
|
+
await sleep(500);
|
|
77
|
+
|
|
78
|
+
spinner.update('Adding metadata and tags');
|
|
79
|
+
await sleep(400);
|
|
80
|
+
|
|
81
|
+
spinner.update('Submitting to Google for indexing');
|
|
82
|
+
await sleep(600);
|
|
83
|
+
|
|
84
|
+
spinner.update('Enabling revenue tracking');
|
|
85
|
+
await sleep(400);
|
|
86
|
+
|
|
87
|
+
spinner.succeed('Research published successfully!');
|
|
88
|
+
|
|
89
|
+
// Generate URL
|
|
90
|
+
const slug = missionId.toLowerCase().replace(/[^a-z0-9]+/g, '-').substring(0, 60);
|
|
91
|
+
const url = `https://x.omnibiofex.cloud/research/${slug}`;
|
|
92
|
+
|
|
93
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
94
|
+
console.log(chalk.white.bold('ā
PUBLICATION DETAILS'));
|
|
95
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
96
|
+
|
|
97
|
+
console.log(chalk.white(`š Mission ID: ${chalk.hex('#F24E1E')(missionId)}`));
|
|
98
|
+
console.log(chalk.white(`š Public URL: ${chalk.blue.underline(url)}`));
|
|
99
|
+
console.log(chalk.white(`š° Revenue Share: ${chalk.green('80%')} of all ad revenue`));
|
|
100
|
+
console.log(chalk.white(`š Google Indexing: ${chalk.green('Requested')} (24 hours)`));
|
|
101
|
+
console.log(chalk.white(`š Analytics: ${chalk.green('Enabled')}`));
|
|
102
|
+
|
|
103
|
+
console.log(chalk.hex('#F24E1E')('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
104
|
+
console.log(chalk.white.bold('š° START EARNING'));
|
|
105
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
106
|
+
|
|
107
|
+
console.log(chalk.gray('Your research is now live! Here\'s what happens next:'));
|
|
108
|
+
console.log(chalk.white('\n ā Google indexes your research within 24 hours'));
|
|
109
|
+
console.log(chalk.white(' ā Readers discover it through search'));
|
|
110
|
+
console.log(chalk.white(' ā Ads are displayed to readers'));
|
|
111
|
+
console.log(chalk.white(' ā You earn 80% of all ad revenue'));
|
|
112
|
+
console.log(chalk.white(' ā Monthly payouts to your account\n'));
|
|
113
|
+
|
|
114
|
+
console.log(chalk.hex('#F24E1E')('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
115
|
+
|
|
116
|
+
const { nextAction } = await inquirer.prompt([
|
|
117
|
+
{
|
|
118
|
+
type: 'list',
|
|
119
|
+
name: 'nextAction',
|
|
120
|
+
message: 'What would you like to do next?',
|
|
121
|
+
choices: [
|
|
122
|
+
{ name: 'š View earnings dashboard', value: 'earnings' },
|
|
123
|
+
{ name: 'š¤ Publish another research', value: 'publish' },
|
|
124
|
+
{ name: 'š Open web dashboard', value: 'dashboard' },
|
|
125
|
+
{ name: 'ā
Done', value: 'done' }
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
]);
|
|
129
|
+
|
|
130
|
+
if (nextAction === 'earnings') {
|
|
131
|
+
const { earnings } = require('./earnings');
|
|
132
|
+
await earnings();
|
|
133
|
+
} else if (nextAction === 'publish') {
|
|
134
|
+
await publish();
|
|
135
|
+
} else if (nextAction === 'dashboard') {
|
|
136
|
+
const open = require('open');
|
|
137
|
+
await open('https://x.omnibiofex.cloud/dash');
|
|
138
|
+
console.log(chalk.green('\nā Opened web dashboard in your browser\n'));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
module.exports = { publish };
|
package/src/utils/display.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
|
+
const figlet = require('figlet');
|
|
3
|
+
|
|
4
|
+
// Update the banner display
|
|
5
|
+
function displayBanner(version) {
|
|
6
|
+
console.log(
|
|
7
|
+
chalk.hex('#F24E1E')(
|
|
8
|
+
figlet.textSync('OmniBioFex X', { horizontalLayout: 'full' })
|
|
9
|
+
)
|
|
10
|
+
);
|
|
11
|
+
console.log(chalk.gray(`The Autonomous Research Operating System v${version}\n`));
|
|
12
|
+
console.log(chalk.hex('#F24E1E')('Create Research. Publish It. Earn From It.\n'));
|
|
13
|
+
}
|
|
2
14
|
|
|
3
15
|
// ==================== MISSION NAMES ====================
|
|
4
16
|
const MISSION_NAMES = [
|
|
@@ -898,4 +910,6 @@ module.exports = {
|
|
|
898
910
|
displayMissionHealth,
|
|
899
911
|
displayTimeline,
|
|
900
912
|
displayMorningBriefing,
|
|
913
|
+
// ADD BANNER
|
|
914
|
+
displayBanner,
|
|
901
915
|
};
|