apify-cli 0.19.3-beta.3 → 0.19.3-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -68
- package/oclif.manifest.json +1 -1
- package/package.json +5 -3
- package/src/commands/init.js +3 -2
- package/src/lib/apify-oclif-help.js +23 -0
package/README.md
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
<a href="https://travis-ci.com/apify/apify-cli?branch=master"><img src="https://travis-ci.com/apify/apify-cli.svg?branch=master" loading="lazy" alt="Build Status" style="display:inherit;" /></a>
|
|
5
5
|
|
|
6
6
|
Apify command-line interface (Apify CLI) helps you create, develop, build and run
|
|
7
|
-
[Apify
|
|
7
|
+
[Apify Actors](https://www.apify.com/actors),
|
|
8
8
|
and manage the Apify cloud platform from any computer.
|
|
9
9
|
|
|
10
|
-
Apify
|
|
10
|
+
Apify Actors are cloud programs that can perform arbitrary web scraping, automation or data processing job.
|
|
11
11
|
They accept input, perform their job and generate output.
|
|
12
|
-
While you can develop
|
|
13
|
-
for complex projects it is more convenient to develop
|
|
12
|
+
While you can develop Actors in an online IDE directly in the [Apify web application](https://console.apify.com/),
|
|
13
|
+
for complex projects it is more convenient to develop Actors locally on your computer
|
|
14
14
|
using <a href="https://github.com/apify/apify-sdk-js">Apify SDK</a>
|
|
15
|
-
and only push the
|
|
15
|
+
and only push the Actors to the Apify cloud during deployment.
|
|
16
16
|
This is where the Apify CLI comes in.
|
|
17
17
|
|
|
18
|
-
Note that
|
|
19
|
-
you can build your
|
|
18
|
+
Note that Actors running on the Apify platform are executed in Docker containers, so with an appropriate `Dockerfile`
|
|
19
|
+
you can build your Actors in any programming language.
|
|
20
20
|
However, we recommend using JavaScript / Node.js, for which we provide most libraries and support.
|
|
21
21
|
|
|
22
22
|
|
|
@@ -151,7 +151,7 @@ apify call
|
|
|
151
151
|
|
|
152
152
|
Runs the actor corresponding to the current directory on the Apify platform.
|
|
153
153
|
|
|
154
|
-
This command can also be used to run other
|
|
154
|
+
This command can also be used to run other Actors, for example:
|
|
155
155
|
|
|
156
156
|
```bash
|
|
157
157
|
apify call apify/hello-world
|
|
@@ -202,7 +202,7 @@ You can define the schema of the items in your dataset under the `storages.datas
|
|
|
202
202
|
|
|
203
203
|
## Environment variables
|
|
204
204
|
|
|
205
|
-
There are two options how you can set up environment variables for
|
|
205
|
+
There are two options how you can set up environment variables for Actors.
|
|
206
206
|
|
|
207
207
|
### Set up environment variables in .actor/actor.json
|
|
208
208
|
All keys from `env` will be set as environment variables into Apify platform after you push actor to Apify. Current values on Apify will be overridden.
|
|
@@ -301,6 +301,9 @@ Commands are designed to be used in Actor runs. All commands are in PoC state, d
|
|
|
301
301
|
```
|
|
302
302
|
USAGE
|
|
303
303
|
$ apify actor
|
|
304
|
+
|
|
305
|
+
DESCRIPTION
|
|
306
|
+
Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.
|
|
304
307
|
```
|
|
305
308
|
|
|
306
309
|
_See code: [src/commands/actor/index.js](https://github.com/apify/apify-cli/blob/v0.19.3/src/commands/actor/index.js)_
|
|
@@ -312,6 +315,9 @@ Gets the actor input value from the default key-value store associated with the
|
|
|
312
315
|
```
|
|
313
316
|
USAGE
|
|
314
317
|
$ apify actor:get-input
|
|
318
|
+
|
|
319
|
+
DESCRIPTION
|
|
320
|
+
Gets the actor input value from the default key-value store associated with the actor run.
|
|
315
321
|
```
|
|
316
322
|
|
|
317
323
|
_See code: [src/commands/actor/get-input.js](https://github.com/apify/apify-cli/blob/v0.19.3/src/commands/actor/get-input.js)_
|
|
@@ -326,6 +332,9 @@ USAGE
|
|
|
326
332
|
|
|
327
333
|
ARGUMENTS
|
|
328
334
|
KEY Key of the record in key-value store
|
|
335
|
+
|
|
336
|
+
DESCRIPTION
|
|
337
|
+
Gets a value from the default key-value store associated with the actor run.
|
|
329
338
|
```
|
|
330
339
|
|
|
331
340
|
_See code: [src/commands/actor/get-value.js](https://github.com/apify/apify-cli/blob/v0.19.3/src/commands/actor/get-value.js)_
|
|
@@ -342,6 +351,7 @@ ARGUMENTS
|
|
|
342
351
|
ITEM JSON string with one object or array of objects containing data to be stored in the default dataset.
|
|
343
352
|
|
|
344
353
|
DESCRIPTION
|
|
354
|
+
Stores an object or an array of objects to the default dataset of the actor run.
|
|
345
355
|
It is possible to pass data using item argument or stdin.
|
|
346
356
|
Passing data using argument:
|
|
347
357
|
$ apify actor:push-data {"foo": "bar"}
|
|
@@ -357,21 +367,20 @@ Sets or removes record into the default key-value store associated with the Acto
|
|
|
357
367
|
|
|
358
368
|
```
|
|
359
369
|
USAGE
|
|
360
|
-
$ apify actor:set-value KEY [VALUE]
|
|
370
|
+
$ apify actor:set-value KEY [VALUE] [-c <value>]
|
|
361
371
|
|
|
362
372
|
ARGUMENTS
|
|
363
373
|
KEY Key of the record in key-value store.
|
|
364
|
-
|
|
365
374
|
VALUE Record data, which can be one of the following values:
|
|
366
375
|
- If empty, the record in the key-value store is deleted.
|
|
367
376
|
- If no `contentType` flag is specified, value is expected to be any JSON string value.
|
|
368
377
|
- If options.contentType is set, value is taken as is.
|
|
369
378
|
|
|
370
|
-
|
|
371
|
-
-c, --contentType
|
|
372
|
-
used.
|
|
379
|
+
FLAGS
|
|
380
|
+
-c, --contentType=<value> Specifies a custom MIME content type of the record. By default "application/json" is used.
|
|
373
381
|
|
|
374
382
|
DESCRIPTION
|
|
383
|
+
Sets or removes record into the default key-value store associated with the Actor run.
|
|
375
384
|
It is possible to pass data using argument or stdin.
|
|
376
385
|
Passing data using argument:
|
|
377
386
|
$ apify actor:set-value KEY my-value
|
|
@@ -387,20 +396,21 @@ Runs a specific actor remotely on the Apify cloud platform.
|
|
|
387
396
|
|
|
388
397
|
```
|
|
389
398
|
USAGE
|
|
390
|
-
$ apify call [ACTORID]
|
|
399
|
+
$ apify call [ACTORID] [-b <value>] [-t <value>] [-m <value>] [-w <value>]
|
|
391
400
|
|
|
392
401
|
ARGUMENTS
|
|
393
402
|
ACTORID Name or ID of the actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
|
|
394
403
|
command runs the remote actor specified in the ".actor/actor.json" file.
|
|
395
404
|
|
|
396
|
-
|
|
397
|
-
-b, --build
|
|
398
|
-
-m, --memory
|
|
399
|
-
-t, --timeout
|
|
400
|
-
-w, --wait-for-finish
|
|
405
|
+
FLAGS
|
|
406
|
+
-b, --build=<value> Tag or number of the build to run (e.g. "latest" or "1.2.34").
|
|
407
|
+
-m, --memory=<value> Amount of memory allocated for the actor run, in megabytes.
|
|
408
|
+
-t, --timeout=<value> Timeout for the actor run in seconds. Zero value means there is no timeout.
|
|
409
|
+
-w, --wait-for-finish=<value> Seconds for waiting to run to finish, if no value passed, it waits forever.
|
|
401
410
|
|
|
402
411
|
DESCRIPTION
|
|
403
|
-
|
|
412
|
+
Runs a specific actor remotely on the Apify cloud platform.
|
|
413
|
+
The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". It
|
|
404
414
|
takes input for the Actor from the default local key-value store by default.
|
|
405
415
|
```
|
|
406
416
|
|
|
@@ -412,18 +422,20 @@ Creates a new Actor project directory from a selected boilerplate template.
|
|
|
412
422
|
|
|
413
423
|
```
|
|
414
424
|
USAGE
|
|
415
|
-
$ apify create [ACTORNAME]
|
|
425
|
+
$ apify create [ACTORNAME] [-t <value>] [--skip-dependency-install]
|
|
416
426
|
|
|
417
427
|
ARGUMENTS
|
|
418
428
|
ACTORNAME Name of the Actor and its directory
|
|
419
429
|
|
|
420
|
-
|
|
421
|
-
-t, --template
|
|
430
|
+
FLAGS
|
|
431
|
+
-t, --template=<value> Template for the Actor. If not provided, the command will prompt for it.
|
|
422
432
|
Visit
|
|
423
433
|
https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json to
|
|
424
434
|
find available template names.
|
|
425
|
-
|
|
426
435
|
--skip-dependency-install Skip installing Actor dependencies.
|
|
436
|
+
|
|
437
|
+
DESCRIPTION
|
|
438
|
+
Creates a new Actor project directory from a selected boilerplate template.
|
|
427
439
|
```
|
|
428
440
|
|
|
429
441
|
_See code: [src/commands/create.js](https://github.com/apify/apify-cli/blob/v0.19.3/src/commands/create.js)_
|
|
@@ -437,6 +449,7 @@ USAGE
|
|
|
437
449
|
$ apify info
|
|
438
450
|
|
|
439
451
|
DESCRIPTION
|
|
452
|
+
Displays information about the currently active Apify account.
|
|
440
453
|
The information is printed to the console.
|
|
441
454
|
```
|
|
442
455
|
|
|
@@ -448,18 +461,22 @@ Initializes a new Actor project in an existing directory.
|
|
|
448
461
|
|
|
449
462
|
```
|
|
450
463
|
USAGE
|
|
451
|
-
$ apify init [ACTORNAME]
|
|
464
|
+
$ apify init [ACTORNAME] [-y]
|
|
452
465
|
|
|
453
466
|
ARGUMENTS
|
|
454
467
|
ACTORNAME Name of the Actor. If not provided, you will be prompted for it.
|
|
455
468
|
|
|
456
|
-
|
|
469
|
+
FLAGS
|
|
457
470
|
-y, --yes Automatic yes to prompts; assume "yes" as answer to all prompts. Note that in some cases, the command may
|
|
458
471
|
still ask for confirmation.
|
|
459
472
|
|
|
460
473
|
DESCRIPTION
|
|
461
|
-
|
|
462
|
-
|
|
474
|
+
Initializes a new Actor project in an existing directory.
|
|
475
|
+
If the directory contains a Scrapy project in Python, the command automatically creates wrappers so that you can run
|
|
476
|
+
your scrapers without changes.
|
|
477
|
+
|
|
478
|
+
The command creates the ".actor/actor.json" file and the "storage" directory in the current directory, but does not
|
|
479
|
+
touch any other existing files or directories.
|
|
463
480
|
|
|
464
481
|
WARNING: The directory at "storage" will be overwritten if it already exists.
|
|
465
482
|
```
|
|
@@ -472,13 +489,14 @@ Logs in to your Apify account using a provided API token.
|
|
|
472
489
|
|
|
473
490
|
```
|
|
474
491
|
USAGE
|
|
475
|
-
$ apify login
|
|
492
|
+
$ apify login [-t <value>]
|
|
476
493
|
|
|
477
|
-
|
|
478
|
-
-t, --token
|
|
494
|
+
FLAGS
|
|
495
|
+
-t, --token=<value> [Optional] Apify API token
|
|
479
496
|
|
|
480
497
|
DESCRIPTION
|
|
481
|
-
|
|
498
|
+
Logs in to your Apify account using a provided API token.
|
|
499
|
+
The API token and other account information is stored in the ~/.apify directory, from where it is read by all other
|
|
482
500
|
"apify" commands. To log out, call "apify logout".
|
|
483
501
|
```
|
|
484
502
|
|
|
@@ -493,8 +511,9 @@ USAGE
|
|
|
493
511
|
$ apify logout
|
|
494
512
|
|
|
495
513
|
DESCRIPTION
|
|
514
|
+
Logs out of your Apify account.
|
|
496
515
|
The command deletes the API token and all other account information stored in the ~/.apify directory. To log in again,
|
|
497
|
-
|
|
516
|
+
call "apify login".
|
|
498
517
|
```
|
|
499
518
|
|
|
500
519
|
_See code: [src/commands/logout.js](https://github.com/apify/apify-cli/blob/v0.19.3/src/commands/logout.js)_
|
|
@@ -505,14 +524,18 @@ Pulls an Actor from the Apify platform to the current directory. If it is define
|
|
|
505
524
|
|
|
506
525
|
```
|
|
507
526
|
USAGE
|
|
508
|
-
$ apify pull [ACTORID]
|
|
527
|
+
$ apify pull [ACTORID] [-v <value>]
|
|
509
528
|
|
|
510
529
|
ARGUMENTS
|
|
511
530
|
ACTORID Name or ID of the actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
|
|
512
531
|
command will update the Actor in the current directory based on its name in ".actor/actor.json" file.
|
|
513
532
|
|
|
514
|
-
|
|
515
|
-
-v, --version
|
|
533
|
+
FLAGS
|
|
534
|
+
-v, --version=<value> Actor version number which will be pulled, e.g. 1.2. Default: the highest version
|
|
535
|
+
|
|
536
|
+
DESCRIPTION
|
|
537
|
+
Pulls an Actor from the Apify platform to the current directory. If it is defined as Git repository, it will be
|
|
538
|
+
cloned. If it is defined as Web IDE, it will fetch the files.
|
|
516
539
|
```
|
|
517
540
|
|
|
518
541
|
_See code: [src/commands/pull.js](https://github.com/apify/apify-cli/blob/v0.19.3/src/commands/pull.js)_
|
|
@@ -523,31 +546,28 @@ Uploads the actor to the Apify platform and builds it there.
|
|
|
523
546
|
|
|
524
547
|
```
|
|
525
548
|
USAGE
|
|
526
|
-
$ apify push [ACTORID]
|
|
549
|
+
$ apify push [ACTORID] [--version-number <value>] [-v <value>] [-b <value>] [-w <value>] [--no-prompt]
|
|
527
550
|
|
|
528
551
|
ARGUMENTS
|
|
529
552
|
ACTORID Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
|
|
530
553
|
command will create or modify the actor with the name specified in ".actor/actor.json" file.
|
|
531
554
|
|
|
532
|
-
|
|
533
|
-
-b, --build-tag
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
open the browser automatically.
|
|
543
|
-
|
|
544
|
-
--version-number=version-number DEPRECATED: Use flag version instead. Actor version number to which the files
|
|
545
|
-
should be pushed. By default, it is taken from the ".actor/actor.json" file.
|
|
555
|
+
FLAGS
|
|
556
|
+
-b, --build-tag=<value> Build tag to be applied to the successful Actor build. By default, it is taken from the
|
|
557
|
+
".actor/actor.json" file
|
|
558
|
+
-v, --version=<value> Actor version number to which the files should be pushed. By default, it is taken from
|
|
559
|
+
the ".actor/actor.json" file.
|
|
560
|
+
-w, --wait-for-finish=<value> Seconds for waiting to build to finish, if no value passed, it waits forever.
|
|
561
|
+
--no-prompt Do not prompt for opening the actor details in a browser. This will also not open the
|
|
562
|
+
browser automatically.
|
|
563
|
+
--version-number=<value> DEPRECATED: Use flag version instead. Actor version number to which the files should be
|
|
564
|
+
pushed. By default, it is taken from the ".actor/actor.json" file.
|
|
546
565
|
|
|
547
566
|
DESCRIPTION
|
|
548
|
-
|
|
567
|
+
Uploads the actor to the Apify platform and builds it there.
|
|
568
|
+
The Actor settings are read from the ".actor/actor.json" file in the current directory, but they can be overridden
|
|
549
569
|
using command-line options.
|
|
550
|
-
NOTE: If the source files are smaller than 3 MB then they are uploaded as
|
|
570
|
+
NOTE: If the source files are smaller than 3 MB then they are uploaded as
|
|
551
571
|
"Multiple source files", otherwise they are uploaded as "Zip file".
|
|
552
572
|
|
|
553
573
|
WARNING: If the target Actor already exists in your Apify account, it will be overwritten!
|
|
@@ -561,25 +581,23 @@ Runs the Actor locally in the current directory.
|
|
|
561
581
|
|
|
562
582
|
```
|
|
563
583
|
USAGE
|
|
564
|
-
$ apify run
|
|
584
|
+
$ apify run [-p] [--purge-queue] [--purge-dataset] [--purge-key-value-store]
|
|
565
585
|
|
|
566
|
-
|
|
586
|
+
FLAGS
|
|
567
587
|
-p, --purge Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store
|
|
568
588
|
options.
|
|
569
|
-
|
|
570
589
|
--purge-dataset Deletes the local directory containing the default dataset before the run starts.
|
|
571
|
-
|
|
572
590
|
--purge-key-value-store Deletes all records from the default key-value store in the local directory before the run
|
|
573
591
|
starts, except for the "INPUT" key.
|
|
574
|
-
|
|
575
592
|
--purge-queue Deletes the local directory containing the default request queue before the run starts.
|
|
576
593
|
|
|
577
594
|
DESCRIPTION
|
|
595
|
+
Runs the Actor locally in the current directory.
|
|
578
596
|
It sets various APIFY_XYZ environment variables in order to provide a working execution environment for the Actor. For
|
|
579
|
-
|
|
580
|
-
|
|
597
|
+
example, this causes the Actor input, as well as all other data in key-value stores, datasets or request queues to be
|
|
598
|
+
stored in the "storage" directory, rather than on the Apify platform.
|
|
581
599
|
|
|
582
|
-
NOTE: You can override the command's default behavior for Node.js actors by overriding the "start" script in the
|
|
600
|
+
NOTE: You can override the command's default behavior for Node.js actors by overriding the "start" script in the
|
|
583
601
|
package.json file. You can set up your own main file or environment variables by changing it.
|
|
584
602
|
```
|
|
585
603
|
|
|
@@ -594,21 +612,23 @@ USAGE
|
|
|
594
612
|
$ apify secrets
|
|
595
613
|
|
|
596
614
|
DESCRIPTION
|
|
615
|
+
Manages secret values for Actor environment variables.
|
|
616
|
+
|
|
597
617
|
Example:
|
|
598
618
|
$ apify secrets:add mySecret TopSecretValue123
|
|
599
619
|
|
|
600
|
-
Now the "mySecret" value can be used in an environment variable defined in ".actor/actor.json" file by adding the "@"
|
|
620
|
+
Now the "mySecret" value can be used in an environment variable defined in ".actor/actor.json" file by adding the "@"
|
|
601
621
|
prefix:
|
|
602
622
|
|
|
603
623
|
{
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
624
|
+
"actorSpecification": 1,
|
|
625
|
+
"name": "my_actor",
|
|
626
|
+
"environmentVariables": { "SECRET_ENV_VAR": "@mySecret" },
|
|
627
|
+
"version": "0.1
|
|
608
628
|
}
|
|
609
629
|
|
|
610
630
|
When the actor is pushed to Apify cloud, the "SECRET_ENV_VAR" and its value is stored as a secret environment variable
|
|
611
|
-
|
|
631
|
+
of the actor.
|
|
612
632
|
```
|
|
613
633
|
|
|
614
634
|
_See code: [src/commands/secrets/index.js](https://github.com/apify/apify-cli/blob/v0.19.3/src/commands/secrets/index.js)_
|
|
@@ -626,6 +646,7 @@ ARGUMENTS
|
|
|
626
646
|
VALUE Value of the secret
|
|
627
647
|
|
|
628
648
|
DESCRIPTION
|
|
649
|
+
Adds a new secret value.
|
|
629
650
|
The secrets are stored to a file at ~/.apify
|
|
630
651
|
```
|
|
631
652
|
|
|
@@ -641,6 +662,9 @@ USAGE
|
|
|
641
662
|
|
|
642
663
|
ARGUMENTS
|
|
643
664
|
NAME Name of the secret
|
|
665
|
+
|
|
666
|
+
DESCRIPTION
|
|
667
|
+
Removes the secret.
|
|
644
668
|
```
|
|
645
669
|
|
|
646
670
|
_See code: [src/commands/secrets/rm.js](https://github.com/apify/apify-cli/blob/v0.19.3/src/commands/secrets/rm.js)_
|
|
@@ -657,6 +681,7 @@ ARGUMENTS
|
|
|
657
681
|
PATH Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used.
|
|
658
682
|
|
|
659
683
|
DESCRIPTION
|
|
684
|
+
Validates input schema and prints errors found.
|
|
660
685
|
The input schema for the Actor is used from these locations in order of preference.
|
|
661
686
|
The first one found is validated as it would be the one used on the Apify platform.
|
|
662
687
|
1. Directly embedded object in ".actor/actor.json" under 'input' key
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.19.3","commands":{"call":{"id":"call","description":"Runs a specific actor remotely on the Apify cloud platform.\nThe Actor is run under your current Apify account. Therefore you need to be logged in by calling \"apify login\". It takes input for the Actor from the default local key-value store by default.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"build":{"name":"build","type":"option","char":"b","description":"Tag or number of the build to run (e.g. \"latest\" or \"1.2.34\").","required":false},"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout for the actor run in seconds. Zero value means there is no timeout.","required":false},"memory":{"name":"memory","type":"option","char":"m","description":"Amount of memory allocated for the actor run, in megabytes.","required":false},"wait-for-finish":{"name":"wait-for-finish","type":"option","char":"w","description":"Seconds for waiting to run to finish, if no value passed, it waits forever.","required":false}},"args":[{"name":"actorId","description":"Name or ID of the actor to run (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command runs the remote actor specified in the \".actor/actor.json\" file.","required":false}]},"check-version":{"id":"check-version","description":"Checks that installed Apify CLI version is up to date.","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":["cv"],"flags":{"enforce-update":{"name":"enforce-update","type":"boolean","char":"e","description":"[Optional] Enforce version update from NPM","required":false,"allowNo":false}},"args":[]},"create":{"id":"create","description":"Creates a new Actor project directory from a selected boilerplate template.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"template":{"name":"template","type":"option","char":"t","description":"Template for the Actor. If not provided, the command will prompt for it.\nVisit https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json to find available template names.","required":false},"skip-dependency-install":{"name":"skip-dependency-install","type":"boolean","description":"Skip installing Actor dependencies.","required":false,"allowNo":false},"template-archive-url":{"name":"template-archive-url","type":"option","description":"Actor template archive url. Useful for developing new templates.","hidden":true,"required":false}},"args":[{"name":"actorName","description":"Name of the Actor and its directory","required":false}]},"edit-input-schema":{"id":"edit-input-schema","description":"Lets you edit your input schema that would be used on the platform in a visual input schema editor.","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":["eis"],"flags":{},"args":[{"name":"path","description":"Optional path to your INPUT_SCHEMA.json file. If not provided default platform location for input schema is used.","required":false}]},"info":{"id":"info","description":"Displays information about the currently active Apify account.\nThe information is printed to the console.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"init-wrap-scrapy":{"id":"init-wrap-scrapy","description":"Wraps your existing Scrapy project to work like an Apify Actor.\n\nIt adds the following features:\n- Automatic retry of failed requests\n- Automatic proxy rotation\n- Automatic user agent rotation\n...\n","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[{"name":"path","description":"Optional path to your scrapy project. If not provided, the current directory is used.","required":false}]},"init":{"id":"init","description":"Initializes a new Actor project in an existing directory.\nThe command only creates the \".actor/actor.json\" file and the \"storage\" directory in the current directory, but will not touch anything else.\n\nWARNING: The directory at \"storage\" will be overwritten if it already exists.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Automatic yes to prompts; assume \"yes\" as answer to all prompts. Note that in some cases, the command may still ask for confirmation.","required":false,"allowNo":false}},"args":[{"name":"actorName","description":"Name of the Actor. If not provided, you will be prompted for it.","required":false}]},"login-new":{"id":"login-new","description":"Logs in to your Apify account using your API token.\nThe API token and other account information is stored in the ~/.apify directory, from where it is read by all other \"apify\" commands. To log out, call \"apify logout\".","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"[Optional] Apify API token","required":false}},"args":[]},"login":{"id":"login","description":"Logs in to your Apify account using a provided API token.\nThe API token and other account information is stored in the ~/.apify directory, from where it is read by all other \"apify\" commands. To log out, call \"apify logout\".","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"[Optional] Apify API token","required":false}},"args":[]},"logout":{"id":"logout","description":"Logs out of your Apify account.\nThe command deletes the API token and all other account information stored in the ~/.apify directory. To log in again, call \"apify login\".","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"pull":{"id":"pull","description":"Pulls an Actor from the Apify platform to the current directory. If it is defined as Git repository, it will be cloned. If it is defined as Web IDE, it will fetch the files.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"version":{"name":"version","type":"option","char":"v","description":"Actor version number which will be pulled, e.g. 1.2. Default: the highest version","required":false}},"args":[{"name":"actorId","description":"Name or ID of the actor to run (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command will update the Actor in the current directory based on its name in \".actor/actor.json\" file.","required":false}]},"push":{"id":"push","description":"Uploads the actor to the Apify platform and builds it there.\nThe Actor settings are read from the \".actor/actor.json\" file in the current directory, but they can be overridden using command-line options.\nNOTE: If the source files are smaller than 3 MB then they are uploaded as \n\"Multiple source files\", otherwise they are uploaded as \"Zip file\".\n\nWARNING: If the target Actor already exists in your Apify account, it will be overwritten!","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"version-number":{"name":"version-number","type":"option","description":"DEPRECATED: Use flag version instead. Actor version number to which the files should be pushed. By default, it is taken from the \".actor/actor.json\" file.","required":false},"version":{"name":"version","type":"option","char":"v","description":"Actor version number to which the files should be pushed. By default, it is taken from the \".actor/actor.json\" file.","required":false},"build-tag":{"name":"build-tag","type":"option","char":"b","description":"Build tag to be applied to the successful Actor build. By default, it is taken from the \".actor/actor.json\" file","required":false},"wait-for-finish":{"name":"wait-for-finish","type":"option","char":"w","description":"Seconds for waiting to build to finish, if no value passed, it waits forever.","required":false},"no-prompt":{"name":"no-prompt","type":"boolean","description":"Do not prompt for opening the actor details in a browser. This will also not open the browser automatically.","required":false,"allowNo":false}},"args":[{"name":"actorId","description":"Name or ID of the Actor to push (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command will create or modify the actor with the name specified in \".actor/actor.json\" file.","required":false}]},"run":{"id":"run","description":"Runs the Actor locally in the current directory.\nIt sets various APIFY_XYZ environment variables in order to provide a working execution environment for the Actor. For example, this causes the Actor input, as well as all other data in key-value stores, datasets or request queues to be stored in the \"storage\" directory, rather than on the Apify platform.\n\nNOTE: You can override the command's default behavior for Node.js actors by overriding the \"start\" script in the package.json file. You can set up your own main file or environment variables by changing it.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"purge":{"name":"purge","type":"boolean","char":"p","description":"Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store options.","required":false,"allowNo":false},"purge-queue":{"name":"purge-queue","type":"boolean","description":"Deletes the local directory containing the default request queue before the run starts.","required":false,"allowNo":false},"purge-dataset":{"name":"purge-dataset","type":"boolean","description":"Deletes the local directory containing the default dataset before the run starts.","required":false,"allowNo":false},"purge-key-value-store":{"name":"purge-key-value-store","type":"boolean","description":"Deletes all records from the default key-value store in the local directory before the run starts, except for the \"INPUT\" key.","required":false,"allowNo":false}},"args":[]},"vis":{"id":"vis","description":"Validates input schema and prints errors found.\nThe input schema for the Actor is used from these locations in order of preference.\nThe first one found is validated as it would be the one used on the Apify platform.\n1. Directly embedded object in \".actor/actor.json\" under 'input' key\n2. Path to JSON file referenced in \".actor/actor.json\" under 'input' key\n3. JSON file at .actor/INPUT_SCHEMA.json\n4. JSON file at INPUT_SCHEMA.json\n\nYou can also pass any custom path to your input schema to have it validated instead.\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used.","required":false}]},"actor:get-input":{"id":"actor:get-input","description":"Gets the actor input value from the default key-value store associated with the actor run.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"actor:get-value":{"id":"actor:get-value","description":"Gets a value from the default key-value store associated with the actor run.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"key","description":"Key of the record in key-value store","required":true}]},"actor":{"id":"actor","description":"Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"actor:push-data":{"id":"actor:push-data","description":"Stores an object or an array of objects to the default dataset of the actor run.\nIt is possible to pass data using item argument or stdin.\nPassing data using argument:\n$ apify actor:push-data {\"foo\": \"bar\"}\nPassing data using stdin with pipe:\n$ cat ./test.json | apify actor:push-data\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"item","description":"JSON string with one object or array of objects containing data to be stored in the default dataset.","required":false}]},"actor:set-value":{"id":"actor:set-value","description":"Sets or removes record into the default key-value store associated with the Actor run.\nIt is possible to pass data using argument or stdin.\nPassing data using argument:\n$ apify actor:set-value KEY my-value\nPassing data using stdin with pipe:\n$ cat ./my-text-file.txt | apify actor:set-value KEY --contentType text/plain\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"contentType":{"name":"contentType","type":"option","char":"c","description":"Specifies a custom MIME content type of the record. By default \"application/json\" is used.","required":false}},"args":[{"name":"key","description":"Key of the record in key-value store.","required":true},{"name":"value","description":"Record data, which can be one of the following values:\n- If empty, the record in the key-value store is deleted.\n- If no `contentType` flag is specified, value is expected to be any JSON string value.\n- If options.contentType is set, value is taken as is.","required":false}]},"secrets:add":{"id":"secrets:add","description":"Adds a new secret value.\nThe secrets are stored to a file at ~/.apify","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"Name of the secret","required":true},{"name":"value","description":"Value of the secret","required":true}]},"secrets":{"id":"secrets","description":"Manages secret values for Actor environment variables.\n\nExample:\n$ apify secrets:add mySecret TopSecretValue123\n\nNow the \"mySecret\" value can be used in an environment variable defined in \".actor/actor.json\" file by adding the \"@\" prefix:\n\n{\n \"actorSpecification\": 1,\n \"name\": \"my_actor\",\n \"environmentVariables\": { \"SECRET_ENV_VAR\": \"@mySecret\" },\n \"version\": \"0.1\n}\n\nWhen the actor is pushed to Apify cloud, the \"SECRET_ENV_VAR\" and its value is stored as a secret environment variable of the actor.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"secrets:rm":{"id":"secrets:rm","description":"Removes the secret.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"Name of the secret","required":true}]}}}
|
|
1
|
+
{"version":"0.19.3","commands":{"call":{"id":"call","description":"Runs a specific actor remotely on the Apify cloud platform.\nThe Actor is run under your current Apify account. Therefore you need to be logged in by calling \"apify login\". It takes input for the Actor from the default local key-value store by default.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"build":{"name":"build","type":"option","char":"b","description":"Tag or number of the build to run (e.g. \"latest\" or \"1.2.34\").","required":false},"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout for the actor run in seconds. Zero value means there is no timeout.","required":false},"memory":{"name":"memory","type":"option","char":"m","description":"Amount of memory allocated for the actor run, in megabytes.","required":false},"wait-for-finish":{"name":"wait-for-finish","type":"option","char":"w","description":"Seconds for waiting to run to finish, if no value passed, it waits forever.","required":false}},"args":[{"name":"actorId","description":"Name or ID of the actor to run (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command runs the remote actor specified in the \".actor/actor.json\" file.","required":false}]},"check-version":{"id":"check-version","description":"Checks that installed Apify CLI version is up to date.","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":["cv"],"flags":{"enforce-update":{"name":"enforce-update","type":"boolean","char":"e","description":"[Optional] Enforce version update from NPM","required":false,"allowNo":false}},"args":[]},"create":{"id":"create","description":"Creates a new Actor project directory from a selected boilerplate template.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"template":{"name":"template","type":"option","char":"t","description":"Template for the Actor. If not provided, the command will prompt for it.\nVisit https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json to find available template names.","required":false},"skip-dependency-install":{"name":"skip-dependency-install","type":"boolean","description":"Skip installing Actor dependencies.","required":false,"allowNo":false},"template-archive-url":{"name":"template-archive-url","type":"option","description":"Actor template archive url. Useful for developing new templates.","hidden":true,"required":false}},"args":[{"name":"actorName","description":"Name of the Actor and its directory","required":false}]},"edit-input-schema":{"id":"edit-input-schema","description":"Lets you edit your input schema that would be used on the platform in a visual input schema editor.","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":["eis"],"flags":{},"args":[{"name":"path","description":"Optional path to your INPUT_SCHEMA.json file. If not provided default platform location for input schema is used.","required":false}]},"info":{"id":"info","description":"Displays information about the currently active Apify account.\nThe information is printed to the console.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"init-wrap-scrapy":{"id":"init-wrap-scrapy","description":"Wraps your existing Scrapy project to work like an Apify Actor.\n\nIt adds the following features:\n- Automatic retry of failed requests\n- Automatic proxy rotation\n- Automatic user agent rotation\n...\n","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[{"name":"path","description":"Optional path to your scrapy project. If not provided, the current directory is used.","required":false}]},"init":{"id":"init","description":"Initializes a new Actor project in an existing directory.\nIf the directory contains a Scrapy project in Python, the command automatically creates wrappers so that you can run your scrapers without changes.\n\nThe command creates the \".actor/actor.json\" file and the \"storage\" directory in the current directory, but does not touch any other existing files or directories.\n\nWARNING: The directory at \"storage\" will be overwritten if it already exists.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Automatic yes to prompts; assume \"yes\" as answer to all prompts. Note that in some cases, the command may still ask for confirmation.","required":false,"allowNo":false}},"args":[{"name":"actorName","description":"Name of the Actor. If not provided, you will be prompted for it.","required":false}]},"login-new":{"id":"login-new","description":"Logs in to your Apify account using your API token.\nThe API token and other account information is stored in the ~/.apify directory, from where it is read by all other \"apify\" commands. To log out, call \"apify logout\".","pluginName":"apify-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"[Optional] Apify API token","required":false}},"args":[]},"login":{"id":"login","description":"Logs in to your Apify account using a provided API token.\nThe API token and other account information is stored in the ~/.apify directory, from where it is read by all other \"apify\" commands. To log out, call \"apify logout\".","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"[Optional] Apify API token","required":false}},"args":[]},"logout":{"id":"logout","description":"Logs out of your Apify account.\nThe command deletes the API token and all other account information stored in the ~/.apify directory. To log in again, call \"apify login\".","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"pull":{"id":"pull","description":"Pulls an Actor from the Apify platform to the current directory. If it is defined as Git repository, it will be cloned. If it is defined as Web IDE, it will fetch the files.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"version":{"name":"version","type":"option","char":"v","description":"Actor version number which will be pulled, e.g. 1.2. Default: the highest version","required":false}},"args":[{"name":"actorId","description":"Name or ID of the actor to run (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command will update the Actor in the current directory based on its name in \".actor/actor.json\" file.","required":false}]},"push":{"id":"push","description":"Uploads the actor to the Apify platform and builds it there.\nThe Actor settings are read from the \".actor/actor.json\" file in the current directory, but they can be overridden using command-line options.\nNOTE: If the source files are smaller than 3 MB then they are uploaded as \n\"Multiple source files\", otherwise they are uploaded as \"Zip file\".\n\nWARNING: If the target Actor already exists in your Apify account, it will be overwritten!","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"version-number":{"name":"version-number","type":"option","description":"DEPRECATED: Use flag version instead. Actor version number to which the files should be pushed. By default, it is taken from the \".actor/actor.json\" file.","required":false},"version":{"name":"version","type":"option","char":"v","description":"Actor version number to which the files should be pushed. By default, it is taken from the \".actor/actor.json\" file.","required":false},"build-tag":{"name":"build-tag","type":"option","char":"b","description":"Build tag to be applied to the successful Actor build. By default, it is taken from the \".actor/actor.json\" file","required":false},"wait-for-finish":{"name":"wait-for-finish","type":"option","char":"w","description":"Seconds for waiting to build to finish, if no value passed, it waits forever.","required":false},"no-prompt":{"name":"no-prompt","type":"boolean","description":"Do not prompt for opening the actor details in a browser. This will also not open the browser automatically.","required":false,"allowNo":false}},"args":[{"name":"actorId","description":"Name or ID of the Actor to push (e.g. \"apify/hello-world\" or \"E2jjCZBezvAZnX8Rb\"). If not provided, the command will create or modify the actor with the name specified in \".actor/actor.json\" file.","required":false}]},"run":{"id":"run","description":"Runs the Actor locally in the current directory.\nIt sets various APIFY_XYZ environment variables in order to provide a working execution environment for the Actor. For example, this causes the Actor input, as well as all other data in key-value stores, datasets or request queues to be stored in the \"storage\" directory, rather than on the Apify platform.\n\nNOTE: You can override the command's default behavior for Node.js actors by overriding the \"start\" script in the package.json file. You can set up your own main file or environment variables by changing it.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"purge":{"name":"purge","type":"boolean","char":"p","description":"Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store options.","required":false,"allowNo":false},"purge-queue":{"name":"purge-queue","type":"boolean","description":"Deletes the local directory containing the default request queue before the run starts.","required":false,"allowNo":false},"purge-dataset":{"name":"purge-dataset","type":"boolean","description":"Deletes the local directory containing the default dataset before the run starts.","required":false,"allowNo":false},"purge-key-value-store":{"name":"purge-key-value-store","type":"boolean","description":"Deletes all records from the default key-value store in the local directory before the run starts, except for the \"INPUT\" key.","required":false,"allowNo":false}},"args":[]},"vis":{"id":"vis","description":"Validates input schema and prints errors found.\nThe input schema for the Actor is used from these locations in order of preference.\nThe first one found is validated as it would be the one used on the Apify platform.\n1. Directly embedded object in \".actor/actor.json\" under 'input' key\n2. Path to JSON file referenced in \".actor/actor.json\" under 'input' key\n3. JSON file at .actor/INPUT_SCHEMA.json\n4. JSON file at INPUT_SCHEMA.json\n\nYou can also pass any custom path to your input schema to have it validated instead.\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used.","required":false}]},"actor:get-input":{"id":"actor:get-input","description":"Gets the actor input value from the default key-value store associated with the actor run.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"actor:get-value":{"id":"actor:get-value","description":"Gets a value from the default key-value store associated with the actor run.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"key","description":"Key of the record in key-value store","required":true}]},"actor":{"id":"actor","description":"Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"actor:push-data":{"id":"actor:push-data","description":"Stores an object or an array of objects to the default dataset of the actor run.\nIt is possible to pass data using item argument or stdin.\nPassing data using argument:\n$ apify actor:push-data {\"foo\": \"bar\"}\nPassing data using stdin with pipe:\n$ cat ./test.json | apify actor:push-data\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"item","description":"JSON string with one object or array of objects containing data to be stored in the default dataset.","required":false}]},"actor:set-value":{"id":"actor:set-value","description":"Sets or removes record into the default key-value store associated with the Actor run.\nIt is possible to pass data using argument or stdin.\nPassing data using argument:\n$ apify actor:set-value KEY my-value\nPassing data using stdin with pipe:\n$ cat ./my-text-file.txt | apify actor:set-value KEY --contentType text/plain\n","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{"contentType":{"name":"contentType","type":"option","char":"c","description":"Specifies a custom MIME content type of the record. By default \"application/json\" is used.","required":false}},"args":[{"name":"key","description":"Key of the record in key-value store.","required":true},{"name":"value","description":"Record data, which can be one of the following values:\n- If empty, the record in the key-value store is deleted.\n- If no `contentType` flag is specified, value is expected to be any JSON string value.\n- If options.contentType is set, value is taken as is.","required":false}]},"secrets:add":{"id":"secrets:add","description":"Adds a new secret value.\nThe secrets are stored to a file at ~/.apify","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"Name of the secret","required":true},{"name":"value","description":"Value of the secret","required":true}]},"secrets":{"id":"secrets","description":"Manages secret values for Actor environment variables.\n\nExample:\n$ apify secrets:add mySecret TopSecretValue123\n\nNow the \"mySecret\" value can be used in an environment variable defined in \".actor/actor.json\" file by adding the \"@\" prefix:\n\n{\n \"actorSpecification\": 1,\n \"name\": \"my_actor\",\n \"environmentVariables\": { \"SECRET_ENV_VAR\": \"@mySecret\" },\n \"version\": \"0.1\n}\n\nWhen the actor is pushed to Apify cloud, the \"SECRET_ENV_VAR\" and its value is stored as a secret environment variable of the actor.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"secrets:rm":{"id":"secrets:rm","description":"Removes the secret.","pluginName":"apify-cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"Name of the secret","required":true}]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify-cli",
|
|
3
|
-
"version": "0.19.3-beta.
|
|
4
|
-
"description": "Apify command-line interface helps you
|
|
3
|
+
"version": "0.19.3-beta.5",
|
|
4
|
+
"description": "Apify command-line interface (CLI) helps you manage the Apify cloud platform and develop, build, and deploy Apify Actors.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "cross-env APIFY_CLI_SKIP_UPDATE_CHECK=1 vitest run",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"@crawlee/memory-storage": "^3.5.8",
|
|
61
61
|
"@oclif/command": "^1.8.36",
|
|
62
62
|
"@oclif/config": "^1.18.17",
|
|
63
|
+
"@oclif/core": "^2.15.0",
|
|
63
64
|
"@oclif/errors": "^1.3.6",
|
|
64
65
|
"@oclif/plugin-commands": "^2.1.0",
|
|
65
66
|
"@oclif/plugin-help": "^5.1.12",
|
|
@@ -109,6 +110,7 @@
|
|
|
109
110
|
"init": [
|
|
110
111
|
"./src/hooks/init"
|
|
111
112
|
]
|
|
112
|
-
}
|
|
113
|
+
},
|
|
114
|
+
"helpClass": "./src/lib/apify-oclif-help"
|
|
113
115
|
}
|
|
114
116
|
}
|
package/src/commands/init.js
CHANGED
|
@@ -60,8 +60,9 @@ class InitCommand extends ApifyCommand {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
InitCommand.description = 'Initializes a new Actor project in an existing directory.\n'
|
|
63
|
-
+ `
|
|
64
|
-
+
|
|
63
|
+
+ `If the directory contains a Scrapy project in Python, the command automatically creates wrappers so that you can run your scrapers without changes.\n\n`
|
|
64
|
+
+ `The command creates the "${LOCAL_CONFIG_PATH}" file and the "${DEFAULT_LOCAL_STORAGE_DIR}" directory in the current directory, `
|
|
65
|
+
+ 'but does not touch any other existing files or directories.\n\n'
|
|
65
66
|
+ `WARNING: The directory at "${DEFAULT_LOCAL_STORAGE_DIR}" will be overwritten if it already exists.`;
|
|
66
67
|
|
|
67
68
|
InitCommand.args = [
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const { Help } = require('@oclif/core');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Custom help class that overrides how oclif renders help screens.
|
|
5
|
+
*
|
|
6
|
+
* It is registered through package.json.
|
|
7
|
+
*
|
|
8
|
+
* Refer to the oclif documentation for more information:
|
|
9
|
+
* https://oclif.io/docs/help_classes/#custom-help
|
|
10
|
+
*
|
|
11
|
+
* Note: The CLI was crashing when printing help with the latest oclif packages. Be careful when upgrading.
|
|
12
|
+
*/
|
|
13
|
+
module.exports = class ApifyOclifHelp extends Help {
|
|
14
|
+
showRootHelp() {
|
|
15
|
+
super.showRootHelp();
|
|
16
|
+
|
|
17
|
+
this.log(this.section(
|
|
18
|
+
'TROUBLESHOOTING',
|
|
19
|
+
this.wrap(
|
|
20
|
+
'For general support, reach out to us at https://apify.com/contact\n\n'
|
|
21
|
+
+ 'If you believe you are encountering a bug, file it at https://github.com/apify/apify-cli/issues/new')));
|
|
22
|
+
}
|
|
23
|
+
};
|