diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index ae2a53c0a..4811102d2 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -41,6 +41,8 @@ jobs: run: | # install project deps yarn + # update next docs reference + yarn update-docs # go to website dir cd website # install website deps diff --git a/docs/reference.md b/docs/reference.md index 1268815ac..d736e4196 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -12,13 +12,40 @@ This section contains printouts of `apify help` for all commands. * [`apify actor push-data [ITEM]`](#apify-actor-push-data-item) * [`apify actor set-value KEY [VALUE]`](#apify-actor-set-value-key-value) * [`apify actors`](#apify-actors) +* [`apify actors build [ACTORID]`](#apify-actors-build-actorid) +* [`apify actors call [ACTORID]`](#apify-actors-call-actorid) +* [`apify actors ls`](#apify-actors-ls) +* [`apify actors pull [ACTORID]`](#apify-actors-pull-actorid) +* [`apify actors push [ACTORID]`](#apify-actors-push-actorid) +* [`apify actors rm ACTORID`](#apify-actors-rm-actorid) +* [`apify actors start [ACTORID]`](#apify-actors-start-actorid) +* [`apify builds`](#apify-builds) +* [`apify builds create [ACTORID]`](#apify-builds-create-actorid) +* [`apify builds info BUILDID`](#apify-builds-info-buildid) +* [`apify builds log BUILDID`](#apify-builds-log-buildid) +* [`apify builds ls [ACTORID]`](#apify-builds-ls-actorid) +* [`apify builds rm BUILDID`](#apify-builds-rm-buildid) * [`apify call [ACTORID]`](#apify-call-actorid) * [`apify create [ACTORNAME]`](#apify-create-actorname) * [`apify datasets`](#apify-datasets) +* [`apify datasets create [DATASETNAME]`](#apify-datasets-create-datasetname) +* [`apify datasets get-items DATASETID`](#apify-datasets-get-items-datasetid) +* [`apify datasets ls`](#apify-datasets-ls) +* [`apify datasets push-items NAMEORID ITEM`](#apify-datasets-push-items-nameorid-item) +* [`apify datasets rename NAMEORID [NEWNAME]`](#apify-datasets-rename-nameorid-newname) +* [`apify datasets rm DATASETNAMEORID`](#apify-datasets-rm-datasetnameorid) * [`apify help [COMMAND]`](#apify-help-command) * [`apify info`](#apify-info) * [`apify init [ACTORNAME]`](#apify-init-actorname) * [`apify key-value-stores`](#apify-key-value-stores) +* [`apify key-value-stores create [KEYVALUESTORENAME]`](#apify-key-value-stores-create-keyvaluestorename) +* [`apify key-value-stores delete-value STOREID ITEMKEY`](#apify-key-value-stores-delete-value-storeid-itemkey) +* [`apify key-value-stores get-value KEYVALUESTOREID ITEMKEY`](#apify-key-value-stores-get-value-keyvaluestoreid-itemkey) +* [`apify key-value-stores keys STOREID`](#apify-key-value-stores-keys-storeid) +* [`apify key-value-stores ls`](#apify-key-value-stores-ls) +* [`apify key-value-stores rename KEYVALUESTORENAMEORID [NEWNAME]`](#apify-key-value-stores-rename-keyvaluestorenameorid-newname) +* [`apify key-value-stores rm KEYVALUESTORENAMEORID`](#apify-key-value-stores-rm-keyvaluestorenameorid) +* [`apify key-value-stores set-value STOREID ITEMKEY [VALUE]`](#apify-key-value-stores-set-value-storeid-itemkey-value) * [`apify login`](#apify-login) * [`apify logout`](#apify-logout) * [`apify pull [ACTORID]`](#apify-pull-actorid) @@ -26,6 +53,12 @@ This section contains printouts of `apify help` for all commands. * [`apify request-queues`](#apify-request-queues) * [`apify run`](#apify-run) * [`apify runs`](#apify-runs) +* [`apify runs abort RUNID`](#apify-runs-abort-runid) +* [`apify runs info RUNID`](#apify-runs-info-runid) +* [`apify runs log RUNID`](#apify-runs-log-runid) +* [`apify runs ls [ACTORID]`](#apify-runs-ls-actorid) +* [`apify runs resurrect RUNID`](#apify-runs-resurrect-runid) +* [`apify runs rm RUNID`](#apify-runs-rm-runid) * [`apify secrets`](#apify-secrets) * [`apify secrets add NAME VALUE`](#apify-secrets-add-name-value) * [`apify secrets rm NAME`](#apify-secrets-rm-name) @@ -45,7 +78,7 @@ DESCRIPTION Commands are designed to be used in Actor runs. All commands are in PoC state, do not use in production environments. ``` -_See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/actor/index.ts)_ +_See code: [src/commands/actor/index.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actor/index.ts)_ ## `apify actor get-input` @@ -59,7 +92,7 @@ DESCRIPTION Gets the Actor input value from the default key-value store associated with the Actor run. ``` -_See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/actor/get-input.ts)_ +_See code: [src/commands/actor/get-input.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actor/get-input.ts)_ ## `apify actor get-value KEY` @@ -76,7 +109,7 @@ DESCRIPTION Gets a value from the default key-value store associated with the Actor run. ``` -_See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/actor/get-value.ts)_ +_See code: [src/commands/actor/get-value.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actor/get-value.ts)_ ## `apify actor push-data [ITEM]` @@ -98,7 +131,7 @@ DESCRIPTION $ cat ./test.json | apify actor push-data ``` -_See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/actor/push-data.ts)_ +_See code: [src/commands/actor/push-data.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actor/push-data.ts)_ ## `apify actor set-value KEY [VALUE]` @@ -127,7 +160,7 @@ DESCRIPTION $ cat ./my-text-file.txt | apify actor set-value KEY --contentType text/plain ``` -_See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/actor/set-value.ts)_ +_See code: [src/commands/actor/set-value.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actor/set-value.ts)_ ## `apify actors` @@ -141,7 +174,320 @@ DESCRIPTION Commands are designed to be used with Actors. ``` -_See code: [src/commands/actors/index.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/actors/index.ts)_ +_See code: [src/commands/actors/index.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actors/index.ts)_ + +## `apify actors build [ACTORID]` + +Creates a new build of the Actor. + +``` +USAGE + $ apify actors build [ACTORID] [--json] [--tag ] [--version ] [--log] + +ARGUMENTS + ACTORID Optional Actor ID or Name to trigger a build for. By default, it will use the Actor from the current + directory. + +FLAGS + --log Whether to print out the build log after the build is triggered. + --tag= Build tag to be applied to the successful Actor build. By default, this is "latest". + --version= Optional Actor Version to build. By default, this will be inferred from the tag, but this flag is + required when multiple versions have the same tag. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Creates a new build of the Actor. +``` + +_See code: [src/commands/actors/build.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actors/build.ts)_ + +## `apify actors call [ACTORID]` + +Runs a specific Actor remotely on the Apify cloud platform. + +``` +USAGE + $ apify actors call [ACTORID] [--json] [-b ] [-t ] [-m ] [-i | --input-file + ] [-s] [-o] + +ARGUMENTS + ACTORID Name or ID of the Actor to run (e.g. "my-actor", "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not + provided, the command runs the remote Actor specified in the ".actor/actor.json" file. + +FLAGS + -b, --build= Tag or number of the build to run (e.g. "latest" or "1.2.34"). + -i, --input= Optional JSON input to be given to the Actor. + -m, --memory= Amount of memory allocated for the Actor run, in megabytes. + -o, --output-dataset Prints out the entire default dataset on successful run of the Actor. + -s, --silent Prevents printing the logs of the Actor run to the console. + -t, --timeout= Timeout for the Actor run in seconds. Zero value means there is no timeout. + --input-file= Optional path to a file with JSON input to be given to the Actor. The file must be a valid + JSON file. You can also specify `-` to read from standard input. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Runs a specific Actor remotely on the Apify cloud platform. + The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". It + takes input for the Actor from the default local key-value store by default. +``` + +_See code: [src/commands/actors/call.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actors/call.ts)_ + +## `apify actors ls` + +Lists all recently ran Actors or your own Actors. + +``` +USAGE + $ apify actors ls [--json] [--my] [--offset ] [--limit ] [--desc] + +FLAGS + --desc Sort Actors in descending order. + --limit= [default: 20] Number of Actors that will be listed. + --my Whether to list Actors made by the logged in user. + --offset= Number of Actors that will be skipped. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Lists all recently ran Actors or your own Actors. +``` + +_See code: [src/commands/actors/ls.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actors/ls.ts)_ + +## `apify actors pull [ACTORID]` + +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. + +``` +USAGE + $ apify actors pull [ACTORID] [-v ] [--dir ] + +ARGUMENTS + ACTORID Name or ID of the Actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the + command will update the Actor in the current directory based on its name in ".actor/actor.json" file. + +FLAGS + -v, --version= Actor version number which will be pulled, e.g. 1.2. Default: the highest version + --dir= Directory where the Actor should be pulled to + +DESCRIPTION + Pulls an Actor from the Apify platform to the current directory. If it is defined as Git repository, it will be + cloned. If it is defined as Web IDE, it will fetch the files. +``` + +_See code: [src/commands/actors/pull.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actors/pull.ts)_ + +## `apify actors push [ACTORID]` + +Uploads the Actor to the Apify platform and builds it there. + +``` +USAGE + $ apify actors push [ACTORID] [-v ] [-b ] [-w ] [--no-prompt] [--force] [--dir ] + +ARGUMENTS + ACTORID Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the + command will create or modify the Actor with the name specified in ".actor/actor.json" file. + +FLAGS + -b, --build-tag= Build tag to be applied to the successful Actor build. By default, it is taken from the + ".actor/actor.json" file + -v, --version= Actor version number to which the files should be pushed. By default, it is taken from + the ".actor/actor.json" file. + -w, --wait-for-finish= Seconds for waiting to build to finish, if no value passed, it waits forever. + --dir= Directory where the Actor is located + --force Push an Actor even when the local files are older than the Actor on the platform. + --no-prompt Do not prompt for opening the Actor details in a browser. This will also not open the + browser automatically. + +DESCRIPTION + Uploads the Actor to the Apify platform and builds it there. + The Actor settings are read from the ".actor/actor.json" file in the current directory, but they can be overridden + using command-line options. + NOTE: If the source files are smaller than 3 MB then they are uploaded as + "Multiple source files", otherwise they are uploaded as "Zip file". + + When there's an attempt to push files that are older than the Actor on the platform, the command will fail. Can be + overwritten with --force flag. +``` + +_See code: [src/commands/actors/push.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actors/push.ts)_ + +## `apify actors rm ACTORID` + +Deletes an Actor. + +``` +USAGE + $ apify actors rm ACTORID + +ARGUMENTS + ACTORID The Actor ID to delete. + +DESCRIPTION + Deletes an Actor. +``` + +_See code: [src/commands/actors/rm.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actors/rm.ts)_ + +## `apify actors start [ACTORID]` + +Runs a specific Actor remotely on the Apify cloud platform and immediately returns information about the run. + +``` +USAGE + $ apify actors start [ACTORID] [--json] [-b ] [-t ] [-m ] [-i | --input-file + ] + +ARGUMENTS + ACTORID Name or ID of the Actor to run (e.g. "my-actor", "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not + provided, the command runs the remote Actor specified in the ".actor/actor.json" file. + +FLAGS + -b, --build= Tag or number of the build to run (e.g. "latest" or "1.2.34"). + -i, --input= Optional JSON input to be given to the Actor. + -m, --memory= Amount of memory allocated for the Actor run, in megabytes. + -t, --timeout= Timeout for the Actor run in seconds. Zero value means there is no timeout. + --input-file= Optional path to a file with JSON input to be given to the Actor. The file must be a valid + JSON file. You can also specify `-` to read from standard input. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Runs a specific Actor remotely on the Apify cloud platform and immediately returns information about the run. + The Actor is run under your current Apify account. Therefore you need to be logged in by calling "apify login". It + takes input for the Actor from the default local key-value store by default. +``` + +_See code: [src/commands/actors/start.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/actors/start.ts)_ + +## `apify builds` + +Commands are designed to be used with Actor Builds. + +``` +USAGE + $ apify builds + +DESCRIPTION + Commands are designed to be used with Actor Builds. +``` + +_See code: [src/commands/builds/index.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/builds/index.ts)_ + +## `apify builds create [ACTORID]` + +Creates a new build of the Actor. + +``` +USAGE + $ apify builds create [ACTORID] [--json] [--tag ] [--version ] [--log] + +ARGUMENTS + ACTORID Optional Actor ID or Name to trigger a build for. By default, it will use the Actor from the current + directory. + +FLAGS + --log Whether to print out the build log after the build is triggered. + --tag= Build tag to be applied to the successful Actor build. By default, this is "latest". + --version= Optional Actor Version to build. By default, this will be inferred from the tag, but this flag is + required when multiple versions have the same tag. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Creates a new build of the Actor. +``` + +_See code: [src/commands/builds/create.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/builds/create.ts)_ + +## `apify builds info BUILDID` + +Prints information about a specific build. + +``` +USAGE + $ apify builds info BUILDID [--json] + +ARGUMENTS + BUILDID The build ID to get information about. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Prints information about a specific build. +``` + +_See code: [src/commands/builds/info.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/builds/info.ts)_ + +## `apify builds log BUILDID` + +Prints the log of a specific build. + +``` +USAGE + $ apify builds log BUILDID + +ARGUMENTS + BUILDID The build ID to get the log from. + +DESCRIPTION + Prints the log of a specific build. +``` + +_See code: [src/commands/builds/log.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/builds/log.ts)_ + +## `apify builds ls [ACTORID]` + +Lists all builds of the Actor. + +``` +USAGE + $ apify builds ls [ACTORID] [--json] [--offset ] [--limit ] [--desc] [-c] + +ARGUMENTS + ACTORID Optional Actor ID or Name to list runs for. By default, it will use the Actor from the current directory. + +FLAGS + -c, --compact Display a compact table. + --desc Sort builds in descending order. + --limit= [default: 10] Number of builds that will be listed. + --offset= Number of builds that will be skipped. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Lists all builds of the Actor. +``` + +_See code: [src/commands/builds/ls.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/builds/ls.ts)_ + +## `apify builds rm BUILDID` + +Deletes an Actor Build. + +``` +USAGE + $ apify builds rm BUILDID + +ARGUMENTS + BUILDID The build ID to delete. + +DESCRIPTION + Deletes an Actor Build. +``` + +_See code: [src/commands/builds/rm.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/builds/rm.ts)_ ## `apify call [ACTORID]` @@ -149,7 +495,7 @@ Runs a specific Actor remotely on the Apify cloud platform. ``` USAGE - $ apify call [ACTORID] [-b ] [-t ] [-m ] [-w ] [-i | --input-file + $ apify call [ACTORID] [--json] [-b ] [-t ] [-m ] [-i | --input-file ] [-s] [-o] ARGUMENTS @@ -157,15 +503,17 @@ ARGUMENTS provided, the command runs the remote Actor specified in the ".actor/actor.json" file. FLAGS - -b, --build= Tag or number of the build to run (e.g. "latest" or "1.2.34"). - -i, --input= Optional JSON input to be given to the Actor. - -m, --memory= Amount of memory allocated for the Actor run, in megabytes. - -o, --output-dataset Prints out the entire default dataset on successful run of the Actor. - -s, --silent Prevents printing the logs of the Actor run to the console. - -t, --timeout= Timeout for the Actor run in seconds. Zero value means there is no timeout. - -w, --wait-for-finish= Seconds for waiting to run to finish, if no value passed, it waits forever. - --input-file= Optional path to a file with JSON input to be given to the Actor. The file must be a - valid JSON file. You can also specify `-` to read from standard input. + -b, --build= Tag or number of the build to run (e.g. "latest" or "1.2.34"). + -i, --input= Optional JSON input to be given to the Actor. + -m, --memory= Amount of memory allocated for the Actor run, in megabytes. + -o, --output-dataset Prints out the entire default dataset on successful run of the Actor. + -s, --silent Prevents printing the logs of the Actor run to the console. + -t, --timeout= Timeout for the Actor run in seconds. Zero value means there is no timeout. + --input-file= Optional path to a file with JSON input to be given to the Actor. The file must be a valid + JSON file. You can also specify `-` to read from standard input. + +GLOBAL FLAGS + --json Format output as json. DESCRIPTION Runs a specific Actor remotely on the Apify cloud platform. @@ -173,7 +521,7 @@ DESCRIPTION takes input for the Actor from the default local key-value store by default. ``` -_See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/call.ts)_ +_See code: [src/commands/call.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/call.ts)_ ## `apify create [ACTORNAME]` @@ -198,7 +546,7 @@ DESCRIPTION Creates a new Actor project directory from a selected boilerplate template. ``` -_See code: [src/commands/create.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/create.ts)_ +_See code: [src/commands/create.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/create.ts)_ ## `apify datasets` @@ -212,7 +560,129 @@ DESCRIPTION Commands are designed to be used with Datasets. ``` -_See code: [src/commands/datasets/index.ts](https://github.com/apify/apify-cli/blob/v0.20.7/src/commands/datasets/index.ts)_ +_See code: [src/commands/datasets/index.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/datasets/index.ts)_ + +## `apify datasets create [DATASETNAME]` + +Creates a new Dataset on your account + +``` +USAGE + $ apify datasets create [DATASETNAME] [--json] + +ARGUMENTS + DATASETNAME Optional name for the Dataset + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Creates a new Dataset on your account +``` + +_See code: [src/commands/datasets/create.ts](https://github.com/apify/apify-cli/blob/v0.21.0/src/commands/datasets/create.ts)_ + +## `apify datasets get-items DATASETID` + +Exports the items present in a Dataset. + +``` +USAGE + $ apify datasets get-items DATASETID [--limit ] [--offset ] [--format json|jsonl|csv|html|rss|xml|xlsx] + +ARGUMENTS + DATASETID The ID of the Dataset to export the items for + +FLAGS + --format=