Skip to content

Commit abae9cc

Browse files
committed
added access-key command
1 parent 3b4744b commit abae9cc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/cli/src/commands/access_key.ts renamed to packages/cli/src/commands/access-key.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import cli from "cli-ux";
1010
import {AppControllerInterface, createAnonSocketClient, HomeAccountConfig} from "@deepkit/core";
1111

1212
export class AccessKeyCommand extends Command {
13-
static description = 'Generates a access_key that can be used in notebooks or api calls';
13+
static description = 'Generates an access-key that can be used in notebooks or api calls';
1414

1515
public static args = [
1616
{
@@ -47,8 +47,10 @@ export class AccessKeyCommand extends Command {
4747

4848
const app = client.controller<AppControllerInterface>('app');
4949

50+
console.log(`Connecting to ${account.host}`);
51+
5052
const username = await cli.prompt('username', {required: true});
51-
const password = await cli.prompt('password', {required: true, type: 'mask'});
53+
const password = await cli.prompt('password', {required: true, type: 'hide'});
5254

5355
const token = await app.login(username, password);
5456
client.disconnect();

packages/cli/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {InstallDockerCommand} from "./commands/install-docker";
1515
import {InstallNvidiaCommand} from "./commands/install-nvidia";
1616
import {AuthCommand} from "./commands/auth";
1717
import {isElectronEnvironment} from "@deepkit/core";
18+
import {AccessKeyCommand} from "./commands/access-key";
1819

1920
(global as any).WebSocket = require('ws');
2021

@@ -28,6 +29,7 @@ const commandsMap: { [name: string]: any } = {
2829
'start': StartCommand,
2930
// 'test': TestCommand,
3031
'os': OSCommand,
32+
'access-key': AccessKeyCommand,
3133
'install-docker': InstallDockerCommand,
3234
'install-nvidia': InstallNvidiaCommand,
3335
};

0 commit comments

Comments
 (0)