Skip to content

Commit 3eb21d6

Browse files
TC-MOnetmilk
andauthored
feat: rewrite command descriptions (#727)
Co-authored-by: Adam Kliment <[email protected]>
1 parent 3cb6715 commit 3eb21d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+123
-138
lines changed

src/commands/actor/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { ApifyCommand } from '../../lib/apify_command.js';
22

33
export class ActorIndexCommand extends ApifyCommand<typeof ActorIndexCommand> {
4-
static override description =
5-
'Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.\n';
4+
static override description = 'Manages runtime data operations inside of a running Actor.';
65

76
async run() {
87
await this.printHelp();

src/commands/actor/push-data.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import { error } from '../../lib/outputs.js';
77

88
export class PushDataCommand extends ApifyCommand<typeof PushDataCommand> {
99
static override description =
10-
'Stores an object or an array of objects to the default dataset of the Actor run.\n' +
11-
'It is possible to pass data using item argument or stdin.\n' +
12-
'Passing data using argument:\n' +
13-
'$ apify actor push-data {"foo": "bar"}\n' +
14-
'Passing data using stdin with pipe:\n' +
15-
'$ cat ./test.json | apify actor push-data\n';
10+
"Saves data to Actor's run default dataset.\n\n" +
11+
'Accept input as:\n' +
12+
' - JSON argument:\n' +
13+
' $ apify actor push-data {"key": "value"}\n' +
14+
' - Piped stdin:\n' +
15+
' $ cat ./test.json | apify actor push-data';
1616

1717
static override args = {
1818
item: Args.string({

src/commands/actor/set-value.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { ApifyCommand } from '../../lib/apify_command.js';
55

66
export class SetValueCommand extends ApifyCommand<typeof SetValueCommand> {
77
static override description =
8-
'Sets or removes record into the default KeyValueStore associated with the Actor run.\n' +
9-
'It is possible to pass data using argument or stdin.\n' +
8+
'Sets or removes record into the default key-value store associated with the Actor run.\n\n' +
9+
'It is possible to pass data using argument or stdin.\n\n' +
1010
'Passing data using argument:\n' +
11-
'$ apify actor set-value KEY my-value\n' +
11+
'$ apify actor set-value KEY my-value\n\n' +
1212
'Passing data using stdin with pipe:\n' +
13-
'$ cat ./my-text-file.txt | apify actor set-value KEY --contentType text/plain\n';
13+
'$ cat ./my-text-file.txt | apify actor set-value KEY --contentType text/plain';
1414

1515
static override args = {
1616
key: Args.string({

src/commands/actors/call.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ import { getLocalConfig, getLocalUserInfo, getLoggedClientOrThrow, TimestampForm
2020

2121
export class ActorsCallCommand extends ApifyCommand<typeof ActorsCallCommand> {
2222
static override description =
23-
'Runs a specific Actor remotely on the Apify cloud platform.\n' +
24-
'The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". ' +
25-
'It takes input for the Actor from the default local key-value store by default.';
23+
'Executes Actor remotely using your authenticated account.\n' +
24+
'Reads input from local key-value store by default.';
2625

2726
static override flags = {
2827
...SharedRunOnCloudFlags('Actor'),
@@ -60,7 +59,7 @@ export class ActorsCallCommand extends ApifyCommand<typeof ActorsCallCommand> {
6059
required: false,
6160
description:
6261
'Name or ID of the Actor to run (e.g. "my-actor", "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). ' +
63-
`If not provided, the command runs the remote Actor specified in the "${LOCAL_CONFIG_PATH}" file.`,
62+
`If not provided, the command runs the remote Actor specified in the '${LOCAL_CONFIG_PATH}' file.`,
6463
}),
6564
};
6665

src/commands/actors/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ApifyCommand } from '../../lib/apify_command.js';
22

33
export class ActorIndexCommand extends ApifyCommand<typeof ActorIndexCommand> {
4-
static override description = 'Commands are designed to be used with Actors.';
4+
static override description = 'Manages Actor creation, deployment, and execution on the Apify platform.';
55

66
async run() {
77
await this.printHelp();

src/commands/actors/ls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ interface HydratedListData {
9393
}
9494

9595
export class ActorsLsCommand extends ApifyCommand<typeof ActorsLsCommand> {
96-
static override description = 'Lists all recently ran Actors or your own Actors.';
96+
static override description = 'Prints a list of recently executed Actors or Actors you own.';
9797

9898
static override flags = {
9999
my: Flags.boolean({

src/commands/actors/pull.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const extractGitHubZip = async (url: string, directoryPath: string) => {
2424

2525
export class ActorsPullCommand extends ApifyCommand<typeof ActorsPullCommand> {
2626
static override description =
27-
'Pulls an Actor from the Apify platform to the current directory. ' +
28-
'If it is defined as Git repository, it will be cloned. If it is defined as Web IDE, it will fetch the files.';
27+
'Download Actor code to current directory. ' +
28+
'Clones Git repositories or fetches Actor files based on the source type.';
2929

3030
static override flags = {
3131
version: Flags.string({

src/commands/actors/push.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,20 @@ const DEFAULT_BUILD_TAG = 'latest';
4141

4242
export class ActorsPushCommand extends ApifyCommand<typeof ActorsPushCommand> {
4343
static override description =
44-
'Uploads the Actor to the Apify platform and builds it there.\n' +
45-
`The Actor settings are read from the "${LOCAL_CONFIG_PATH}" file in the current directory, but they can be overridden using command-line options.\n` +
46-
`NOTE: If the source files are smaller than ${
47-
MAX_MULTIFILE_BYTES / 1024 ** 2
48-
} MB then they are uploaded as \n` +
49-
'"Multiple source files", otherwise they are uploaded as "Zip file".\n\n' +
50-
"When there's an attempt to push files that are older than the Actor on the platform, the command will fail. Can be overwritten with --force flag.";
44+
`Deploys Actor to Apify platform using settings from '${LOCAL_CONFIG_PATH}'.\n` +
45+
`Files under '${MAX_MULTIFILE_BYTES / 1024 ** 2}' MB upload as "Multiple source files"; ` +
46+
`larger projects upload as ZIP file.\n` +
47+
`Use --force to override newer remote versions.`;
5148

5249
static override flags = {
5350
version: Flags.string({
5451
char: 'v',
55-
description: `Actor version number to which the files should be pushed. By default, it is taken from the "${LOCAL_CONFIG_PATH}" file.`,
52+
description: `Actor version number to which the files should be pushed. By default, it is taken from the '${LOCAL_CONFIG_PATH}' file.`,
5653
required: false,
5754
}),
5855
'build-tag': Flags.string({
5956
char: 'b',
60-
description: `Build tag to be applied to the successful Actor build. By default, it is taken from the "${LOCAL_CONFIG_PATH}" file`,
57+
description: `Build tag to be applied to the successful Actor build. By default, it is taken from the '${LOCAL_CONFIG_PATH}' file`,
6158
required: false,
6259
}),
6360
'wait-for-finish': Flags.string({
@@ -87,7 +84,7 @@ export class ActorsPushCommand extends ApifyCommand<typeof ActorsPushCommand> {
8784
required: false,
8885
description:
8986
'Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). ' +
90-
`If not provided, the command will create or modify the Actor with the name specified in "${LOCAL_CONFIG_PATH}" file.`,
87+
`If not provided, the command will create or modify the Actor with the name specified in '${LOCAL_CONFIG_PATH}' file.`,
9188
}),
9289
};
9390

src/commands/actors/rm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { error, info, success } from '../../lib/outputs.js';
77
import { getLoggedClientOrThrow } from '../../lib/utils.js';
88

99
export class ActorRmCommand extends ApifyCommand<typeof ActorRmCommand> {
10-
static override description = 'Deletes an Actor.';
10+
static override description = 'Permanently removes an Actor from your account.';
1111

1212
static override args = {
1313
actorId: Args.string({

src/commands/actors/start.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ import { getLocalConfig, getLocalUserInfo, getLoggedClientOrThrow, TimestampForm
1212

1313
export class ActorsStartCommand extends ApifyCommand<typeof ActorsStartCommand> {
1414
static override description =
15-
'Runs a specific Actor remotely on the Apify cloud platform and immediately returns information about the run.\n' +
16-
'The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". ' +
17-
'It takes input for the Actor from the default local key-value store by default.';
15+
'Starts Actor remotely and returns run details immediately.\n' +
16+
'Uses authenticated account and local key-value store for input.';
1817

1918
static override flags = {
2019
...SharedRunOnCloudFlags('Actor'),
@@ -42,7 +41,7 @@ export class ActorsStartCommand extends ApifyCommand<typeof ActorsStartCommand>
4241
required: false,
4342
description:
4443
'Name or ID of the Actor to run (e.g. "my-actor", "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). ' +
45-
`If not provided, the command runs the remote Actor specified in the "${LOCAL_CONFIG_PATH}" file.`,
44+
`If not provided, the command runs the remote Actor specified in the '${LOCAL_CONFIG_PATH}' file.`,
4645
}),
4746
};
4847

0 commit comments

Comments
 (0)