apify-cli 1.0.0 → 1.1.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/CHANGELOG.md +236 -84
- package/LICENSE.md +201 -0
- package/README.md +49 -543
- package/dist/.tsbuildinfo +1 -1
- package/dist/actor.js +3 -0
- package/dist/actor.js.map +1 -0
- package/dist/apify.js +3 -0
- package/dist/apify.js.map +1 -0
- package/dist/chunk-TJMCNXPV.js +242 -0
- package/dist/chunk-TJMCNXPV.js.map +1 -0
- package/dist/index.js +2 -3
- package/package.json +113 -89
- package/bin/dev.cmd +0 -3
- package/bin/dev.js +0 -21
- package/bin/dev.sh +0 -4
- package/bin/run.cmd +0 -3
- package/bin/run.js +0 -23
- package/dist/commands/actor/get-input.d.ts +0 -6
- package/dist/commands/actor/get-input.d.ts.map +0 -1
- package/dist/commands/actor/get-input.js +0 -14
- package/dist/commands/actor/get-input.js.map +0 -1
- package/dist/commands/actor/get-value.d.ts +0 -9
- package/dist/commands/actor/get-value.d.ts.map +0 -1
- package/dist/commands/actor/get-value.js +0 -27
- package/dist/commands/actor/get-value.js.map +0 -1
- package/dist/commands/actor/index.d.ts +0 -6
- package/dist/commands/actor/index.d.ts.map +0 -1
- package/dist/commands/actor/index.js +0 -13
- package/dist/commands/actor/index.js.map +0 -1
- package/dist/commands/actor/push-data.d.ts +0 -11
- package/dist/commands/actor/push-data.d.ts.map +0 -1
- package/dist/commands/actor/push-data.js +0 -56
- package/dist/commands/actor/push-data.js.map +0 -1
- package/dist/commands/actor/set-value.d.ts +0 -15
- package/dist/commands/actor/set-value.d.ts.map +0 -1
- package/dist/commands/actor/set-value.js +0 -76
- package/dist/commands/actor/set-value.js.map +0 -1
- package/dist/commands/call.d.ts +0 -19
- package/dist/commands/call.d.ts.map +0 -1
- package/dist/commands/call.js +0 -193
- package/dist/commands/call.js.map +0 -1
- package/dist/commands/check-version.d.ts +0 -11
- package/dist/commands/check-version.d.ts.map +0 -1
- package/dist/commands/check-version.js +0 -39
- package/dist/commands/check-version.js.map +0 -1
- package/dist/commands/create.d.ts +0 -15
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -201
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/edit-input-schema.d.ts +0 -11
- package/dist/commands/edit-input-schema.d.ts.map +0 -1
- package/dist/commands/edit-input-schema.js +0 -176
- package/dist/commands/edit-input-schema.js.map +0 -1
- package/dist/commands/info.d.ts +0 -6
- package/dist/commands/info.d.ts.map +0 -1
- package/dist/commands/info.js +0 -26
- package/dist/commands/info.js.map +0 -1
- package/dist/commands/init-wrap-scrapy.d.ts +0 -10
- package/dist/commands/init-wrap-scrapy.d.ts.map +0 -1
- package/dist/commands/init-wrap-scrapy.js +0 -41
- package/dist/commands/init-wrap-scrapy.js.map +0 -1
- package/dist/commands/init.d.ts +0 -12
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -88
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/login.d.ts +0 -10
- package/dist/commands/login.d.ts.map +0 -1
- package/dist/commands/login.js +0 -174
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/logout.d.ts +0 -6
- package/dist/commands/logout.d.ts.map +0 -1
- package/dist/commands/logout.js +0 -20
- package/dist/commands/logout.js.map +0 -1
- package/dist/commands/pull.d.ts +0 -12
- package/dist/commands/pull.d.ts.map +0 -1
- package/dist/commands/pull.js +0 -148
- package/dist/commands/pull.js.map +0 -1
- package/dist/commands/push.d.ts +0 -18
- package/dist/commands/push.d.ts.map +0 -1
- package/dist/commands/push.js +0 -298
- package/dist/commands/push.js.map +0 -1
- package/dist/commands/run.d.ts +0 -16
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -383
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/secrets/add.d.ts +0 -10
- package/dist/commands/secrets/add.d.ts.map +0 -1
- package/dist/commands/secrets/add.js +0 -31
- package/dist/commands/secrets/add.js.map +0 -1
- package/dist/commands/secrets/index.d.ts +0 -6
- package/dist/commands/secrets/index.d.ts.map +0 -1
- package/dist/commands/secrets/index.js +0 -24
- package/dist/commands/secrets/index.js.map +0 -1
- package/dist/commands/secrets/rm.d.ts +0 -9
- package/dist/commands/secrets/rm.d.ts.map +0 -1
- package/dist/commands/secrets/rm.js +0 -27
- package/dist/commands/secrets/rm.js.map +0 -1
- package/dist/commands/task/index.d.ts +0 -6
- package/dist/commands/task/index.d.ts.map +0 -1
- package/dist/commands/task/index.js +0 -13
- package/dist/commands/task/index.js.map +0 -1
- package/dist/commands/task/run.d.ts +0 -16
- package/dist/commands/task/run.d.ts.map +0 -1
- package/dist/commands/task/run.js +0 -91
- package/dist/commands/task/run.js.map +0 -1
- package/dist/commands/validate-schema.d.ts +0 -10
- package/dist/commands/validate-schema.d.ts.map +0 -1
- package/dist/commands/validate-schema.js +0 -58
- package/dist/commands/validate-schema.js.map +0 -1
- package/dist/hooks/deprecations.d.ts +0 -4
- package/dist/hooks/deprecations.d.ts.map +0 -1
- package/dist/hooks/deprecations.js +0 -18
- package/dist/hooks/deprecations.js.map +0 -1
- package/dist/hooks/init.d.ts +0 -7
- package/dist/hooks/init.d.ts.map +0 -1
- package/dist/hooks/init.js +0 -17
- package/dist/hooks/init.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/actor.d.ts +0 -27
- package/dist/lib/actor.d.ts.map +0 -1
- package/dist/lib/actor.js +0 -67
- package/dist/lib/actor.js.map +0 -1
- package/dist/lib/apify-oclif-help.d.ts +0 -15
- package/dist/lib/apify-oclif-help.d.ts.map +0 -1
- package/dist/lib/apify-oclif-help.js +0 -19
- package/dist/lib/apify-oclif-help.js.map +0 -1
- package/dist/lib/apify_command.d.ts +0 -21
- package/dist/lib/apify_command.d.ts.map +0 -1
- package/dist/lib/apify_command.js +0 -104
- package/dist/lib/apify_command.js.map +0 -1
- package/dist/lib/commands/resolve-input.d.ts +0 -5
- package/dist/lib/commands/resolve-input.d.ts.map +0 -1
- package/dist/lib/commands/resolve-input.js +0 -29
- package/dist/lib/commands/resolve-input.js.map +0 -1
- package/dist/lib/commands/run-on-cloud.d.ts +0 -20
- package/dist/lib/commands/run-on-cloud.d.ts.map +0 -1
- package/dist/lib/commands/run-on-cloud.js +0 -89
- package/dist/lib/commands/run-on-cloud.js.map +0 -1
- package/dist/lib/community.d.ts +0 -2
- package/dist/lib/community.d.ts.map +0 -1
- package/dist/lib/community.js +0 -4
- package/dist/lib/community.js.map +0 -1
- package/dist/lib/consts.d.ts +0 -54
- package/dist/lib/consts.d.ts.map +0 -1
- package/dist/lib/consts.js +0 -65
- package/dist/lib/consts.js.map +0 -1
- package/dist/lib/create-utils.d.ts +0 -8
- package/dist/lib/create-utils.d.ts.map +0 -1
- package/dist/lib/create-utils.js +0 -148
- package/dist/lib/create-utils.js.map +0 -1
- package/dist/lib/exec.d.ts +0 -3
- package/dist/lib/exec.d.ts.map +0 -1
- package/dist/lib/exec.js +0 -40
- package/dist/lib/exec.js.map +0 -1
- package/dist/lib/files.d.ts +0 -14
- package/dist/lib/files.d.ts.map +0 -1
- package/dist/lib/files.js +0 -58
- package/dist/lib/files.js.map +0 -1
- package/dist/lib/input_schema.d.ts +0 -28
- package/dist/lib/input_schema.d.ts.map +0 -1
- package/dist/lib/input_schema.js +0 -126
- package/dist/lib/input_schema.js.map +0 -1
- package/dist/lib/local_state.d.ts +0 -11
- package/dist/lib/local_state.d.ts.map +0 -1
- package/dist/lib/local_state.js +0 -27
- package/dist/lib/local_state.js.map +0 -1
- package/dist/lib/outputs.d.ts +0 -19
- package/dist/lib/outputs.d.ts.map +0 -1
- package/dist/lib/outputs.js +0 -45
- package/dist/lib/outputs.js.map +0 -1
- package/dist/lib/project_analyzer.d.ts +0 -4
- package/dist/lib/project_analyzer.d.ts.map +0 -1
- package/dist/lib/project_analyzer.js +0 -30
- package/dist/lib/project_analyzer.js.map +0 -1
- package/dist/lib/projects/CrawleeAnalyzer.d.ts +0 -4
- package/dist/lib/projects/CrawleeAnalyzer.d.ts.map +0 -1
- package/dist/lib/projects/CrawleeAnalyzer.js +0 -20
- package/dist/lib/projects/CrawleeAnalyzer.js.map +0 -1
- package/dist/lib/projects/OldApifySDKAnalyzer.d.ts +0 -4
- package/dist/lib/projects/OldApifySDKAnalyzer.d.ts.map +0 -1
- package/dist/lib/projects/OldApifySDKAnalyzer.js +0 -38
- package/dist/lib/projects/OldApifySDKAnalyzer.js.map +0 -1
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts +0 -17
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts.map +0 -1
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js +0 -87
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js.map +0 -1
- package/dist/lib/projects/scrapy/Spider.d.ts +0 -14
- package/dist/lib/projects/scrapy/Spider.d.ts.map +0 -1
- package/dist/lib/projects/scrapy/Spider.js +0 -33
- package/dist/lib/projects/scrapy/Spider.js.map +0 -1
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts +0 -7
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts.map +0 -1
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js +0 -25
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js.map +0 -1
- package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts +0 -4
- package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts.map +0 -1
- package/dist/lib/projects/scrapy/wrapScrapyProject.js +0 -109
- package/dist/lib/projects/scrapy/wrapScrapyProject.js.map +0 -1
- package/dist/lib/projects/shared.d.ts +0 -2
- package/dist/lib/projects/shared.d.ts.map +0 -1
- package/dist/lib/projects/shared.js +0 -13
- package/dist/lib/projects/shared.js.map +0 -1
- package/dist/lib/secrets.d.ts +0 -22
- package/dist/lib/secrets.d.ts.map +0 -1
- package/dist/lib/secrets.js +0 -104
- package/dist/lib/secrets.js.map +0 -1
- package/dist/lib/telemetry.d.ts +0 -21
- package/dist/lib/telemetry.d.ts.map +0 -1
- package/dist/lib/telemetry.js +0 -87
- package/dist/lib/telemetry.js.map +0 -1
- package/dist/lib/types.d.ts +0 -11
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/types.js +0 -2
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -102
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -577
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/version_check.d.ts +0 -14
- package/dist/lib/version_check.d.ts.map +0 -1
- package/dist/lib/version_check.js +0 -90
- package/dist/lib/version_check.js.map +0 -1
- package/oclif.manifest.json +0 -867
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Apify command-line interface (Apify CLI)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/apify-cli)
|
|
4
|
+
[](https://github.com/apify/apify-cli/actions/workflows/check.yaml)
|
|
5
5
|
|
|
6
6
|
Apify command-line interface (Apify CLI) helps you create, develop, build and run
|
|
7
7
|
[Apify Actors](https://www.apify.com/actors),
|
|
@@ -19,9 +19,22 @@ Note that Actors running on the Apify platform are executed in Docker containers
|
|
|
19
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
|
-
|
|
23
22
|
## Installation
|
|
24
23
|
|
|
24
|
+
### Via bundles
|
|
25
|
+
|
|
26
|
+
#### MacOS / Unix
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
curl -fsSL https://apify.com/install-cli.sh | bash
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### Windows
|
|
33
|
+
|
|
34
|
+
```powershell
|
|
35
|
+
irm https://apify.com/install-cli.ps1 | iex
|
|
36
|
+
```
|
|
37
|
+
|
|
25
38
|
### Via Homebrew
|
|
26
39
|
|
|
27
40
|
On macOS (or Linux), you can install the Apify CLI via the [Homebrew package manager](https://brew.sh).
|
|
@@ -32,7 +45,7 @@ brew install apify-cli
|
|
|
32
45
|
|
|
33
46
|
### Via NPM
|
|
34
47
|
|
|
35
|
-
First, make sure you have [Node.js](https://nodejs.org) version
|
|
48
|
+
First, make sure you have [Node.js](https://nodejs.org) version 22 or higher with NPM installed on your computer:
|
|
36
49
|
|
|
37
50
|
```bash
|
|
38
51
|
node --version
|
|
@@ -42,21 +55,15 @@ npm --version
|
|
|
42
55
|
Install or upgrade Apify CLI by running:
|
|
43
56
|
|
|
44
57
|
```bash
|
|
45
|
-
npm -g
|
|
58
|
+
npm install -g apify-cli
|
|
46
59
|
```
|
|
47
60
|
|
|
48
|
-
|
|
61
|
+
Alternatively, you can use [fnm (Fast Node Manager)](https://github.com/Schniz/fnm) and install Apify CLI only into a selected user-level Node version without requiring root privileges:
|
|
49
62
|
|
|
50
63
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
Alternatively, you can use [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm) and install Apify CLI only into a selected user-level Node version without requiring root privileges:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
nvm install 16
|
|
58
|
-
nvm use 16
|
|
59
|
-
npm -g install apify-cli
|
|
64
|
+
fnm install 22
|
|
65
|
+
fnm use 22
|
|
66
|
+
npm install -g apify-cli
|
|
60
67
|
```
|
|
61
68
|
|
|
62
69
|
Finally, verify that Apify CLI was installed correctly by running:
|
|
@@ -65,11 +72,6 @@ Finally, verify that Apify CLI was installed correctly by running:
|
|
|
65
72
|
apify --version
|
|
66
73
|
```
|
|
67
74
|
|
|
68
|
-
which should print something like:
|
|
69
|
-
```
|
|
70
|
-
apify-cli/0.10.0 darwin-x64 node-v16.14.2
|
|
71
|
-
```
|
|
72
|
-
|
|
73
75
|
> You can also skip the manual global installation altogether and use `npx apify-cli` with all the following commands instead.
|
|
74
76
|
|
|
75
77
|
## Basic usage
|
|
@@ -94,10 +96,12 @@ for the Actor and a few configuration files.
|
|
|
94
96
|
cd ./my/awesome/project
|
|
95
97
|
apify init
|
|
96
98
|
```
|
|
99
|
+
|
|
97
100
|
This command will only set up local Actor development environment in an existing directory,
|
|
98
101
|
i.e. it will create the `.actor/actor.json` file and `apify_storage` directory.
|
|
99
102
|
|
|
100
103
|
Before you can run your project locally using `apify run`, you have to set up the right start command in `package.json` under scripts.start. For example:
|
|
104
|
+
|
|
101
105
|
```text
|
|
102
106
|
{
|
|
103
107
|
...
|
|
@@ -107,11 +111,12 @@ Before you can run your project locally using `apify run`, you have to set up th
|
|
|
107
111
|
...
|
|
108
112
|
}
|
|
109
113
|
```
|
|
114
|
+
|
|
110
115
|
You can find more information about by running `apify help run`.
|
|
111
116
|
|
|
112
117
|
### Create a new Actor from Scrapy project
|
|
113
118
|
|
|
114
|
-
If you want to run a Scrapy project on Apify platform, follow the Scrapy integration guide
|
|
119
|
+
If you want to run a Scrapy project on Apify platform, follow the [Scrapy integration guide](https://docs.apify.com/cli/docs/integrating-scrapy).
|
|
115
120
|
|
|
116
121
|
### Run the Actor locally
|
|
117
122
|
|
|
@@ -134,7 +139,6 @@ and log in to it using the above command. You will be prompted for
|
|
|
134
139
|
your [Apify API token](https://console.apify.com/settings/integrations).
|
|
135
140
|
Note that the command will store the API token and other sensitive information to `~/.apify`.
|
|
136
141
|
|
|
137
|
-
|
|
138
142
|
### Push the Actor to the Apify cloud
|
|
139
143
|
|
|
140
144
|
```bash
|
|
@@ -165,7 +169,6 @@ Make sure you commit this file to the Git repository.
|
|
|
165
169
|
|
|
166
170
|
For example, `.actor/actor.json` file can look as follows:
|
|
167
171
|
|
|
168
|
-
|
|
169
172
|
```json
|
|
170
173
|
{
|
|
171
174
|
"actorSpecification": 1,
|
|
@@ -173,8 +176,8 @@ For example, `.actor/actor.json` file can look as follows:
|
|
|
173
176
|
"version": "0.0",
|
|
174
177
|
"buildTag": "latest",
|
|
175
178
|
"environmentVariables": {
|
|
176
|
-
|
|
177
|
-
|
|
179
|
+
"MYSQL_USER": "my_username",
|
|
180
|
+
"MYSQL_PASSWORD": "@mySecretPassword"
|
|
178
181
|
},
|
|
179
182
|
"dockerfile": "./Dockerfile",
|
|
180
183
|
"readme": "./ACTOR.md",
|
|
@@ -198,48 +201,54 @@ You can embed your [input schema](https://docs.apify.com/actors/development/inpu
|
|
|
198
201
|
You can define the schema of the items in your dataset under the `storages.dataset` field. This can be either an embedded object or a path to a JSON schema file. You can read more about the schema of your Actor output [here](https://docs.apify.com/actors/development/output-schema#specification-version-1).
|
|
199
202
|
|
|
200
203
|
**Note on migration from deprecated config "apify.json"**\
|
|
201
|
-
|
|
204
|
+
_Note that previously, Actor config was stored in the `apify.json` file that has been deprecated. You can find the (very slight) differences and migration info in [migration guidelines](https://github.com/apify/apify-cli/blob/master/MIGRATIONS.md)._
|
|
202
205
|
|
|
203
206
|
## Environment variables
|
|
204
207
|
|
|
205
208
|
There are two options how you can set up environment variables for Actors.
|
|
206
209
|
|
|
207
210
|
### Set up environment variables in .actor/actor.json
|
|
211
|
+
|
|
208
212
|
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.
|
|
213
|
+
|
|
209
214
|
```json
|
|
210
215
|
{
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
"actorSpecification": 1,
|
|
217
|
+
"name": "dataset-to-mysql",
|
|
218
|
+
"version": "0.1",
|
|
219
|
+
"buildTag": "latest",
|
|
220
|
+
"environmentVariables": {
|
|
221
|
+
"MYSQL_USER": "my_username",
|
|
222
|
+
"MYSQL_PASSWORD": "@mySecretPassword"
|
|
223
|
+
}
|
|
219
224
|
}
|
|
220
225
|
```
|
|
221
226
|
|
|
222
227
|
### Set up environment variables in Apify Console
|
|
228
|
+
|
|
223
229
|
In [Apify Console](https://console.apify.com/actors) select your Actor, you can set up variables into Source tab.
|
|
224
230
|
After setting up variables in the app, remove the `environmentVariables` from `.actor/actor.json`. Otherwise, variables from `.actor/actor.json` will override variables in the app.
|
|
231
|
+
|
|
225
232
|
```json
|
|
226
233
|
{
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
234
|
+
"actorSpecification": 1,
|
|
235
|
+
"name": "dataset-to-mysql",
|
|
236
|
+
"version": "0.1",
|
|
237
|
+
"buildTag": "latest"
|
|
231
238
|
}
|
|
232
239
|
```
|
|
233
240
|
|
|
234
|
-
|
|
235
241
|
#### How to set secret environment variables in .actor/actor.json
|
|
236
242
|
|
|
237
243
|
CLI provides commands to manage secrets environment variables. Secrets are stored to the `~/.apify` directory.
|
|
238
244
|
You can add a new secret using the command:
|
|
245
|
+
|
|
239
246
|
```bash
|
|
240
247
|
apify secrets:add mySecretPassword pwd1234
|
|
241
248
|
```
|
|
249
|
+
|
|
242
250
|
After adding a new secret you can use the secret in `.actor/actor.json`.
|
|
251
|
+
|
|
243
252
|
```text
|
|
244
253
|
{
|
|
245
254
|
"actorSpecification": 1,
|
|
@@ -269,509 +278,6 @@ apify help COMMAND
|
|
|
269
278
|
Still haven't found what you were looking for? Please go to [Apify Help center](https://www.apify.com/help)
|
|
270
279
|
or [contact us](https://www.apify.com/contact).
|
|
271
280
|
|
|
272
|
-
|
|
273
281
|
## Command reference
|
|
274
282
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
<!-- commands -->
|
|
278
|
-
* [`apify actor`](#apify-actor)
|
|
279
|
-
* [`apify actor get-input`](#apify-actor-get-input)
|
|
280
|
-
* [`apify actor get-value KEY`](#apify-actor-get-value-key)
|
|
281
|
-
* [`apify actor push-data [ITEM]`](#apify-actor-push-data-item)
|
|
282
|
-
* [`apify actor set-value KEY [VALUE]`](#apify-actor-set-value-key-value)
|
|
283
|
-
* [`apify call [ACTORID]`](#apify-call-actorid)
|
|
284
|
-
* [`apify create [ACTORNAME]`](#apify-create-actorname)
|
|
285
|
-
* [`apify help [COMMAND]`](#apify-help-command)
|
|
286
|
-
* [`apify info`](#apify-info)
|
|
287
|
-
* [`apify init [ACTORNAME]`](#apify-init-actorname)
|
|
288
|
-
* [`apify login`](#apify-login)
|
|
289
|
-
* [`apify logout`](#apify-logout)
|
|
290
|
-
* [`apify pull [ACTORID]`](#apify-pull-actorid)
|
|
291
|
-
* [`apify push [ACTORID]`](#apify-push-actorid)
|
|
292
|
-
* [`apify run`](#apify-run)
|
|
293
|
-
* [`apify secrets`](#apify-secrets)
|
|
294
|
-
* [`apify secrets add NAME VALUE`](#apify-secrets-add-name-value)
|
|
295
|
-
* [`apify secrets rm NAME`](#apify-secrets-rm-name)
|
|
296
|
-
* [`apify task`](#apify-task)
|
|
297
|
-
* [`apify task run TASKID`](#apify-task-run-taskid)
|
|
298
|
-
* [`apify validate-schema [PATH]`](#apify-validate-schema-path)
|
|
299
|
-
|
|
300
|
-
## `apify actor`
|
|
301
|
-
|
|
302
|
-
Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.
|
|
303
|
-
|
|
304
|
-
```
|
|
305
|
-
USAGE
|
|
306
|
-
$ apify actor
|
|
307
|
-
|
|
308
|
-
DESCRIPTION
|
|
309
|
-
Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
_See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/actor/index.ts)_
|
|
313
|
-
|
|
314
|
-
## `apify actor get-input`
|
|
315
|
-
|
|
316
|
-
Gets the Actor input value from the default key-value store associated with the Actor run.
|
|
317
|
-
|
|
318
|
-
```
|
|
319
|
-
USAGE
|
|
320
|
-
$ apify actor get-input
|
|
321
|
-
|
|
322
|
-
DESCRIPTION
|
|
323
|
-
Gets the Actor input value from the default key-value store associated with the Actor run.
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
_See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/actor/get-input.ts)_
|
|
327
|
-
|
|
328
|
-
## `apify actor get-value KEY`
|
|
329
|
-
|
|
330
|
-
Gets a value from the default key-value store associated with the Actor run.
|
|
331
|
-
|
|
332
|
-
```
|
|
333
|
-
USAGE
|
|
334
|
-
$ apify actor get-value KEY
|
|
335
|
-
|
|
336
|
-
ARGUMENTS
|
|
337
|
-
KEY Key of the record in key-value store
|
|
338
|
-
|
|
339
|
-
DESCRIPTION
|
|
340
|
-
Gets a value from the default key-value store associated with the Actor run.
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
_See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/actor/get-value.ts)_
|
|
344
|
-
|
|
345
|
-
## `apify actor push-data [ITEM]`
|
|
346
|
-
|
|
347
|
-
Stores an object or an array of objects to the default dataset of the Actor run.
|
|
348
|
-
|
|
349
|
-
```
|
|
350
|
-
USAGE
|
|
351
|
-
$ apify actor push-data [ITEM]
|
|
352
|
-
|
|
353
|
-
ARGUMENTS
|
|
354
|
-
ITEM JSON string with one object or array of objects containing data to be stored in the default dataset.
|
|
355
|
-
|
|
356
|
-
DESCRIPTION
|
|
357
|
-
Stores an object or an array of objects to the default dataset of the Actor run.
|
|
358
|
-
It is possible to pass data using item argument or stdin.
|
|
359
|
-
Passing data using argument:
|
|
360
|
-
$ apify actor push-data {"foo": "bar"}
|
|
361
|
-
Passing data using stdin with pipe:
|
|
362
|
-
$ cat ./test.json | apify actor push-data
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
_See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/actor/push-data.ts)_
|
|
366
|
-
|
|
367
|
-
## `apify actor set-value KEY [VALUE]`
|
|
368
|
-
|
|
369
|
-
Sets or removes record into the default KeyValueStore associated with the Actor run.
|
|
370
|
-
|
|
371
|
-
```
|
|
372
|
-
USAGE
|
|
373
|
-
$ apify actor set-value KEY [VALUE] [-c <value>]
|
|
374
|
-
|
|
375
|
-
ARGUMENTS
|
|
376
|
-
KEY Key of the record in key-value store.
|
|
377
|
-
VALUE Record data, which can be one of the following values:
|
|
378
|
-
- If empty, the record in the key-value store is deleted.
|
|
379
|
-
- If no `contentType` flag is specified, value is expected to be any JSON string value.
|
|
380
|
-
- If options.contentType is set, value is taken as is.
|
|
381
|
-
|
|
382
|
-
FLAGS
|
|
383
|
-
-c, --contentType=<value> Specifies a custom MIME content type of the record. By default "application/json" is used.
|
|
384
|
-
|
|
385
|
-
DESCRIPTION
|
|
386
|
-
Sets or removes record into the default KeyValueStore associated with the Actor run.
|
|
387
|
-
It is possible to pass data using argument or stdin.
|
|
388
|
-
Passing data using argument:
|
|
389
|
-
$ apify actor set-value KEY my-value
|
|
390
|
-
Passing data using stdin with pipe:
|
|
391
|
-
$ cat ./my-text-file.txt | apify actor set-value KEY --contentType text/plain
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
_See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/actor/set-value.ts)_
|
|
395
|
-
|
|
396
|
-
## `apify call [ACTORID]`
|
|
397
|
-
|
|
398
|
-
Runs a specific Actor remotely on the Apify cloud platform.
|
|
399
|
-
|
|
400
|
-
```
|
|
401
|
-
USAGE
|
|
402
|
-
$ apify call [ACTORID] [-b <value>] [-t <value>] [-m <value>] [-w <value>] [-i <value> | --input-file
|
|
403
|
-
<value>]
|
|
404
|
-
|
|
405
|
-
ARGUMENTS
|
|
406
|
-
ACTORID Name or ID of the Actor to run (e.g. "my-actor", "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not
|
|
407
|
-
provided, the command runs the remote Actor specified in the ".actor/actor.json" file.
|
|
408
|
-
|
|
409
|
-
FLAGS
|
|
410
|
-
-b, --build=<value> Tag or number of the build to run (e.g. "latest" or "1.2.34").
|
|
411
|
-
-i, --input=<value> Optional JSON input to be given to the Actor.
|
|
412
|
-
-m, --memory=<value> Amount of memory allocated for the Actor run, in megabytes.
|
|
413
|
-
-t, --timeout=<value> Timeout for the Actor run in seconds. Zero value means there is no timeout.
|
|
414
|
-
-w, --wait-for-finish=<value> Seconds for waiting to run to finish, if no value passed, it waits forever.
|
|
415
|
-
--input-file=<value> Optional path to a file with JSON input to be given to the Actor. The file must be a
|
|
416
|
-
valid JSON file. You can also specify `-` to read from standard input.
|
|
417
|
-
|
|
418
|
-
DESCRIPTION
|
|
419
|
-
Runs a specific Actor remotely on the Apify cloud platform.
|
|
420
|
-
The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". It
|
|
421
|
-
takes input for the Actor from the default local key-value store by default.
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
_See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/call.ts)_
|
|
425
|
-
|
|
426
|
-
## `apify create [ACTORNAME]`
|
|
427
|
-
|
|
428
|
-
Creates a new Actor project directory from a selected boilerplate template.
|
|
429
|
-
|
|
430
|
-
```
|
|
431
|
-
USAGE
|
|
432
|
-
$ apify create [ACTORNAME] [-t <value>] [--skip-dependency-install] [--omit-optional-deps]
|
|
433
|
-
|
|
434
|
-
ARGUMENTS
|
|
435
|
-
ACTORNAME Name of the Actor and its directory
|
|
436
|
-
|
|
437
|
-
FLAGS
|
|
438
|
-
-t, --template=<value> Template for the Actor. If not provided, the command will prompt for it.
|
|
439
|
-
Visit
|
|
440
|
-
https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json
|
|
441
|
-
to find available template names.
|
|
442
|
-
--omit-optional-deps Skip installing optional dependencies.
|
|
443
|
-
--skip-dependency-install Skip installing Actor dependencies.
|
|
444
|
-
|
|
445
|
-
DESCRIPTION
|
|
446
|
-
Creates a new Actor project directory from a selected boilerplate template.
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
_See code: [src/commands/create.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/create.ts)_
|
|
450
|
-
|
|
451
|
-
## `apify help [COMMAND]`
|
|
452
|
-
|
|
453
|
-
Display help for apify.
|
|
454
|
-
|
|
455
|
-
```
|
|
456
|
-
USAGE
|
|
457
|
-
$ apify help [COMMAND...] [-n]
|
|
458
|
-
|
|
459
|
-
ARGUMENTS
|
|
460
|
-
COMMAND... Command to show help for.
|
|
461
|
-
|
|
462
|
-
FLAGS
|
|
463
|
-
-n, --nested-commands Include all nested commands in the output.
|
|
464
|
-
|
|
465
|
-
DESCRIPTION
|
|
466
|
-
Display help for apify.
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.3/src/commands/help.ts)_
|
|
470
|
-
|
|
471
|
-
## `apify info`
|
|
472
|
-
|
|
473
|
-
Displays information about the currently active Apify account.
|
|
474
|
-
|
|
475
|
-
```
|
|
476
|
-
USAGE
|
|
477
|
-
$ apify info
|
|
478
|
-
|
|
479
|
-
DESCRIPTION
|
|
480
|
-
Displays information about the currently active Apify account.
|
|
481
|
-
The information is printed to the console.
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
_See code: [src/commands/info.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/info.ts)_
|
|
485
|
-
|
|
486
|
-
## `apify init [ACTORNAME]`
|
|
487
|
-
|
|
488
|
-
Initializes a new Actor project in an existing directory.
|
|
489
|
-
|
|
490
|
-
```
|
|
491
|
-
USAGE
|
|
492
|
-
$ apify init [ACTORNAME] [-y]
|
|
493
|
-
|
|
494
|
-
ARGUMENTS
|
|
495
|
-
ACTORNAME Name of the Actor. If not provided, you will be prompted for it.
|
|
496
|
-
|
|
497
|
-
FLAGS
|
|
498
|
-
-y, --yes Automatic yes to prompts; assume "yes" as answer to all prompts. Note that in some cases, the command may
|
|
499
|
-
still ask for confirmation.
|
|
500
|
-
|
|
501
|
-
DESCRIPTION
|
|
502
|
-
Initializes a new Actor project in an existing directory.
|
|
503
|
-
If the directory contains a Scrapy project in Python, the command automatically creates wrappers so that you can run
|
|
504
|
-
your scrapers without changes.
|
|
505
|
-
|
|
506
|
-
The command creates the ".actor/actor.json" file and the "storage" directory in the current directory, but does not
|
|
507
|
-
touch any other existing files or directories.
|
|
508
|
-
|
|
509
|
-
WARNING: The directory at "storage" will be overwritten if it already exists.
|
|
510
|
-
```
|
|
511
|
-
|
|
512
|
-
_See code: [src/commands/init.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/init.ts)_
|
|
513
|
-
|
|
514
|
-
## `apify login`
|
|
515
|
-
|
|
516
|
-
Logs in to your Apify account.
|
|
517
|
-
|
|
518
|
-
```
|
|
519
|
-
USAGE
|
|
520
|
-
$ apify login [-t <value>] [-m console|manual]
|
|
521
|
-
|
|
522
|
-
FLAGS
|
|
523
|
-
-m, --method=<option> [Optional] Method of logging in to Apify
|
|
524
|
-
<options: console|manual>
|
|
525
|
-
-t, --token=<value> [Optional] Apify API token
|
|
526
|
-
|
|
527
|
-
DESCRIPTION
|
|
528
|
-
Logs in to your Apify account.
|
|
529
|
-
The API token and other account information is stored in the ~/.apify directory, from where it is read by all other
|
|
530
|
-
"apify" commands. To log out, call "apify logout".
|
|
531
|
-
```
|
|
532
|
-
|
|
533
|
-
_See code: [src/commands/login.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/login.ts)_
|
|
534
|
-
|
|
535
|
-
## `apify logout`
|
|
536
|
-
|
|
537
|
-
Logs out of your Apify account.
|
|
538
|
-
|
|
539
|
-
```
|
|
540
|
-
USAGE
|
|
541
|
-
$ apify logout
|
|
542
|
-
|
|
543
|
-
DESCRIPTION
|
|
544
|
-
Logs out of your Apify account.
|
|
545
|
-
The command deletes the API token and all other account information stored in the ~/.apify directory. To log in again,
|
|
546
|
-
call "apify login".
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
_See code: [src/commands/logout.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/logout.ts)_
|
|
550
|
-
|
|
551
|
-
## `apify pull [ACTORID]`
|
|
552
|
-
|
|
553
|
-
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.
|
|
554
|
-
|
|
555
|
-
```
|
|
556
|
-
USAGE
|
|
557
|
-
$ apify pull [ACTORID] [-v <value>]
|
|
558
|
-
|
|
559
|
-
ARGUMENTS
|
|
560
|
-
ACTORID Name or ID of the Actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
|
|
561
|
-
command will update the Actor in the current directory based on its name in ".actor/actor.json" file.
|
|
562
|
-
|
|
563
|
-
FLAGS
|
|
564
|
-
-v, --version=<value> Actor version number which will be pulled, e.g. 1.2. Default: the highest version
|
|
565
|
-
|
|
566
|
-
DESCRIPTION
|
|
567
|
-
Pulls an Actor from the Apify platform to the current directory. If it is defined as Git repository, it will be
|
|
568
|
-
cloned. If it is defined as Web IDE, it will fetch the files.
|
|
569
|
-
```
|
|
570
|
-
|
|
571
|
-
_See code: [src/commands/pull.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/pull.ts)_
|
|
572
|
-
|
|
573
|
-
## `apify push [ACTORID]`
|
|
574
|
-
|
|
575
|
-
Uploads the Actor to the Apify platform and builds it there.
|
|
576
|
-
|
|
577
|
-
```
|
|
578
|
-
USAGE
|
|
579
|
-
$ apify push [ACTORID] [--version-number <value>] [-v <value>] [-b <value>] [-w <value>] [--no-prompt]
|
|
580
|
-
[--force]
|
|
581
|
-
|
|
582
|
-
ARGUMENTS
|
|
583
|
-
ACTORID Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
|
|
584
|
-
command will create or modify the Actor with the name specified in ".actor/actor.json" file.
|
|
585
|
-
|
|
586
|
-
FLAGS
|
|
587
|
-
-b, --build-tag=<value> Build tag to be applied to the successful Actor build. By default, it is taken from the
|
|
588
|
-
".actor/actor.json" file
|
|
589
|
-
-v, --version=<value> Actor version number to which the files should be pushed. By default, it is taken from
|
|
590
|
-
the ".actor/actor.json" file.
|
|
591
|
-
-w, --wait-for-finish=<value> Seconds for waiting to build to finish, if no value passed, it waits forever.
|
|
592
|
-
--force Push an Actor even when the local files are older than the Actor on the platform.
|
|
593
|
-
--no-prompt Do not prompt for opening the Actor details in a browser. This will also not open the
|
|
594
|
-
browser automatically.
|
|
595
|
-
--version-number=<value> DEPRECATED: Use flag version instead. Actor version number to which the files should be
|
|
596
|
-
pushed. By default, it is taken from the ".actor/actor.json" file.
|
|
597
|
-
|
|
598
|
-
DESCRIPTION
|
|
599
|
-
Uploads the Actor to the Apify platform and builds it there.
|
|
600
|
-
The Actor settings are read from the ".actor/actor.json" file in the current directory, but they can be overridden
|
|
601
|
-
using command-line options.
|
|
602
|
-
NOTE: If the source files are smaller than 3 MB then they are uploaded as
|
|
603
|
-
"Multiple source files", otherwise they are uploaded as "Zip file".
|
|
604
|
-
|
|
605
|
-
When there's an attempt to push files that are older than the Actor on the platform, the command will fail. Can be
|
|
606
|
-
overwritten with --force flag.
|
|
607
|
-
```
|
|
608
|
-
|
|
609
|
-
_See code: [src/commands/push.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/push.ts)_
|
|
610
|
-
|
|
611
|
-
## `apify run`
|
|
612
|
-
|
|
613
|
-
Runs the Actor locally in the current directory.
|
|
614
|
-
|
|
615
|
-
```
|
|
616
|
-
USAGE
|
|
617
|
-
$ apify run [-p] [--purge-queue] [--purge-dataset] [--purge-key-value-store] [--entrypoint <value>] [-i
|
|
618
|
-
<value> | --input-file <value>]
|
|
619
|
-
|
|
620
|
-
FLAGS
|
|
621
|
-
-i, --input=<value> Optional JSON input to be given to the Actor. You can either provide the JSON string as a
|
|
622
|
-
value to this, or `-` to read from standard input.
|
|
623
|
-
-p, --purge Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store
|
|
624
|
-
options.
|
|
625
|
-
--entrypoint=<value> Optional entrypoint for running with injected environment variables.
|
|
626
|
-
For Python, it is the module name, or a path to a file.
|
|
627
|
-
For node.js, it is the npm script name, or a path to a JS/MJS file. You can also pass in
|
|
628
|
-
a directory name, provided that directory contains an "index.js" file.
|
|
629
|
-
--input-file=<value> Optional path to a file with JSON input to be given to the Actor. The file must be a
|
|
630
|
-
valid JSON file.
|
|
631
|
-
--purge-dataset Deletes the local directory containing the default dataset before the run starts.
|
|
632
|
-
--purge-key-value-store Deletes all records from the default key-value store in the local directory before the
|
|
633
|
-
run starts, except for the "INPUT" key.
|
|
634
|
-
--purge-queue Deletes the local directory containing the default request queue before the run starts.
|
|
635
|
-
|
|
636
|
-
DESCRIPTION
|
|
637
|
-
Runs the Actor locally in the current directory.
|
|
638
|
-
It sets various APIFY_XYZ environment variables in order to provide a working execution environment for the Actor. For
|
|
639
|
-
example, this causes the Actor input, as well as all other data in key-value stores, datasets or request queues to be
|
|
640
|
-
stored in the "storage" directory, rather than on the Apify platform.
|
|
641
|
-
|
|
642
|
-
NOTE: You can override the command's default behavior for Node.js Actors by overriding the "start" script in the
|
|
643
|
-
package.json file. You can set up your own main file or environment variables by changing it.
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
_See code: [src/commands/run.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/run.ts)_
|
|
647
|
-
|
|
648
|
-
## `apify secrets`
|
|
649
|
-
|
|
650
|
-
Manages secret values for Actor environment variables.
|
|
651
|
-
|
|
652
|
-
```
|
|
653
|
-
USAGE
|
|
654
|
-
$ apify secrets
|
|
655
|
-
|
|
656
|
-
DESCRIPTION
|
|
657
|
-
Manages secret values for Actor environment variables.
|
|
658
|
-
|
|
659
|
-
Example:
|
|
660
|
-
$ apify secrets add mySecret TopSecretValue123
|
|
661
|
-
|
|
662
|
-
Now the "mySecret" value can be used in an environment variable defined in ".actor/actor.json" file by adding the "@"
|
|
663
|
-
prefix:
|
|
664
|
-
|
|
665
|
-
{
|
|
666
|
-
"actorSpecification": 1,
|
|
667
|
-
"name": "my_actor",
|
|
668
|
-
"environmentVariables": { "SECRET_ENV_VAR": "@mySecret" },
|
|
669
|
-
"version": "0.1
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
When the Actor is pushed to Apify cloud, the "SECRET_ENV_VAR" and its value is stored as a secret environment variable
|
|
673
|
-
of the Actor.
|
|
674
|
-
```
|
|
675
|
-
|
|
676
|
-
_See code: [src/commands/secrets/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/secrets/index.ts)_
|
|
677
|
-
|
|
678
|
-
## `apify secrets add NAME VALUE`
|
|
679
|
-
|
|
680
|
-
Adds a new secret value.
|
|
681
|
-
|
|
682
|
-
```
|
|
683
|
-
USAGE
|
|
684
|
-
$ apify secrets add NAME VALUE
|
|
685
|
-
|
|
686
|
-
ARGUMENTS
|
|
687
|
-
NAME Name of the secret
|
|
688
|
-
VALUE Value of the secret
|
|
689
|
-
|
|
690
|
-
DESCRIPTION
|
|
691
|
-
Adds a new secret value.
|
|
692
|
-
The secrets are stored to a file at ~/.apify
|
|
693
|
-
```
|
|
694
|
-
|
|
695
|
-
_See code: [src/commands/secrets/add.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/secrets/add.ts)_
|
|
696
|
-
|
|
697
|
-
## `apify secrets rm NAME`
|
|
698
|
-
|
|
699
|
-
Removes the secret.
|
|
700
|
-
|
|
701
|
-
```
|
|
702
|
-
USAGE
|
|
703
|
-
$ apify secrets rm NAME
|
|
704
|
-
|
|
705
|
-
ARGUMENTS
|
|
706
|
-
NAME Name of the secret
|
|
707
|
-
|
|
708
|
-
DESCRIPTION
|
|
709
|
-
Removes the secret.
|
|
710
|
-
```
|
|
711
|
-
|
|
712
|
-
_See code: [src/commands/secrets/rm.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/secrets/rm.ts)_
|
|
713
|
-
|
|
714
|
-
## `apify task`
|
|
715
|
-
|
|
716
|
-
Commands are designed to be used to interact with Tasks.
|
|
717
|
-
|
|
718
|
-
```
|
|
719
|
-
USAGE
|
|
720
|
-
$ apify task
|
|
721
|
-
|
|
722
|
-
DESCRIPTION
|
|
723
|
-
Commands are designed to be used to interact with Tasks.
|
|
724
|
-
```
|
|
725
|
-
|
|
726
|
-
_See code: [src/commands/task/index.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/task/index.ts)_
|
|
727
|
-
|
|
728
|
-
## `apify task run TASKID`
|
|
729
|
-
|
|
730
|
-
Runs a specific Actor remotely on the Apify cloud platform.
|
|
731
|
-
|
|
732
|
-
```
|
|
733
|
-
USAGE
|
|
734
|
-
$ apify task run TASKID [-b <value>] [-t <value>] [-m <value>] [-w <value>]
|
|
735
|
-
|
|
736
|
-
ARGUMENTS
|
|
737
|
-
TASKID Name or ID of the Task to run (e.g. "my-task" or "E2jjCZBezvAZnX8Rb").
|
|
738
|
-
|
|
739
|
-
FLAGS
|
|
740
|
-
-b, --build=<value> Tag or number of the build to run (e.g. "latest" or "1.2.34").
|
|
741
|
-
-m, --memory=<value> Amount of memory allocated for the Task run, in megabytes.
|
|
742
|
-
-t, --timeout=<value> Timeout for the Task run in seconds. Zero value means there is no timeout.
|
|
743
|
-
-w, --wait-for-finish=<value> Seconds for waiting to run to finish, if no value passed, it waits forever.
|
|
744
|
-
|
|
745
|
-
DESCRIPTION
|
|
746
|
-
Runs a specific Actor remotely on the Apify cloud platform.
|
|
747
|
-
The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". It
|
|
748
|
-
takes input for the Actor from the default local key-value store by default.
|
|
749
|
-
```
|
|
750
|
-
|
|
751
|
-
_See code: [src/commands/task/run.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/task/run.ts)_
|
|
752
|
-
|
|
753
|
-
## `apify validate-schema [PATH]`
|
|
754
|
-
|
|
755
|
-
Validates input schema and prints errors found.
|
|
756
|
-
|
|
757
|
-
```
|
|
758
|
-
USAGE
|
|
759
|
-
$ apify validate-schema [PATH]
|
|
760
|
-
|
|
761
|
-
ARGUMENTS
|
|
762
|
-
PATH Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used.
|
|
763
|
-
|
|
764
|
-
DESCRIPTION
|
|
765
|
-
Validates input schema and prints errors found.
|
|
766
|
-
The input schema for the Actor is used from these locations in order of preference.
|
|
767
|
-
The first one found is validated as it would be the one used on the Apify platform.
|
|
768
|
-
1. Directly embedded object in ".actor/actor.json" under 'input' key
|
|
769
|
-
2. Path to JSON file referenced in ".actor/actor.json" under 'input' key
|
|
770
|
-
3. JSON file at .actor/INPUT_SCHEMA.json
|
|
771
|
-
4. JSON file at INPUT_SCHEMA.json
|
|
772
|
-
|
|
773
|
-
You can also pass any custom path to your input schema to have it validated instead.
|
|
774
|
-
```
|
|
775
|
-
|
|
776
|
-
_See code: [src/commands/validate-schema.ts](https://github.com/apify/apify-cli/blob/v1.0.0/src/commands/validate-schema.ts)_
|
|
777
|
-
<!-- commandsstop -->
|
|
283
|
+
See a list of all our commands on the [reference page](https://docs.apify.com/cli/docs/reference)
|