Skip to content

Commit d32af69

Browse files
committed
feat: Adding register command
1 parent a5d86a7 commit d32af69

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

templates/cli/index.js.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { commandDescriptions, cliConfig } = require("./lib/parser");
1212
const { client } = require("./lib/commands/generic");
1313
const inquirer = require("inquirer");
1414
{% if sdk.test != "true" %}
15-
const { login, logout, whoami, migrate } = require("./lib/commands/generic");
15+
const { login, logout, whoami, migrate, register } = require("./lib/commands/generic");
1616
const { init } = require("./lib/commands/init");
1717
const { pull } = require("./lib/commands/pull");
1818
const { run } = require("./lib/commands/run");
@@ -62,6 +62,7 @@ program
6262
.showSuggestionAfterError()
6363
{% if sdk.test != "true" %}
6464
.addCommand(whoami)
65+
.addCommand(register)
6566
.addCommand(login)
6667
.addCommand(init)
6768
.addCommand(pull)

templates/cli/lib/commands/generic.js.twig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ const whoami = new Command("whoami")
128128
drawTable(data)
129129
}));
130130

131+
const register = new Command("register")
132+
.description(commandDescriptions['register'])
133+
.action(actionRunner(async () => {
134+
log('Access https://cloud.appwrite.io/register to register an account')
135+
}));
136+
131137
const login = new Command("login")
132138
.description(commandDescriptions['login'])
133139
.option(`--email [email]`, `User email`)
@@ -299,6 +305,7 @@ module.exports = {
299305
{% if sdk.test != "true" %}
300306
loginCommand,
301307
whoami,
308+
register,
302309
login,
303310
logout,
304311
{% endif %}

templates/cli/lib/parser.js.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ const commandDescriptions = {
222222
"login": `The login command allows you to authenticate and manage a user account.`,
223223
"logout": `The logout command allows you to logout of your {{ spec.title|caseUcfirst }} account.`,
224224
"whoami": `The whoami command gives information about the currently logged in user.`,
225+
"register": `Prints link to register an {{ spec.title|caseUcfirst }} account..`,
225226
"console" : `The console command allows gives you access to the APIs used by the Appwrite console.`,
226227
"assistant": `The assistant command allows you to interact with the Appwrite Assistant AI`,
227228
"messaging": `The messaging command allows you to send messages.`,

0 commit comments

Comments
 (0)