apify-cli 0.19.3-beta.4 → 1.0.0-beta.0
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 +87 -63
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +16 -0
- package/bin/run.js +16 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/commands/actor/get-input.d.ts +6 -0
- package/dist/commands/actor/get-input.d.ts.map +1 -0
- package/dist/commands/actor/get-input.js +14 -0
- package/dist/commands/actor/get-input.js.map +1 -0
- package/dist/commands/actor/get-value.d.ts +9 -0
- package/dist/commands/actor/get-value.d.ts.map +1 -0
- package/dist/commands/actor/get-value.js +27 -0
- package/dist/commands/actor/get-value.js.map +1 -0
- package/dist/commands/actor/index.d.ts +6 -0
- package/dist/commands/actor/index.d.ts.map +1 -0
- package/dist/commands/actor/index.js +13 -0
- package/dist/commands/actor/index.js.map +1 -0
- package/dist/commands/actor/push-data.d.ts +11 -0
- package/dist/commands/actor/push-data.d.ts.map +1 -0
- package/dist/commands/actor/push-data.js +56 -0
- package/dist/commands/actor/push-data.js.map +1 -0
- package/dist/commands/actor/set-value.d.ts +15 -0
- package/dist/commands/actor/set-value.d.ts.map +1 -0
- package/dist/commands/actor/set-value.js +76 -0
- package/dist/commands/actor/set-value.js.map +1 -0
- package/dist/commands/call.d.ts +15 -0
- package/dist/commands/call.d.ts.map +1 -0
- package/dist/commands/call.js +142 -0
- package/dist/commands/call.js.map +1 -0
- package/dist/commands/check-version.d.ts +11 -0
- package/dist/commands/check-version.d.ts.map +1 -0
- package/dist/commands/check-version.js +39 -0
- package/dist/commands/check-version.js.map +1 -0
- package/dist/commands/create.d.ts +14 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +181 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/edit-input-schema.d.ts +11 -0
- package/dist/commands/edit-input-schema.d.ts.map +1 -0
- package/{src → dist}/commands/edit-input-schema.js +81 -85
- package/dist/commands/edit-input-schema.js.map +1 -0
- package/dist/commands/info.d.ts +6 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +26 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init-wrap-scrapy.d.ts +10 -0
- package/dist/commands/init-wrap-scrapy.d.ts.map +1 -0
- package/dist/commands/init-wrap-scrapy.js +41 -0
- package/dist/commands/init-wrap-scrapy.js.map +1 -0
- package/dist/commands/init.d.ts +12 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +88 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login-new.d.ts +10 -0
- package/dist/commands/login-new.d.ts.map +1 -0
- package/{src → dist}/commands/login-new.js +79 -82
- package/dist/commands/login-new.js.map +1 -0
- package/dist/commands/login.d.ts +9 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +43 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +6 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +20 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/pull.d.ts +12 -0
- package/dist/commands/pull.d.ts.map +1 -0
- package/dist/commands/pull.js +148 -0
- package/dist/commands/pull.js.map +1 -0
- package/dist/commands/push.d.ts +16 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +242 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/commands/run.d.ts +12 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/{src → dist}/commands/run.js +96 -109
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/secrets/add.d.ts +10 -0
- package/dist/commands/secrets/add.d.ts.map +1 -0
- package/dist/commands/secrets/add.js +31 -0
- package/dist/commands/secrets/add.js.map +1 -0
- package/dist/commands/secrets/index.d.ts +6 -0
- package/dist/commands/secrets/index.d.ts.map +1 -0
- package/dist/commands/secrets/index.js +24 -0
- package/dist/commands/secrets/index.js.map +1 -0
- package/dist/commands/secrets/rm.d.ts +9 -0
- package/dist/commands/secrets/rm.d.ts.map +1 -0
- package/dist/commands/secrets/rm.js +27 -0
- package/dist/commands/secrets/rm.js.map +1 -0
- package/dist/commands/vis.d.ts +9 -0
- package/dist/commands/vis.d.ts.map +1 -0
- package/dist/commands/vis.js +52 -0
- package/dist/commands/vis.js.map +1 -0
- package/dist/hooks/init.d.ts +7 -0
- package/dist/hooks/init.d.ts.map +1 -0
- package/dist/hooks/init.js +17 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actor.d.ts +27 -0
- package/dist/lib/actor.d.ts.map +1 -0
- package/{src → dist}/lib/actor.js +21 -44
- package/dist/lib/actor.js.map +1 -0
- package/dist/lib/apify-oclif-help.d.ts +15 -0
- package/dist/lib/apify-oclif-help.d.ts.map +1 -0
- package/dist/lib/apify-oclif-help.js +19 -0
- package/dist/lib/apify-oclif-help.js.map +1 -0
- package/dist/lib/apify_command.d.ts +22 -0
- package/dist/lib/apify_command.d.ts.map +1 -0
- package/dist/lib/apify_command.js +103 -0
- package/dist/lib/apify_command.js.map +1 -0
- package/dist/lib/community.d.ts +2 -0
- package/dist/lib/community.d.ts.map +1 -0
- package/dist/lib/community.js +4 -0
- package/dist/lib/community.js.map +1 -0
- package/dist/lib/consts.d.ts +45 -0
- package/dist/lib/consts.d.ts.map +1 -0
- package/dist/lib/consts.js +54 -0
- package/dist/lib/consts.js.map +1 -0
- package/dist/lib/create-utils.d.ts +8 -0
- package/dist/lib/create-utils.d.ts.map +1 -0
- package/{src → dist}/lib/create-utils.js +74 -113
- package/dist/lib/create-utils.js.map +1 -0
- package/dist/lib/exec.d.ts +4 -0
- package/dist/lib/exec.d.ts.map +1 -0
- package/{src → dist}/lib/exec.js +15 -16
- package/dist/lib/exec.js.map +1 -0
- package/dist/lib/files.d.ts +14 -0
- package/dist/lib/files.d.ts.map +1 -0
- package/dist/lib/files.js +58 -0
- package/dist/lib/files.js.map +1 -0
- package/dist/lib/input_schema.d.ts +26 -0
- package/dist/lib/input_schema.d.ts.map +1 -0
- package/{src → dist}/lib/input_schema.js +34 -55
- package/dist/lib/input_schema.js.map +1 -0
- package/dist/lib/local_state.d.ts +11 -0
- package/dist/lib/local_state.d.ts.map +1 -0
- package/dist/lib/local_state.js +27 -0
- package/dist/lib/local_state.js.map +1 -0
- package/dist/lib/outputs.d.ts +7 -0
- package/dist/lib/outputs.d.ts.map +1 -0
- package/{src → dist}/lib/outputs.js +8 -15
- package/dist/lib/outputs.js.map +1 -0
- package/dist/lib/project_analyzer.d.ts +4 -0
- package/dist/lib/project_analyzer.d.ts.map +1 -0
- package/{src → dist}/lib/project_analyzer.js +6 -11
- package/dist/lib/project_analyzer.js.map +1 -0
- package/dist/lib/projects/CrawleeAnalyzer.d.ts +4 -0
- package/dist/lib/projects/CrawleeAnalyzer.d.ts.map +1 -0
- package/{src → dist}/lib/projects/CrawleeAnalyzer.js +7 -24
- package/dist/lib/projects/CrawleeAnalyzer.js.map +1 -0
- package/dist/lib/projects/OldApifySDKAnalyzer.d.ts +4 -0
- package/dist/lib/projects/OldApifySDKAnalyzer.d.ts.map +1 -0
- package/{src → dist}/lib/projects/OldApifySDKAnalyzer.js +9 -32
- package/dist/lib/projects/OldApifySDKAnalyzer.js.map +1 -0
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts +17 -0
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts.map +1 -0
- package/{src/lib/scrapy-wrapper → dist/lib/projects/scrapy}/ScrapyProjectAnalyzer.js +33 -36
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js.map +1 -0
- package/dist/lib/projects/scrapy/Spider.d.ts +14 -0
- package/dist/lib/projects/scrapy/Spider.d.ts.map +1 -0
- package/dist/lib/projects/scrapy/Spider.js +33 -0
- package/dist/lib/projects/scrapy/Spider.js.map +1 -0
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts +7 -0
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts.map +1 -0
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js +25 -0
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js.map +1 -0
- package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts +4 -0
- package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts.map +1 -0
- package/{src/lib/scrapy-wrapper/index.js → dist/lib/projects/scrapy/wrapScrapyProject.js} +43 -73
- package/dist/lib/projects/scrapy/wrapScrapyProject.js.map +1 -0
- package/dist/lib/projects/shared.d.ts +2 -0
- package/dist/lib/projects/shared.d.ts.map +1 -0
- package/dist/lib/projects/shared.js +13 -0
- package/dist/lib/projects/shared.js.map +1 -0
- package/dist/lib/secrets.d.ts +22 -0
- package/dist/lib/secrets.d.ts.map +1 -0
- package/{src → dist}/lib/secrets.js +32 -40
- package/dist/lib/secrets.js.map +1 -0
- package/dist/lib/telemetry.d.ts +21 -0
- package/dist/lib/telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry.js +87 -0
- package/dist/lib/telemetry.js.map +1 -0
- package/dist/lib/types.d.ts +11 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +106 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/{src → dist}/lib/utils.js +235 -347
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/version_check.d.ts +14 -0
- package/dist/lib/version_check.d.ts.map +1 -0
- package/{src → dist}/lib/version_check.js +25 -54
- package/dist/lib/version_check.js.map +1 -0
- package/oclif.manifest.json +722 -1
- package/package.json +137 -113
- package/index.js +0 -1
- package/src/bin/run +0 -16
- package/src/commands/actor/get-input.js +0 -12
- package/src/commands/actor/get-value.js +0 -23
- package/src/commands/actor/index.js +0 -13
- package/src/commands/actor/push-data.js +0 -44
- package/src/commands/actor/set-value.js +0 -63
- package/src/commands/call.js +0 -131
- package/src/commands/check-version.js +0 -28
- package/src/commands/create.js +0 -203
- package/src/commands/info.js +0 -24
- package/src/commands/init-wrap-scrapy.js +0 -34
- package/src/commands/init.js +0 -83
- package/src/commands/login.js +0 -40
- package/src/commands/logout.js +0 -18
- package/src/commands/pull.js +0 -154
- package/src/commands/push.js +0 -234
- package/src/commands/secrets/add.js +0 -28
- package/src/commands/secrets/index.js +0 -24
- package/src/commands/secrets/rm.js +0 -23
- package/src/commands/vis.js +0 -50
- package/src/hooks/init.js +0 -16
- package/src/lib/apify-oclif-help.js +0 -23
- package/src/lib/apify_command.js +0 -82
- package/src/lib/community.js +0 -3
- package/src/lib/consts.js +0 -69
- package/src/lib/files.js +0 -76
- package/src/lib/local_state.js +0 -39
- package/src/lib/scrapy-wrapper/Spider.js +0 -10
- package/src/lib/scrapy-wrapper/SpiderFileAnalyzer.js +0 -26
- package/src/lib/telemetry.js +0 -104
- /package/{src/bin → bin}/run.cmd +0 -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.
|
|
@@ -282,6 +282,7 @@ This section contains printouts of `apify help` for all commands.
|
|
|
282
282
|
* [`apify actor:set-value KEY [VALUE]`](#apify-actorset-value-key-value)
|
|
283
283
|
* [`apify call [ACTORID]`](#apify-call-actorid)
|
|
284
284
|
* [`apify create [ACTORNAME]`](#apify-create-actorname)
|
|
285
|
+
* [`apify help [COMMANDS]`](#apify-help-commands)
|
|
285
286
|
* [`apify info`](#apify-info)
|
|
286
287
|
* [`apify init [ACTORNAME]`](#apify-init-actorname)
|
|
287
288
|
* [`apify login`](#apify-login)
|
|
@@ -306,25 +307,25 @@ DESCRIPTION
|
|
|
306
307
|
Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.
|
|
307
308
|
```
|
|
308
309
|
|
|
309
|
-
_See code: [src/commands/actor/index.
|
|
310
|
+
_See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/actor/index.ts)_
|
|
310
311
|
|
|
311
312
|
## `apify actor:get-input`
|
|
312
313
|
|
|
313
|
-
Gets the
|
|
314
|
+
Gets the Actor input value from the default key-value store associated with the Actor run.
|
|
314
315
|
|
|
315
316
|
```
|
|
316
317
|
USAGE
|
|
317
318
|
$ apify actor:get-input
|
|
318
319
|
|
|
319
320
|
DESCRIPTION
|
|
320
|
-
Gets the
|
|
321
|
+
Gets the Actor input value from the default key-value store associated with the Actor run.
|
|
321
322
|
```
|
|
322
323
|
|
|
323
|
-
_See code: [src/commands/actor/get-input.
|
|
324
|
+
_See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/actor/get-input.ts)_
|
|
324
325
|
|
|
325
326
|
## `apify actor:get-value KEY`
|
|
326
327
|
|
|
327
|
-
Gets a value from the default key-value store associated with the
|
|
328
|
+
Gets a value from the default key-value store associated with the Actor run.
|
|
328
329
|
|
|
329
330
|
```
|
|
330
331
|
USAGE
|
|
@@ -334,14 +335,14 @@ ARGUMENTS
|
|
|
334
335
|
KEY Key of the record in key-value store
|
|
335
336
|
|
|
336
337
|
DESCRIPTION
|
|
337
|
-
Gets a value from the default key-value store associated with the
|
|
338
|
+
Gets a value from the default key-value store associated with the Actor run.
|
|
338
339
|
```
|
|
339
340
|
|
|
340
|
-
_See code: [src/commands/actor/get-value.
|
|
341
|
+
_See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/actor/get-value.ts)_
|
|
341
342
|
|
|
342
343
|
## `apify actor:push-data [ITEM]`
|
|
343
344
|
|
|
344
|
-
Stores an object or an array of objects to the default dataset of the
|
|
345
|
+
Stores an object or an array of objects to the default dataset of the Actor run.
|
|
345
346
|
|
|
346
347
|
```
|
|
347
348
|
USAGE
|
|
@@ -351,7 +352,7 @@ ARGUMENTS
|
|
|
351
352
|
ITEM JSON string with one object or array of objects containing data to be stored in the default dataset.
|
|
352
353
|
|
|
353
354
|
DESCRIPTION
|
|
354
|
-
Stores an object or an array of objects to the default dataset of the
|
|
355
|
+
Stores an object or an array of objects to the default dataset of the Actor run.
|
|
355
356
|
It is possible to pass data using item argument or stdin.
|
|
356
357
|
Passing data using argument:
|
|
357
358
|
$ apify actor:push-data {"foo": "bar"}
|
|
@@ -359,11 +360,11 @@ DESCRIPTION
|
|
|
359
360
|
$ cat ./test.json | apify actor:push-data
|
|
360
361
|
```
|
|
361
362
|
|
|
362
|
-
_See code: [src/commands/actor/push-data.
|
|
363
|
+
_See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/actor/push-data.ts)_
|
|
363
364
|
|
|
364
365
|
## `apify actor:set-value KEY [VALUE]`
|
|
365
366
|
|
|
366
|
-
Sets or removes record into the default
|
|
367
|
+
Sets or removes record into the default KeyValueStore associated with the Actor run.
|
|
367
368
|
|
|
368
369
|
```
|
|
369
370
|
USAGE
|
|
@@ -380,7 +381,7 @@ FLAGS
|
|
|
380
381
|
-c, --contentType=<value> Specifies a custom MIME content type of the record. By default "application/json" is used.
|
|
381
382
|
|
|
382
383
|
DESCRIPTION
|
|
383
|
-
Sets or removes record into the default
|
|
384
|
+
Sets or removes record into the default KeyValueStore associated with the Actor run.
|
|
384
385
|
It is possible to pass data using argument or stdin.
|
|
385
386
|
Passing data using argument:
|
|
386
387
|
$ apify actor:set-value KEY my-value
|
|
@@ -388,33 +389,33 @@ DESCRIPTION
|
|
|
388
389
|
$ cat ./my-text-file.txt | apify actor:set-value KEY --contentType text/plain
|
|
389
390
|
```
|
|
390
391
|
|
|
391
|
-
_See code: [src/commands/actor/set-value.
|
|
392
|
+
_See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/actor/set-value.ts)_
|
|
392
393
|
|
|
393
394
|
## `apify call [ACTORID]`
|
|
394
395
|
|
|
395
|
-
Runs a specific
|
|
396
|
+
Runs a specific Actor remotely on the Apify cloud platform.
|
|
396
397
|
|
|
397
398
|
```
|
|
398
399
|
USAGE
|
|
399
400
|
$ apify call [ACTORID] [-b <value>] [-t <value>] [-m <value>] [-w <value>]
|
|
400
401
|
|
|
401
402
|
ARGUMENTS
|
|
402
|
-
ACTORID Name or ID of the
|
|
403
|
-
command runs the remote
|
|
403
|
+
ACTORID Name or ID of the Actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
|
|
404
|
+
command runs the remote Actor specified in the ".actor/actor.json" file.
|
|
404
405
|
|
|
405
406
|
FLAGS
|
|
406
407
|
-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
|
|
408
|
-
-t, --timeout=<value> Timeout for the
|
|
408
|
+
-m, --memory=<value> Amount of memory allocated for the Actor run, in megabytes.
|
|
409
|
+
-t, --timeout=<value> Timeout for the Actor run in seconds. Zero value means there is no timeout.
|
|
409
410
|
-w, --wait-for-finish=<value> Seconds for waiting to run to finish, if no value passed, it waits forever.
|
|
410
411
|
|
|
411
412
|
DESCRIPTION
|
|
412
|
-
Runs a specific
|
|
413
|
+
Runs a specific Actor remotely on the Apify cloud platform.
|
|
413
414
|
The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". It
|
|
414
415
|
takes input for the Actor from the default local key-value store by default.
|
|
415
416
|
```
|
|
416
417
|
|
|
417
|
-
_See code: [src/commands/call.
|
|
418
|
+
_See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/call.ts)_
|
|
418
419
|
|
|
419
420
|
## `apify create [ACTORNAME]`
|
|
420
421
|
|
|
@@ -428,17 +429,37 @@ ARGUMENTS
|
|
|
428
429
|
ACTORNAME Name of the Actor and its directory
|
|
429
430
|
|
|
430
431
|
FLAGS
|
|
431
|
-
-t, --template=<value>
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
432
|
+
-t, --template=<value> Template for the Actor. If not provided, the command will prompt for it.
|
|
433
|
+
Visit
|
|
434
|
+
https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json
|
|
435
|
+
to find available template names.
|
|
436
|
+
--skip-dependency-install Skip installing Actor dependencies.
|
|
436
437
|
|
|
437
438
|
DESCRIPTION
|
|
438
439
|
Creates a new Actor project directory from a selected boilerplate template.
|
|
439
440
|
```
|
|
440
441
|
|
|
441
|
-
_See code: [src/commands/create.
|
|
442
|
+
_See code: [src/commands/create.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/create.ts)_
|
|
443
|
+
|
|
444
|
+
## `apify help [COMMANDS]`
|
|
445
|
+
|
|
446
|
+
Display help for apify.
|
|
447
|
+
|
|
448
|
+
```
|
|
449
|
+
USAGE
|
|
450
|
+
$ apify help [COMMANDS] [-n]
|
|
451
|
+
|
|
452
|
+
ARGUMENTS
|
|
453
|
+
COMMANDS Command to show help for.
|
|
454
|
+
|
|
455
|
+
FLAGS
|
|
456
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
457
|
+
|
|
458
|
+
DESCRIPTION
|
|
459
|
+
Display help for apify.
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.14/src/commands/help.ts)_
|
|
442
463
|
|
|
443
464
|
## `apify info`
|
|
444
465
|
|
|
@@ -453,7 +474,7 @@ DESCRIPTION
|
|
|
453
474
|
The information is printed to the console.
|
|
454
475
|
```
|
|
455
476
|
|
|
456
|
-
_See code: [src/commands/info.
|
|
477
|
+
_See code: [src/commands/info.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/info.ts)_
|
|
457
478
|
|
|
458
479
|
## `apify init [ACTORNAME]`
|
|
459
480
|
|
|
@@ -472,13 +493,16 @@ FLAGS
|
|
|
472
493
|
|
|
473
494
|
DESCRIPTION
|
|
474
495
|
Initializes a new Actor project in an existing directory.
|
|
475
|
-
|
|
476
|
-
|
|
496
|
+
If the directory contains a Scrapy project in Python, the command automatically creates wrappers so that you can run
|
|
497
|
+
your scrapers without changes.
|
|
498
|
+
|
|
499
|
+
The command creates the ".actor/actor.json" file and the "storage" directory in the current directory, but does not
|
|
500
|
+
touch any other existing files or directories.
|
|
477
501
|
|
|
478
502
|
WARNING: The directory at "storage" will be overwritten if it already exists.
|
|
479
503
|
```
|
|
480
504
|
|
|
481
|
-
_See code: [src/commands/init.
|
|
505
|
+
_See code: [src/commands/init.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/init.ts)_
|
|
482
506
|
|
|
483
507
|
## `apify login`
|
|
484
508
|
|
|
@@ -497,7 +521,7 @@ DESCRIPTION
|
|
|
497
521
|
"apify" commands. To log out, call "apify logout".
|
|
498
522
|
```
|
|
499
523
|
|
|
500
|
-
_See code: [src/commands/login.
|
|
524
|
+
_See code: [src/commands/login.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/login.ts)_
|
|
501
525
|
|
|
502
526
|
## `apify logout`
|
|
503
527
|
|
|
@@ -513,7 +537,7 @@ DESCRIPTION
|
|
|
513
537
|
call "apify login".
|
|
514
538
|
```
|
|
515
539
|
|
|
516
|
-
_See code: [src/commands/logout.
|
|
540
|
+
_See code: [src/commands/logout.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/logout.ts)_
|
|
517
541
|
|
|
518
542
|
## `apify pull [ACTORID]`
|
|
519
543
|
|
|
@@ -524,7 +548,7 @@ USAGE
|
|
|
524
548
|
$ apify pull [ACTORID] [-v <value>]
|
|
525
549
|
|
|
526
550
|
ARGUMENTS
|
|
527
|
-
ACTORID Name or ID of the
|
|
551
|
+
ACTORID Name or ID of the Actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
|
|
528
552
|
command will update the Actor in the current directory based on its name in ".actor/actor.json" file.
|
|
529
553
|
|
|
530
554
|
FLAGS
|
|
@@ -535,11 +559,11 @@ DESCRIPTION
|
|
|
535
559
|
cloned. If it is defined as Web IDE, it will fetch the files.
|
|
536
560
|
```
|
|
537
561
|
|
|
538
|
-
_See code: [src/commands/pull.
|
|
562
|
+
_See code: [src/commands/pull.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/pull.ts)_
|
|
539
563
|
|
|
540
564
|
## `apify push [ACTORID]`
|
|
541
565
|
|
|
542
|
-
Uploads the
|
|
566
|
+
Uploads the Actor to the Apify platform and builds it there.
|
|
543
567
|
|
|
544
568
|
```
|
|
545
569
|
USAGE
|
|
@@ -547,7 +571,7 @@ USAGE
|
|
|
547
571
|
|
|
548
572
|
ARGUMENTS
|
|
549
573
|
ACTORID Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
|
|
550
|
-
command will create or modify the
|
|
574
|
+
command will create or modify the Actor with the name specified in ".actor/actor.json" file.
|
|
551
575
|
|
|
552
576
|
FLAGS
|
|
553
577
|
-b, --build-tag=<value> Build tag to be applied to the successful Actor build. By default, it is taken from the
|
|
@@ -555,13 +579,13 @@ FLAGS
|
|
|
555
579
|
-v, --version=<value> Actor version number to which the files should be pushed. By default, it is taken from
|
|
556
580
|
the ".actor/actor.json" file.
|
|
557
581
|
-w, --wait-for-finish=<value> Seconds for waiting to build to finish, if no value passed, it waits forever.
|
|
558
|
-
|
|
582
|
+
--no-prompt Do not prompt for opening the Actor details in a browser. This will also not open the
|
|
559
583
|
browser automatically.
|
|
560
|
-
|
|
584
|
+
--version-number=<value> DEPRECATED: Use flag version instead. Actor version number to which the files should be
|
|
561
585
|
pushed. By default, it is taken from the ".actor/actor.json" file.
|
|
562
586
|
|
|
563
587
|
DESCRIPTION
|
|
564
|
-
Uploads the
|
|
588
|
+
Uploads the Actor to the Apify platform and builds it there.
|
|
565
589
|
The Actor settings are read from the ".actor/actor.json" file in the current directory, but they can be overridden
|
|
566
590
|
using command-line options.
|
|
567
591
|
NOTE: If the source files are smaller than 3 MB then they are uploaded as
|
|
@@ -570,7 +594,7 @@ DESCRIPTION
|
|
|
570
594
|
WARNING: If the target Actor already exists in your Apify account, it will be overwritten!
|
|
571
595
|
```
|
|
572
596
|
|
|
573
|
-
_See code: [src/commands/push.
|
|
597
|
+
_See code: [src/commands/push.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/push.ts)_
|
|
574
598
|
|
|
575
599
|
## `apify run`
|
|
576
600
|
|
|
@@ -581,12 +605,12 @@ USAGE
|
|
|
581
605
|
$ apify run [-p] [--purge-queue] [--purge-dataset] [--purge-key-value-store]
|
|
582
606
|
|
|
583
607
|
FLAGS
|
|
584
|
-
-p, --purge
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
608
|
+
-p, --purge Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store
|
|
609
|
+
options.
|
|
610
|
+
--purge-dataset Deletes the local directory containing the default dataset before the run starts.
|
|
611
|
+
--purge-key-value-store Deletes all records from the default key-value store in the local directory before the
|
|
612
|
+
run starts, except for the "INPUT" key.
|
|
613
|
+
--purge-queue Deletes the local directory containing the default request queue before the run starts.
|
|
590
614
|
|
|
591
615
|
DESCRIPTION
|
|
592
616
|
Runs the Actor locally in the current directory.
|
|
@@ -594,11 +618,11 @@ DESCRIPTION
|
|
|
594
618
|
example, this causes the Actor input, as well as all other data in key-value stores, datasets or request queues to be
|
|
595
619
|
stored in the "storage" directory, rather than on the Apify platform.
|
|
596
620
|
|
|
597
|
-
NOTE: You can override the command's default behavior for Node.js
|
|
621
|
+
NOTE: You can override the command's default behavior for Node.js Actors by overriding the "start" script in the
|
|
598
622
|
package.json file. You can set up your own main file or environment variables by changing it.
|
|
599
623
|
```
|
|
600
624
|
|
|
601
|
-
_See code: [src/commands/run.
|
|
625
|
+
_See code: [src/commands/run.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/run.ts)_
|
|
602
626
|
|
|
603
627
|
## `apify secrets`
|
|
604
628
|
|
|
@@ -624,11 +648,11 @@ DESCRIPTION
|
|
|
624
648
|
"version": "0.1
|
|
625
649
|
}
|
|
626
650
|
|
|
627
|
-
When the
|
|
628
|
-
of the
|
|
651
|
+
When the Actor is pushed to Apify cloud, the "SECRET_ENV_VAR" and its value is stored as a secret environment variable
|
|
652
|
+
of the Actor.
|
|
629
653
|
```
|
|
630
654
|
|
|
631
|
-
_See code: [src/commands/secrets/index.
|
|
655
|
+
_See code: [src/commands/secrets/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/secrets/index.ts)_
|
|
632
656
|
|
|
633
657
|
## `apify secrets:add NAME VALUE`
|
|
634
658
|
|
|
@@ -647,7 +671,7 @@ DESCRIPTION
|
|
|
647
671
|
The secrets are stored to a file at ~/.apify
|
|
648
672
|
```
|
|
649
673
|
|
|
650
|
-
_See code: [src/commands/secrets/add.
|
|
674
|
+
_See code: [src/commands/secrets/add.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/secrets/add.ts)_
|
|
651
675
|
|
|
652
676
|
## `apify secrets:rm NAME`
|
|
653
677
|
|
|
@@ -664,7 +688,7 @@ DESCRIPTION
|
|
|
664
688
|
Removes the secret.
|
|
665
689
|
```
|
|
666
690
|
|
|
667
|
-
_See code: [src/commands/secrets/rm.
|
|
691
|
+
_See code: [src/commands/secrets/rm.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/secrets/rm.ts)_
|
|
668
692
|
|
|
669
693
|
## `apify vis [PATH]`
|
|
670
694
|
|
|
@@ -689,5 +713,5 @@ DESCRIPTION
|
|
|
689
713
|
You can also pass any custom path to your input schema to have it validated instead.
|
|
690
714
|
```
|
|
691
715
|
|
|
692
|
-
_See code: [src/commands/vis.
|
|
716
|
+
_See code: [src/commands/vis.ts](https://github.com/apify/apify-cli/blob/v1.0.0-beta.0/src/commands/vis.ts)_
|
|
693
717
|
<!-- commandsstop -->
|
package/bin/dev.cmd
ADDED
package/bin/dev.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node_modules/.bin/tsx
|
|
2
|
+
|
|
3
|
+
import { execute } from '@oclif/core';
|
|
4
|
+
|
|
5
|
+
import { error } from '../src/lib/outputs.ts';
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
await execute({ development: true, dir: import.meta.url });
|
|
9
|
+
} catch (err) {
|
|
10
|
+
const exitCode = (err.oclif && err.oclif.exit !== undefined) ? err.oclif.exit : 1;
|
|
11
|
+
if (exitCode !== 0) {
|
|
12
|
+
error(err.message);
|
|
13
|
+
if (process.env.DEBUG) console.error(err);
|
|
14
|
+
process.exit(exitCode);
|
|
15
|
+
}
|
|
16
|
+
}
|
package/bin/run.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execute } from '@oclif/core';
|
|
4
|
+
|
|
5
|
+
import { error } from '../dist/lib/outputs.js';
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
await execute({ development: false, dir: import.meta.url });
|
|
9
|
+
} catch (err) {
|
|
10
|
+
const exitCode = (err.oclif && err.oclif.exit !== undefined) ? err.oclif.exit : 1;
|
|
11
|
+
if (exitCode !== 0) {
|
|
12
|
+
error(err.message);
|
|
13
|
+
if (process.env.DEBUG) console.error(err);
|
|
14
|
+
process.exit(exitCode);
|
|
15
|
+
}
|
|
16
|
+
}
|