apify-cli 0.19.4 → 0.20.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.
Files changed (255) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/README.md +273 -167
  3. package/bin/dev.cmd +3 -0
  4. package/bin/dev.js +21 -0
  5. package/bin/dev.sh +4 -0
  6. package/bin/run.js +23 -0
  7. package/dist/.tsbuildinfo +1 -0
  8. package/dist/commands/actor/get-input.d.ts +6 -0
  9. package/dist/commands/actor/get-input.d.ts.map +1 -0
  10. package/dist/commands/actor/get-input.js +14 -0
  11. package/dist/commands/actor/get-input.js.map +1 -0
  12. package/dist/commands/actor/get-value.d.ts +9 -0
  13. package/dist/commands/actor/get-value.d.ts.map +1 -0
  14. package/dist/commands/actor/get-value.js +27 -0
  15. package/dist/commands/actor/get-value.js.map +1 -0
  16. package/dist/commands/actor/index.d.ts +6 -0
  17. package/dist/commands/actor/index.d.ts.map +1 -0
  18. package/dist/commands/actor/index.js +13 -0
  19. package/dist/commands/actor/index.js.map +1 -0
  20. package/dist/commands/actor/push-data.d.ts +11 -0
  21. package/dist/commands/actor/push-data.d.ts.map +1 -0
  22. package/dist/commands/actor/push-data.js +56 -0
  23. package/dist/commands/actor/push-data.js.map +1 -0
  24. package/dist/commands/actor/set-value.d.ts +15 -0
  25. package/dist/commands/actor/set-value.d.ts.map +1 -0
  26. package/dist/commands/actor/set-value.js +76 -0
  27. package/dist/commands/actor/set-value.js.map +1 -0
  28. package/dist/commands/call.d.ts +19 -0
  29. package/dist/commands/call.d.ts.map +1 -0
  30. package/dist/commands/call.js +193 -0
  31. package/dist/commands/call.js.map +1 -0
  32. package/dist/commands/check-version.d.ts +11 -0
  33. package/dist/commands/check-version.d.ts.map +1 -0
  34. package/dist/commands/check-version.js +39 -0
  35. package/dist/commands/check-version.js.map +1 -0
  36. package/dist/commands/create.d.ts +15 -0
  37. package/dist/commands/create.d.ts.map +1 -0
  38. package/dist/commands/create.js +201 -0
  39. package/dist/commands/create.js.map +1 -0
  40. package/dist/commands/edit-input-schema.d.ts +11 -0
  41. package/dist/commands/edit-input-schema.d.ts.map +1 -0
  42. package/{src → dist}/commands/edit-input-schema.js +81 -85
  43. package/dist/commands/edit-input-schema.js.map +1 -0
  44. package/dist/commands/info.d.ts +6 -0
  45. package/dist/commands/info.d.ts.map +1 -0
  46. package/dist/commands/info.js +26 -0
  47. package/dist/commands/info.js.map +1 -0
  48. package/dist/commands/init-wrap-scrapy.d.ts +10 -0
  49. package/dist/commands/init-wrap-scrapy.d.ts.map +1 -0
  50. package/dist/commands/init-wrap-scrapy.js +41 -0
  51. package/dist/commands/init-wrap-scrapy.js.map +1 -0
  52. package/dist/commands/init.d.ts +12 -0
  53. package/dist/commands/init.d.ts.map +1 -0
  54. package/dist/commands/init.js +88 -0
  55. package/dist/commands/init.js.map +1 -0
  56. package/dist/commands/login.d.ts +10 -0
  57. package/dist/commands/login.d.ts.map +1 -0
  58. package/dist/commands/login.js +174 -0
  59. package/dist/commands/login.js.map +1 -0
  60. package/dist/commands/logout.d.ts +6 -0
  61. package/dist/commands/logout.d.ts.map +1 -0
  62. package/dist/commands/logout.js +20 -0
  63. package/dist/commands/logout.js.map +1 -0
  64. package/dist/commands/pull.d.ts +12 -0
  65. package/dist/commands/pull.d.ts.map +1 -0
  66. package/dist/commands/pull.js +148 -0
  67. package/dist/commands/pull.js.map +1 -0
  68. package/dist/commands/push.d.ts +18 -0
  69. package/dist/commands/push.d.ts.map +1 -0
  70. package/dist/commands/push.js +298 -0
  71. package/dist/commands/push.js.map +1 -0
  72. package/dist/commands/run.d.ts +16 -0
  73. package/dist/commands/run.d.ts.map +1 -0
  74. package/dist/commands/run.js +383 -0
  75. package/dist/commands/run.js.map +1 -0
  76. package/dist/commands/secrets/add.d.ts +10 -0
  77. package/dist/commands/secrets/add.d.ts.map +1 -0
  78. package/dist/commands/secrets/add.js +31 -0
  79. package/dist/commands/secrets/add.js.map +1 -0
  80. package/dist/commands/secrets/index.d.ts +6 -0
  81. package/dist/commands/secrets/index.d.ts.map +1 -0
  82. package/dist/commands/secrets/index.js +24 -0
  83. package/dist/commands/secrets/index.js.map +1 -0
  84. package/dist/commands/secrets/rm.d.ts +9 -0
  85. package/dist/commands/secrets/rm.d.ts.map +1 -0
  86. package/dist/commands/secrets/rm.js +27 -0
  87. package/dist/commands/secrets/rm.js.map +1 -0
  88. package/dist/commands/task/index.d.ts +6 -0
  89. package/dist/commands/task/index.d.ts.map +1 -0
  90. package/dist/commands/task/index.js +13 -0
  91. package/dist/commands/task/index.js.map +1 -0
  92. package/dist/commands/task/run.d.ts +16 -0
  93. package/dist/commands/task/run.d.ts.map +1 -0
  94. package/dist/commands/task/run.js +91 -0
  95. package/dist/commands/task/run.js.map +1 -0
  96. package/dist/commands/validate-schema.d.ts +10 -0
  97. package/dist/commands/validate-schema.d.ts.map +1 -0
  98. package/dist/commands/validate-schema.js +58 -0
  99. package/dist/commands/validate-schema.js.map +1 -0
  100. package/dist/hooks/deprecations.d.ts +4 -0
  101. package/dist/hooks/deprecations.d.ts.map +1 -0
  102. package/dist/hooks/deprecations.js +18 -0
  103. package/dist/hooks/deprecations.js.map +1 -0
  104. package/dist/hooks/init.d.ts +7 -0
  105. package/dist/hooks/init.d.ts.map +1 -0
  106. package/dist/hooks/init.js +17 -0
  107. package/dist/hooks/init.js.map +1 -0
  108. package/dist/index.d.ts +2 -0
  109. package/dist/index.d.ts.map +1 -0
  110. package/dist/index.js +3 -0
  111. package/dist/index.js.map +1 -0
  112. package/dist/lib/actor.d.ts +27 -0
  113. package/dist/lib/actor.d.ts.map +1 -0
  114. package/{src → dist}/lib/actor.js +22 -45
  115. package/dist/lib/actor.js.map +1 -0
  116. package/dist/lib/apify-oclif-help.d.ts +15 -0
  117. package/dist/lib/apify-oclif-help.d.ts.map +1 -0
  118. package/dist/lib/apify-oclif-help.js +19 -0
  119. package/dist/lib/apify-oclif-help.js.map +1 -0
  120. package/dist/lib/apify_command.d.ts +21 -0
  121. package/dist/lib/apify_command.d.ts.map +1 -0
  122. package/dist/lib/apify_command.js +104 -0
  123. package/dist/lib/apify_command.js.map +1 -0
  124. package/dist/lib/commands/resolve-input.d.ts +5 -0
  125. package/dist/lib/commands/resolve-input.d.ts.map +1 -0
  126. package/dist/lib/commands/resolve-input.js +29 -0
  127. package/dist/lib/commands/resolve-input.js.map +1 -0
  128. package/dist/lib/commands/run-on-cloud.d.ts +20 -0
  129. package/dist/lib/commands/run-on-cloud.d.ts.map +1 -0
  130. package/dist/lib/commands/run-on-cloud.js +89 -0
  131. package/dist/lib/commands/run-on-cloud.js.map +1 -0
  132. package/dist/lib/community.d.ts +2 -0
  133. package/dist/lib/community.d.ts.map +1 -0
  134. package/dist/lib/community.js +4 -0
  135. package/dist/lib/community.js.map +1 -0
  136. package/dist/lib/consts.d.ts +54 -0
  137. package/dist/lib/consts.d.ts.map +1 -0
  138. package/dist/lib/consts.js +65 -0
  139. package/dist/lib/consts.js.map +1 -0
  140. package/dist/lib/create-utils.d.ts +8 -0
  141. package/dist/lib/create-utils.d.ts.map +1 -0
  142. package/dist/lib/create-utils.js +148 -0
  143. package/dist/lib/create-utils.js.map +1 -0
  144. package/dist/lib/exec.d.ts +3 -0
  145. package/dist/lib/exec.d.ts.map +1 -0
  146. package/dist/lib/exec.js +40 -0
  147. package/dist/lib/exec.js.map +1 -0
  148. package/dist/lib/files.d.ts +14 -0
  149. package/dist/lib/files.d.ts.map +1 -0
  150. package/dist/lib/files.js +58 -0
  151. package/dist/lib/files.js.map +1 -0
  152. package/dist/lib/input_schema.d.ts +28 -0
  153. package/dist/lib/input_schema.d.ts.map +1 -0
  154. package/dist/lib/input_schema.js +126 -0
  155. package/dist/lib/input_schema.js.map +1 -0
  156. package/dist/lib/local_state.d.ts +11 -0
  157. package/dist/lib/local_state.d.ts.map +1 -0
  158. package/dist/lib/local_state.js +27 -0
  159. package/dist/lib/local_state.js.map +1 -0
  160. package/dist/lib/outputs.d.ts +19 -0
  161. package/dist/lib/outputs.d.ts.map +1 -0
  162. package/dist/lib/outputs.js +45 -0
  163. package/dist/lib/outputs.js.map +1 -0
  164. package/dist/lib/project_analyzer.d.ts +4 -0
  165. package/dist/lib/project_analyzer.d.ts.map +1 -0
  166. package/{src → dist}/lib/project_analyzer.js +6 -11
  167. package/dist/lib/project_analyzer.js.map +1 -0
  168. package/dist/lib/projects/CrawleeAnalyzer.d.ts +4 -0
  169. package/dist/lib/projects/CrawleeAnalyzer.d.ts.map +1 -0
  170. package/{src → dist}/lib/projects/CrawleeAnalyzer.js +7 -24
  171. package/dist/lib/projects/CrawleeAnalyzer.js.map +1 -0
  172. package/dist/lib/projects/OldApifySDKAnalyzer.d.ts +4 -0
  173. package/dist/lib/projects/OldApifySDKAnalyzer.d.ts.map +1 -0
  174. package/{src → dist}/lib/projects/OldApifySDKAnalyzer.js +9 -32
  175. package/dist/lib/projects/OldApifySDKAnalyzer.js.map +1 -0
  176. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts +17 -0
  177. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts.map +1 -0
  178. package/{src/lib/scrapy-wrapper → dist/lib/projects/scrapy}/ScrapyProjectAnalyzer.js +33 -36
  179. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js.map +1 -0
  180. package/dist/lib/projects/scrapy/Spider.d.ts +14 -0
  181. package/dist/lib/projects/scrapy/Spider.d.ts.map +1 -0
  182. package/dist/lib/projects/scrapy/Spider.js +33 -0
  183. package/dist/lib/projects/scrapy/Spider.js.map +1 -0
  184. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts +7 -0
  185. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts.map +1 -0
  186. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js +25 -0
  187. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js.map +1 -0
  188. package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts +4 -0
  189. package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts.map +1 -0
  190. package/{src/lib/scrapy-wrapper/index.js → dist/lib/projects/scrapy/wrapScrapyProject.js} +43 -73
  191. package/dist/lib/projects/scrapy/wrapScrapyProject.js.map +1 -0
  192. package/dist/lib/projects/shared.d.ts +2 -0
  193. package/dist/lib/projects/shared.d.ts.map +1 -0
  194. package/dist/lib/projects/shared.js +13 -0
  195. package/dist/lib/projects/shared.js.map +1 -0
  196. package/dist/lib/secrets.d.ts +22 -0
  197. package/dist/lib/secrets.d.ts.map +1 -0
  198. package/{src → dist}/lib/secrets.js +34 -42
  199. package/dist/lib/secrets.js.map +1 -0
  200. package/dist/lib/telemetry.d.ts +21 -0
  201. package/dist/lib/telemetry.d.ts.map +1 -0
  202. package/dist/lib/telemetry.js +87 -0
  203. package/dist/lib/telemetry.js.map +1 -0
  204. package/dist/lib/types.d.ts +11 -0
  205. package/dist/lib/types.d.ts.map +1 -0
  206. package/dist/lib/types.js +2 -0
  207. package/dist/lib/types.js.map +1 -0
  208. package/dist/lib/utils.d.ts +102 -0
  209. package/dist/lib/utils.d.ts.map +1 -0
  210. package/dist/lib/utils.js +577 -0
  211. package/dist/lib/utils.js.map +1 -0
  212. package/dist/lib/version_check.d.ts +14 -0
  213. package/dist/lib/version_check.d.ts.map +1 -0
  214. package/{src → dist}/lib/version_check.js +31 -60
  215. package/dist/lib/version_check.js.map +1 -0
  216. package/oclif.manifest.json +867 -1
  217. package/package.json +151 -109
  218. package/index.js +0 -1
  219. package/src/bin/run +0 -16
  220. package/src/commands/actor/get-input.js +0 -12
  221. package/src/commands/actor/get-value.js +0 -23
  222. package/src/commands/actor/index.js +0 -13
  223. package/src/commands/actor/push-data.js +0 -44
  224. package/src/commands/actor/set-value.js +0 -63
  225. package/src/commands/call.js +0 -131
  226. package/src/commands/check-version.js +0 -28
  227. package/src/commands/create.js +0 -203
  228. package/src/commands/info.js +0 -24
  229. package/src/commands/init-wrap-scrapy.js +0 -34
  230. package/src/commands/init.js +0 -83
  231. package/src/commands/login-new.js +0 -169
  232. package/src/commands/login.js +0 -40
  233. package/src/commands/logout.js +0 -18
  234. package/src/commands/pull.js +0 -154
  235. package/src/commands/push.js +0 -234
  236. package/src/commands/run.js +0 -206
  237. package/src/commands/secrets/add.js +0 -28
  238. package/src/commands/secrets/index.js +0 -24
  239. package/src/commands/secrets/rm.js +0 -23
  240. package/src/commands/vis.js +0 -50
  241. package/src/hooks/init.js +0 -16
  242. package/src/lib/apify_command.js +0 -82
  243. package/src/lib/community.js +0 -3
  244. package/src/lib/consts.js +0 -69
  245. package/src/lib/create-utils.js +0 -187
  246. package/src/lib/exec.js +0 -36
  247. package/src/lib/files.js +0 -76
  248. package/src/lib/input_schema.js +0 -114
  249. package/src/lib/local_state.js +0 -39
  250. package/src/lib/outputs.js +0 -27
  251. package/src/lib/scrapy-wrapper/Spider.js +0 -10
  252. package/src/lib/scrapy-wrapper/SpiderFileAnalyzer.js +0 -26
  253. package/src/lib/telemetry.js +0 -104
  254. package/src/lib/utils.js +0 -690
  255. /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 actors](https://www.apify.com/actors),
7
+ [Apify Actors](https://www.apify.com/actors),
8
8
  and manage the Apify cloud platform from any computer.
9
9
 
10
- Apify actors are cloud programs that can perform arbitrary web scraping, automation or data processing job.
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 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
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 actors to the Apify cloud during deployment.
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 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.
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
 
@@ -51,7 +51,7 @@ If you receive an `EACCES` error, you might need to run the command as root:
51
51
  sudo npm -g install apify-cli
52
52
  ```
53
53
 
54
- Alternativaly, 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:
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
55
 
56
56
  ```
57
57
  nvm install 16
@@ -76,25 +76,25 @@ apify-cli/0.10.0 darwin-x64 node-v16.14.2
76
76
 
77
77
  The following examples demonstrate the basic usage of Apify CLI.
78
78
 
79
- ### Create a new actor from scratch
79
+ ### Create a new Actor from scratch
80
80
 
81
81
  ```bash
82
82
  apify create my-hello-world
83
83
  ```
84
84
 
85
- First, you will be prompted to select a template with the boilerplate for the actor, to help you get started quickly.
85
+ First, you will be prompted to select a template with the boilerplate for the Actor, to help you get started quickly.
86
86
  The command will create a directory called `my-hello-world` that contains a Node.js project
87
- for the actor and a few configuration files.
87
+ for the Actor and a few configuration files.
88
88
 
89
89
  > If you decided to skip the installation and go with `npx`, the command will be `npx apify-cli create my-hello-world`.
90
90
 
91
- ### Create a new actor from existing project
91
+ ### Create a new Actor from existing project
92
92
 
93
93
  ```bash
94
94
  cd ./my/awesome/project
95
95
  apify init
96
96
  ```
97
- This command will only set up local actor development environment in an existing directory,
97
+ This command will only set up local Actor development environment in an existing directory,
98
98
  i.e. it will create the `.actor/actor.json` file and `apify_storage` directory.
99
99
 
100
100
  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:
@@ -113,14 +113,14 @@ You can find more information about by running `apify help run`.
113
113
 
114
114
  If you want to run a Scrapy project on Apify platform, follow the Scrapy integration guide [here](https://docs.apify.com/cli/docs/integrating-scrapy).
115
115
 
116
- ### Run the actor locally
116
+ ### Run the Actor locally
117
117
 
118
118
  ```bash
119
119
  cd my-hello-world
120
120
  apify run
121
121
  ```
122
122
 
123
- This command runs the actor on your local machine.
123
+ This command runs the Actor on your local machine.
124
124
  Now's your chance to develop the logic - or magic :smirk:
125
125
 
126
126
  ### Login with your Apify account
@@ -131,27 +131,27 @@ apify login
131
131
 
132
132
  Before you can interact with the Apify cloud, you need to [create an Apify account](https://console.apify.com/)
133
133
  and log in to it using the above command. You will be prompted for
134
- your [Apify API token](https://console.apify.com/account#/integrations).
134
+ your [Apify API token](https://console.apify.com/settings/integrations).
135
135
  Note that the command will store the API token and other sensitive information to `~/.apify`.
136
136
 
137
137
 
138
- ### Push the actor to the Apify cloud
138
+ ### Push the Actor to the Apify cloud
139
139
 
140
140
  ```bash
141
141
  apify push
142
142
  ```
143
143
 
144
- This command uploads your project to the Apify cloud and builds an actor from it. On the platform, actor needs to be built before it can be run.
144
+ This command uploads your project to the Apify cloud and builds an Actor from it. On the platform, Actor needs to be built before it can be run.
145
145
 
146
- ### Run an actor on the Apify cloud
146
+ ### Run an Actor on the Apify cloud
147
147
 
148
148
  ```bash
149
149
  apify call
150
150
  ```
151
151
 
152
- Runs the actor corresponding to the current directory on the Apify platform.
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 actors, for example:
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
@@ -159,8 +159,8 @@ apify call apify/hello-world
159
159
 
160
160
  ### So what's in this .actor/actor.json file?
161
161
 
162
- This file associates your local development project with an actor on the Apify platform.
163
- It contains information such as actor name, version, build tag and environment variables.
162
+ This file associates your local development project with an Actor on the Apify platform.
163
+ It contains information such as Actor name, version, build tag and environment variables.
164
164
  Make sure you commit this file to the Git repository.
165
165
 
166
166
  For example, `.actor/actor.json` file can look as follows:
@@ -186,7 +186,7 @@ For example, `.actor/actor.json` file can look as follows:
186
186
  ```
187
187
 
188
188
  **`Dockerfile` field**\
189
- If you specify the path to your Docker file under the `dockerfile` field, this file will be used for actor builds on the platform. If not specified, the system will look for Docker files at `.actor/Dockerfile` and `Dockerfile` in this order of preference.
189
+ If you specify the path to your Docker file under the `dockerfile` field, this file will be used for Actor builds on the platform. If not specified, the system will look for Docker files at `.actor/Dockerfile` and `Dockerfile` in this order of preference.
190
190
 
191
191
  **`Readme` field** \
192
192
  If you specify the path to your readme file under the `readme` field, the readme at this path will be used on the platform. If not specified, readme at `.actor/README.md` and `README.md` will be used in this order of preference.
@@ -195,17 +195,17 @@ If you specify the path to your readme file under the `readme` field, the readme
195
195
  You can embed your [input schema](https://docs.apify.com/actors/development/input-schema#specification-version-1) object directly in `actor.json` under `input` field. Alternatively, you can provide a path to a custom input schema. If not provided, the input schema at `.actor/INPUT_SCHEMA.json` and `INPUT_SCHEMA.json` is used in this order of preference.
196
196
 
197
197
  **`Storages.dataset` field**\
198
- 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).
198
+ 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
199
 
200
200
  **Note on migration from deprecated config "apify.json"**\
201
- *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).*
201
+ *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
202
 
203
203
  ## Environment variables
204
204
 
205
- There are two options how you can set up environment variables for actors.
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
- 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.
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.
209
209
  ```json
210
210
  {
211
211
  "actorSpecification": 1,
@@ -220,7 +220,7 @@ All keys from `env` will be set as environment variables into Apify platform aft
220
220
  ```
221
221
 
222
222
  ### Set up environment variables in Apify Console
223
- In [Apify Console](https://console.apify.com/actors) select your actor, you can set up variables into Source tab.
223
+ In [Apify Console](https://console.apify.com/actors) select your Actor, you can set up variables into Source tab.
224
224
  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.
225
225
  ```json
226
226
  {
@@ -276,12 +276,13 @@ This section contains printouts of `apify help` for all commands.
276
276
 
277
277
  <!-- commands -->
278
278
  * [`apify actor`](#apify-actor)
279
- * [`apify actor:get-input`](#apify-actorget-input)
280
- * [`apify actor:get-value KEY`](#apify-actorget-value-key)
281
- * [`apify actor:push-data [ITEM]`](#apify-actorpush-data-item)
282
- * [`apify actor:set-value KEY [VALUE]`](#apify-actorset-value-key-value)
283
- * [`apify call [ACTID]`](#apify-call-actid)
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
284
  * [`apify create [ACTORNAME]`](#apify-create-actorname)
285
+ * [`apify help [COMMAND]`](#apify-help-command)
285
286
  * [`apify info`](#apify-info)
286
287
  * [`apify init [ACTORNAME]`](#apify-init-actorname)
287
288
  * [`apify login`](#apify-login)
@@ -290,143 +291,182 @@ This section contains printouts of `apify help` for all commands.
290
291
  * [`apify push [ACTORID]`](#apify-push-actorid)
291
292
  * [`apify run`](#apify-run)
292
293
  * [`apify secrets`](#apify-secrets)
293
- * [`apify secrets:add NAME VALUE`](#apify-secretsadd-name-value)
294
- * [`apify secrets:rm NAME`](#apify-secretsrm-name)
295
- * [`apify vis [PATH]`](#apify-vis-path)
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)
296
299
 
297
300
  ## `apify actor`
298
301
 
299
- Commands are designed to be used in actor runs. All commands are in PoC state, do not use in production environments.
302
+ Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments.
300
303
 
301
304
  ```
302
305
  USAGE
303
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.
304
310
  ```
305
311
 
306
- _See code: [src/commands/actor/index.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/actor/index.js)_
312
+ _See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/actor/index.ts)_
307
313
 
308
- ## `apify actor:get-input`
314
+ ## `apify actor get-input`
309
315
 
310
- Gets the actor input value from the default key-value store associated with the actor run.
316
+ Gets the Actor input value from the default key-value store associated with the Actor run.
311
317
 
312
318
  ```
313
319
  USAGE
314
- $ apify actor:get-input
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.
315
324
  ```
316
325
 
317
- _See code: [src/commands/actor/get-input.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/actor/get-input.js)_
326
+ _See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/actor/get-input.ts)_
318
327
 
319
- ## `apify actor:get-value KEY`
328
+ ## `apify actor get-value KEY`
320
329
 
321
- Gets a value from the default key-value store associated with the actor run.
330
+ Gets a value from the default key-value store associated with the Actor run.
322
331
 
323
332
  ```
324
333
  USAGE
325
- $ apify actor:get-value KEY
334
+ $ apify actor get-value KEY
326
335
 
327
336
  ARGUMENTS
328
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.
329
341
  ```
330
342
 
331
- _See code: [src/commands/actor/get-value.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/actor/get-value.js)_
343
+ _See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/actor/get-value.ts)_
332
344
 
333
- ## `apify actor:push-data [ITEM]`
345
+ ## `apify actor push-data [ITEM]`
334
346
 
335
- Stores an object or an array of objects to the default dataset of the actor run.
347
+ Stores an object or an array of objects to the default dataset of the Actor run.
336
348
 
337
349
  ```
338
350
  USAGE
339
- $ apify actor:push-data [ITEM]
351
+ $ apify actor push-data [ITEM]
340
352
 
341
353
  ARGUMENTS
342
354
  ITEM JSON string with one object or array of objects containing data to be stored in the default dataset.
343
355
 
344
356
  DESCRIPTION
357
+ Stores an object or an array of objects to the default dataset of the Actor run.
345
358
  It is possible to pass data using item argument or stdin.
346
359
  Passing data using argument:
347
- $ apify actor:push-data {"foo": "bar"}
360
+ $ apify actor push-data {"foo": "bar"}
348
361
  Passing data using stdin with pipe:
349
- $ cat ./test.json | apify actor:push-data
362
+ $ cat ./test.json | apify actor push-data
350
363
  ```
351
364
 
352
- _See code: [src/commands/actor/push-data.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/actor/push-data.js)_
365
+ _See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/actor/push-data.ts)_
353
366
 
354
- ## `apify actor:set-value KEY [VALUE]`
367
+ ## `apify actor set-value KEY [VALUE]`
355
368
 
356
- Sets or removes record into the default KeyValueStore associated with the actor run.
369
+ Sets or removes record into the default KeyValueStore associated with the Actor run.
357
370
 
358
371
  ```
359
372
  USAGE
360
- $ apify actor:set-value KEY [VALUE]
373
+ $ apify actor set-value KEY [VALUE] [-c <value>]
361
374
 
362
375
  ARGUMENTS
363
376
  KEY Key of the record in key-value store.
364
-
365
377
  VALUE Record data, which can be one of the following values:
366
378
  - If empty, the record in the key-value store is deleted.
367
379
  - If no `contentType` flag is specified, value is expected to be any JSON string value.
368
380
  - If options.contentType is set, value is taken as is.
369
381
 
370
- OPTIONS
371
- -c, --contentType=contentType Specifies a custom MIME content type of the record. By default "application/json" is
372
- used.
382
+ FLAGS
383
+ -c, --contentType=<value> Specifies a custom MIME content type of the record. By default "application/json" is used.
373
384
 
374
385
  DESCRIPTION
386
+ Sets or removes record into the default KeyValueStore associated with the Actor run.
375
387
  It is possible to pass data using argument or stdin.
376
388
  Passing data using argument:
377
- $ apify actor:set-value KEY my-value
389
+ $ apify actor set-value KEY my-value
378
390
  Passing data using stdin with pipe:
379
- $ cat ./my-text-file.txt | apify actor:set-value KEY --contentType text/plain
391
+ $ cat ./my-text-file.txt | apify actor set-value KEY --contentType text/plain
380
392
  ```
381
393
 
382
- _See code: [src/commands/actor/set-value.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/actor/set-value.js)_
394
+ _See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/actor/set-value.ts)_
383
395
 
384
- ## `apify call [ACTID]`
396
+ ## `apify call [ACTORID]`
385
397
 
386
- Runs a specific actor remotely on the Apify cloud platform.
398
+ Runs a specific Actor remotely on the Apify cloud platform.
387
399
 
388
400
  ```
389
401
  USAGE
390
- $ apify call [ACTID]
402
+ $ apify call [ACTORID] [-b <value>] [-t <value>] [-m <value>] [-w <value>] [-i <value> | --input-file
403
+ <value>]
391
404
 
392
405
  ARGUMENTS
393
- ACTID Name or ID of the actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the command
394
- runs the remote actor specified in the ".actor/actor.json" file.
395
-
396
- OPTIONS
397
- -b, --build=build Tag or number of the build to run (e.g. "latest" or "1.2.34").
398
- -m, --memory=memory Amount of memory allocated for the actor run, in megabytes.
399
- -t, --timeout=timeout Timeout for the actor run in seconds. Zero value means there is no timeout.
400
- -w, --wait-for-finish=wait-for-finish Seconds for waiting to run to finish, if no value passed, it waits forever.
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.
401
417
 
402
418
  DESCRIPTION
403
- The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". It
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
404
421
  takes input for the Actor from the default local key-value store by default.
405
422
  ```
406
423
 
407
- _See code: [src/commands/call.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/call.js)_
424
+ _See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/call.ts)_
408
425
 
409
426
  ## `apify create [ACTORNAME]`
410
427
 
411
- Creates a new actor project directory from a selected boilerplate template.
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/v0.20.0-beta.0/src/commands/create.ts)_
450
+
451
+ ## `apify help [COMMAND]`
452
+
453
+ Display help for apify.
412
454
 
413
455
  ```
414
456
  USAGE
415
- $ apify create [ACTORNAME]
457
+ $ apify help [COMMAND...] [-n]
416
458
 
417
459
  ARGUMENTS
418
- ACTORNAME Name of the actor and its directory
460
+ COMMAND... Command to show help for.
419
461
 
420
- OPTIONS
421
- -t, --template=template Template for the actor. If not provided, the command will prompt for it.
422
- Visit
423
- https://raw.githubusercontent.com/apify/actor-templates/master/templates/manifest.json to
424
- find available template names.
462
+ FLAGS
463
+ -n, --nested-commands Include all nested commands in the output.
425
464
 
426
- --skip-dependency-install Skip installing actor dependencies.
465
+ DESCRIPTION
466
+ Display help for apify.
427
467
  ```
428
468
 
429
- _See code: [src/commands/create.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/create.js)_
469
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.3/src/commands/help.ts)_
430
470
 
431
471
  ## `apify info`
432
472
 
@@ -437,52 +477,60 @@ USAGE
437
477
  $ apify info
438
478
 
439
479
  DESCRIPTION
480
+ Displays information about the currently active Apify account.
440
481
  The information is printed to the console.
441
482
  ```
442
483
 
443
- _See code: [src/commands/info.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/info.js)_
484
+ _See code: [src/commands/info.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/info.ts)_
444
485
 
445
486
  ## `apify init [ACTORNAME]`
446
487
 
447
- Initializes a new actor project in an existing directory.
488
+ Initializes a new Actor project in an existing directory.
448
489
 
449
490
  ```
450
491
  USAGE
451
- $ apify init [ACTORNAME]
492
+ $ apify init [ACTORNAME] [-y]
452
493
 
453
494
  ARGUMENTS
454
- ACTORNAME Name of the actor. If not provided, you will be prompted for it.
495
+ ACTORNAME Name of the Actor. If not provided, you will be prompted for it.
455
496
 
456
- OPTIONS
497
+ FLAGS
457
498
  -y, --yes Automatic yes to prompts; assume "yes" as answer to all prompts. Note that in some cases, the command may
458
499
  still ask for confirmation.
459
500
 
460
501
  DESCRIPTION
461
- The command only creates the ".actor/actor.json" file and the "storage" directory in the current directory, but will
462
- not touch anything else.
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.
463
508
 
464
509
  WARNING: The directory at "storage" will be overwritten if it already exists.
465
510
  ```
466
511
 
467
- _See code: [src/commands/init.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/init.js)_
512
+ _See code: [src/commands/init.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/init.ts)_
468
513
 
469
514
  ## `apify login`
470
515
 
471
- Logs in to your Apify account using a provided API token.
516
+ Logs in to your Apify account.
472
517
 
473
518
  ```
474
519
  USAGE
475
- $ apify login
520
+ $ apify login [-t <value>] [-m console|manual]
476
521
 
477
- OPTIONS
478
- -t, --token=token [Optional] Apify API token
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
479
526
 
480
527
  DESCRIPTION
481
- The API token and other account information is stored in the ~/.apify directory, from where it is read by all other
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
482
530
  "apify" commands. To log out, call "apify logout".
483
531
  ```
484
532
 
485
- _See code: [src/commands/login.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/login.js)_
533
+ _See code: [src/commands/login.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/login.ts)_
486
534
 
487
535
  ## `apify logout`
488
536
 
@@ -493,11 +541,12 @@ USAGE
493
541
  $ apify logout
494
542
 
495
543
  DESCRIPTION
544
+ Logs out of your Apify account.
496
545
  The command deletes the API token and all other account information stored in the ~/.apify directory. To log in again,
497
- call "apify login".
546
+ call "apify login".
498
547
  ```
499
548
 
500
- _See code: [src/commands/logout.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/logout.js)_
549
+ _See code: [src/commands/logout.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/logout.ts)_
501
550
 
502
551
  ## `apify pull [ACTORID]`
503
552
 
@@ -505,159 +554,216 @@ Pulls an Actor from the Apify platform to the current directory. If it is define
505
554
 
506
555
  ```
507
556
  USAGE
508
- $ apify pull [ACTORID]
557
+ $ apify pull [ACTORID] [-v <value>]
509
558
 
510
559
  ARGUMENTS
511
- ACTORID Name or ID of the actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
560
+ ACTORID Name or ID of the Actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
512
561
  command will update the Actor in the current directory based on its name in ".actor/actor.json" file.
513
562
 
514
- OPTIONS
515
- -v, --version=version Actor version number which will be pulled, e.g. 1.2. Default: the highest version
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.
516
569
  ```
517
570
 
518
- _See code: [src/commands/pull.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/pull.js)_
571
+ _See code: [src/commands/pull.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/pull.ts)_
519
572
 
520
573
  ## `apify push [ACTORID]`
521
574
 
522
- Uploads the actor to the Apify platform and builds it there.
575
+ Uploads the Actor to the Apify platform and builds it there.
523
576
 
524
577
  ```
525
578
  USAGE
526
- $ apify push [ACTORID]
579
+ $ apify push [ACTORID] [--version-number <value>] [-v <value>] [-b <value>] [-w <value>] [--no-prompt]
580
+ [--force]
527
581
 
528
582
  ARGUMENTS
529
583
  ACTORID Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the
530
- command will create or modify the actor with the name specified in ".actor/actor.json" file.
531
-
532
- OPTIONS
533
- -b, --build-tag=build-tag Build tag to be applied to the successful Actor build. By default, it is taken
534
- from the ".actor/actor.json" file
535
-
536
- -v, --version=version Actor version number to which the files should be pushed. By default, it is
537
- taken from the ".actor/actor.json" file.
538
-
539
- -w, --wait-for-finish=wait-for-finish Seconds for waiting to build to finish, if no value passed, it waits forever.
540
-
541
- --no-prompt Do not prompt for opening the actor details in a browser. This will also not
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.
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.
546
597
 
547
598
  DESCRIPTION
548
- The Actor settings are read from the ".actor/actor.json" file in the current directory, but they can be overridden
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
549
601
  using command-line options.
550
- NOTE: If the source files are smaller than 3 MB then they are uploaded as
602
+ NOTE: If the source files are smaller than 3 MB then they are uploaded as
551
603
  "Multiple source files", otherwise they are uploaded as "Zip file".
552
604
 
553
- WARNING: If the target Actor already exists in your Apify account, it will be overwritten!
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.
554
607
  ```
555
608
 
556
- _See code: [src/commands/push.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/push.js)_
609
+ _See code: [src/commands/push.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/push.ts)_
557
610
 
558
611
  ## `apify run`
559
612
 
560
- Runs the actor locally in the current directory.
613
+ Runs the Actor locally in the current directory.
561
614
 
562
615
  ```
563
616
  USAGE
564
- $ apify run
565
-
566
- OPTIONS
567
- -p, --purge Shortcut that combines the --purge-queue, --purge-dataset and --purge-key-value-store
568
- options.
569
-
570
- --purge-dataset Deletes the local directory containing the default dataset before the run starts.
571
-
572
- --purge-key-value-store Deletes all records from the default key-value store in the local directory before the run
573
- starts, except for the "INPUT" key.
574
-
575
- --purge-queue Deletes the local directory containing the default request queue before the run starts.
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.
576
635
 
577
636
  DESCRIPTION
578
- It sets various APIFY_XYZ environment variables in order to provide a working execution environment for the actor. For
579
- example, this causes the actor input, as well as all other data in key-value stores, datasets or request queues to be
580
- stored in the "storage" directory, rather than on the Apify platform.
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.
581
641
 
582
- NOTE: You can override the command's default behavior for Node.js actors by overriding the "start" script in the
642
+ NOTE: You can override the command's default behavior for Node.js Actors by overriding the "start" script in the
583
643
  package.json file. You can set up your own main file or environment variables by changing it.
584
644
  ```
585
645
 
586
- _See code: [src/commands/run.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/run.js)_
646
+ _See code: [src/commands/run.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/run.ts)_
587
647
 
588
648
  ## `apify secrets`
589
649
 
590
- Manages secret values for actor environment variables.
650
+ Manages secret values for Actor environment variables.
591
651
 
592
652
  ```
593
653
  USAGE
594
654
  $ apify secrets
595
655
 
596
656
  DESCRIPTION
657
+ Manages secret values for Actor environment variables.
658
+
597
659
  Example:
598
- $ apify secrets:add mySecret TopSecretValue123
660
+ $ apify secrets add mySecret TopSecretValue123
599
661
 
600
- Now the "mySecret" value can be used in an environment variable defined in ".actor/actor.json" file by adding the "@"
662
+ Now the "mySecret" value can be used in an environment variable defined in ".actor/actor.json" file by adding the "@"
601
663
  prefix:
602
664
 
603
665
  {
604
- "actorSpecification": 1,
605
- "name": "my_actor",
606
- "environmentVariables": { "SECRET_ENV_VAR": "@mySecret" },
607
- "version": "0.1
666
+ "actorSpecification": 1,
667
+ "name": "my_actor",
668
+ "environmentVariables": { "SECRET_ENV_VAR": "@mySecret" },
669
+ "version": "0.1
608
670
  }
609
671
 
610
- When the actor is pushed to Apify cloud, the "SECRET_ENV_VAR" and its value is stored as a secret environment variable
611
- of the actor.
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.
612
674
  ```
613
675
 
614
- _See code: [src/commands/secrets/index.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/secrets/index.js)_
676
+ _See code: [src/commands/secrets/index.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/secrets/index.ts)_
615
677
 
616
- ## `apify secrets:add NAME VALUE`
678
+ ## `apify secrets add NAME VALUE`
617
679
 
618
680
  Adds a new secret value.
619
681
 
620
682
  ```
621
683
  USAGE
622
- $ apify secrets:add NAME VALUE
684
+ $ apify secrets add NAME VALUE
623
685
 
624
686
  ARGUMENTS
625
687
  NAME Name of the secret
626
688
  VALUE Value of the secret
627
689
 
628
690
  DESCRIPTION
691
+ Adds a new secret value.
629
692
  The secrets are stored to a file at ~/.apify
630
693
  ```
631
694
 
632
- _See code: [src/commands/secrets/add.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/secrets/add.js)_
695
+ _See code: [src/commands/secrets/add.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/secrets/add.ts)_
633
696
 
634
- ## `apify secrets:rm NAME`
697
+ ## `apify secrets rm NAME`
635
698
 
636
699
  Removes the secret.
637
700
 
638
701
  ```
639
702
  USAGE
640
- $ apify secrets:rm NAME
703
+ $ apify secrets rm NAME
641
704
 
642
705
  ARGUMENTS
643
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/v0.20.0-beta.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/v0.20.0-beta.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.
644
749
  ```
645
750
 
646
- _See code: [src/commands/secrets/rm.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/secrets/rm.js)_
751
+ _See code: [src/commands/task/run.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/task/run.ts)_
647
752
 
648
- ## `apify vis [PATH]`
753
+ ## `apify validate-schema [PATH]`
649
754
 
650
755
  Validates input schema and prints errors found.
651
756
 
652
757
  ```
653
758
  USAGE
654
- $ apify vis [PATH]
759
+ $ apify validate-schema [PATH]
655
760
 
656
761
  ARGUMENTS
657
762
  PATH Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used.
658
763
 
659
764
  DESCRIPTION
660
- The input schema for the actor is used from these locations in order of preference.
765
+ Validates input schema and prints errors found.
766
+ The input schema for the Actor is used from these locations in order of preference.
661
767
  The first one found is validated as it would be the one used on the Apify platform.
662
768
  1. Directly embedded object in ".actor/actor.json" under 'input' key
663
769
  2. Path to JSON file referenced in ".actor/actor.json" under 'input' key
@@ -667,5 +773,5 @@ DESCRIPTION
667
773
  You can also pass any custom path to your input schema to have it validated instead.
668
774
  ```
669
775
 
670
- _See code: [src/commands/vis.js](https://github.com/apify/apify-cli/blob/v0.19.4/src/commands/vis.js)_
776
+ _See code: [src/commands/validate-schema.ts](https://github.com/apify/apify-cli/blob/v0.20.0-beta.0/src/commands/validate-schema.ts)_
671
777
  <!-- commandsstop -->