Skip to content

Commit d99d3fa

Browse files
committed
feat(cli): add empty commands to the cli
1 parent 8055ac0 commit d99d3fa

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Ora from 'ora';
33
import { setTimeout } from 'timers/promises';
44

55
export default new Command()
6-
.command('login')
6+
.command('auth')
77
.description('Authenticate with Replexica Platform')
88
.helpOption('-h, --help', 'Show help')
99
.argument('<email>', 'Email address')

packages/cli/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ import { Command } from 'commander';
22
import Ora from 'ora';
33
import { setTimeout } from 'timers/promises';
44

5-
import loginCmd from './login.js';
5+
import authCmd from './auth.js';
6+
import translateCmd from './translate.js';
67

78
export default new Command()
89
.name('replexica')
910
.description('Replexica CLI')
1011
.helpOption('-h, --help', 'Show help')
11-
.addCommand(loginCmd)
12+
.addCommand(authCmd)
13+
.addCommand(translateCmd)
1214
.action(async (options) => {
1315
const spinner = Ora();
1416
spinner.start('Loading...');

packages/cli/src/translate.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Command } from 'commander';
2+
import Ora from 'ora';
3+
import { setTimeout } from 'timers/promises';
4+
5+
export default new Command()
6+
.command('translate')
7+
.description('Fetch translations from Replexica Platform')
8+
.helpOption('-h, --help', 'Show help')
9+
.action(async () => {
10+
const spinner = Ora();
11+
spinner.start('Fetching translations...');
12+
await setTimeout(2000);
13+
spinner.succeed('Translations fetched');
14+
});

0 commit comments

Comments
 (0)