Skip to content

Commit a7d75d3

Browse files
committed
refactor(cli): Wording and copy
1 parent 33e894e commit a7d75d3

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

templates/cli/index.js.twig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@ program
3030
.description(commandDescriptions['main'])
3131
.configureHelp({
3232
helpWidth: process.stdout.columns || 80,
33-
sortSubcommands: true
33+
sortSubcommands: true,
3434
})
35-
.version(version, "-v, --version")
35+
.helpOption('-h, --help', "Display help for command")
36+
.version(version, "-v, --version", "Output the version number")
3637
.option("-V, --verbose", "Show complete error log")
3738
.option("-j, --json", "Output in JSON format")
3839
.hook('preAction', migrate)
3940
.option("-f,--force", "Flag to confirm all warnings")
4041
.option("-a,--all", "Flag to push all resources")
41-
.option("--id [id...]", "Flag to pass list of ids for a giving action")
42+
.option("--id [id...]", "Flag to pass a list of ids for a given action")
4243
.option("--report", "Enable reporting in case of CLI errors")
4344
.on("option:json", () => {
4445
cliConfig.json = true;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function convertReadStreamToReadableStream(readStream) {
3535
});
3636
}
3737

38-
const {{ service.name | caseLower }} = new Command("{{ service.name | caseLower }}").description(commandDescriptions['{{ service.name | caseLower }}']).configureHelp({
38+
const {{ service.name | caseLower }} = new Command("{{ service.name | caseLower }}").description(commandDescriptions['{{ service.name | caseLower }}'] ?? '').configureHelp({
3939
helpWidth: process.stdout.columns || 80
4040
})
4141

templates/cli/lib/parser.js.twig

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -203,29 +203,26 @@ const commandDescriptions = {
203203
"account": `The account command allows you to authenticate and manage a user account.`,
204204
"graphql": `The graphql command allows you to query and mutate any resource type on your Appwrite server.`,
205205
"avatars": `The avatars command aims to help you complete everyday tasks related to your app image, icons, and avatars.`,
206-
"databases": `The databases command allows you to create structured collections of documents, query and filter lists of documents.`,
207-
"init": `The init command provides a convenient wrapper for creating and initializing project, functions, collections, buckets, teams and messaging in Appwrite.`,
208-
"push": `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams and messaging.`,
209-
"run": `The run command allows you to run project locally to allow easy development and quick debugging.`,
210-
"functions": `The functions command allows you view, create and manage your Cloud Functions.`,
206+
"databases": `The databases command allows you to create structured collections of documents and query and filter lists of documents.`,
207+
"init": `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, and messaging-topics in {{ spec.title|caseUcfirst }}.`,
208+
"push": `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and messaging-topics.`,
209+
"run": `The run command allows you to run the project locally to allow easy development and quick debugging.`,
210+
"functions": `The functions command allows you to view, create, and manage your Cloud Functions.`,
211211
"health": `The health command allows you to both validate and monitor your {{ spec.title|caseUcfirst }} server's health.`,
212-
"pull": `The pull command helps you pull your {{ spec.title|caseUcfirst }} project, functions, collections, buckets, teams and messaging`,
212+
"pull": `The pull command helps you pull your {{ spec.title|caseUcfirst }} project, functions, collections, buckets, teams, and messaging-topics`,
213213
"locale": `The locale command allows you to customize your app based on your users' location.`,
214-
"projects": `The projects command allows you to view, create and manage your {{ spec.title|caseUcfirst }} projects.`,
215214
"storage": `The storage command allows you to manage your project files.`,
216-
"teams": `The teams command allows you to group users of your project and to enable them to share read and write access to your project resources`,
215+
"teams": `The teams command allows you to group users of your project to enable them to share read and write access to your project resources.`,
217216
"users": `The users command allows you to manage your project users.`,
218217
"client": `The client command allows you to configure your CLI`,
219218
"login": `The login command allows you to authenticate and manage a user account.`,
220-
"logout": `The logout command allows you to logout of your {{ spec.title|caseUcfirst }} account.`,
221-
"whoami": `The whoami command gives information about the currently signed in user.`,
219+
"logout": `The logout command allows you to log out of your {{ spec.title|caseUcfirst }} account.`,
220+
"whoami": `The whomai command gives information about the currently logged-in user.`,
222221
"register": `Outputs the link to create an {{ spec.title|caseUcfirst }} account.`,
223-
"console" : `The console command allows gives you access to the APIs used by the Appwrite console.`,
222+
"console" : `The console command gives you access to the APIs used by the Appwrite Console.`,
224223
"assistant": `The assistant command allows you to interact with the Appwrite Assistant AI`,
225-
"messaging": `The messaging command allows you to send messages.`,
224+
"messaging": `The messaging command allows you to manage topics and targets and send messages.`,
226225
"migrations": `The migrations command allows you to migrate data between services.`,
227-
"project": `The project command is for overall project administration.`,
228-
"proxy": `The proxy command allows you to configure behavior for your attached domains.`,
229226
"vcs": `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
230227
"main": chalk.redBright(`${logo}${description}`),
231228
{% if sdk.test == "true" %}

0 commit comments

Comments
 (0)