New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

actor-cmd

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actor-cmd

Actor command-line interface (CLI) helps you work with the Apify Actors.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Actor command-line interface (Actor CLI)

npm version Build Status

...

Installation

Via Homebrew

On macOS (or Linux), you can install the Actor CLI via the Homebrew package manager.

brew install actor-cli

Via NPM

First, make sure you have Node.js version 20 or higher with NPM installed on your computer:

node --version
npm --version

Install or upgrade Actor CLI by running:

npm -g install actor-cli

If you receive an EACCES error, you might need to run the command as root:

sudo npm -g install actor-cli

Alternatively, you can use Node Version Manager (nvm) and install Actor CLI only into a selected user-level Node version without requiring root privileges:

nvm install 20
nvm use 20
npm -g install actor-cli

Finally, verify that Actor CLI was installed correctly by running:

apify --version

which should print something like:

actor-cli/0.10.0 darwin-x64 node-v20.14.2

You can also skip the manual global installation altogether and use npx actor-cli with all the following commands instead.

Basic usage

The following examples demonstrate the basic usage of Actor CLI.

...

Need help?

To see all CLI commands simply run:

actor help

To get information about a specific command run:

actor help COMMAND

Still haven't found what you were looking for? Please go to Apify Help center or contact us.

Command reference

This section contains printouts of apify help for all commands.

actor get-input

Gets the Actor input value from the default key-value store associated with the Actor run.

USAGE
  $ actor get-input

DESCRIPTION
  Gets the Actor input value from the default key-value store associated with the Actor run.

See code: src/commands/get-input.ts

actor get-value KEY

Gets a value from the default key-value store associated with the Actor run.

USAGE
  $ actor get-value KEY

ARGUMENTS
  KEY  Key of the record in key-value store

DESCRIPTION
  Gets a value from the default key-value store associated with the Actor run.

See code: src/commands/get-value.ts

actor help [COMMAND]

Display help for actor.

USAGE
  $ actor help [COMMAND...] [-n]

ARGUMENTS
  COMMAND...  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for actor.

See code: @oclif/plugin-help

actor push-data [ITEM]

Saves data to Actor's run default dataset.

USAGE
  $ actor push-data [ITEM]

ARGUMENTS
  ITEM  JSON string with one object or array of objects containing data to be stored in the default dataset.

DESCRIPTION
  Saves data to Actor's run default dataset.

  Accept input as:
  - JSON argument:
  $ actor push-data {"key": "value"}
  - Piped stdin:
  $ cat ./test.json | actor push-data

See code: src/commands/push-data.ts

actor set-value KEY [VALUE]

Sets or removes record into the default key-value store associated with the Actor run.

USAGE
  $ actor set-value KEY [VALUE] [-c <value>]

ARGUMENTS
  KEY    Key of the record in key-value store.
  VALUE  Record data, which can be one of the following values:
         - If empty, the record in the key-value store is deleted.
         - If no `contentType` flag is specified, value is expected to be any JSON string value.
         - If options.contentType is set, value is taken as is.

FLAGS
  -c, --contentType=<value>  Specifies a custom MIME content type of the record. By default "application/json" is used.

DESCRIPTION
  Sets or removes record into the default key-value store associated with the Actor run.

  It is possible to pass data using argument or stdin.

  Passing data using argument:
  $ actor set-value KEY my-value

  Passing data using stdin with pipe:
  $ cat ./my-text-file.txt | actor set-value KEY --contentType text/plain

See code: src/commands/set-value.ts

Keywords

FAQs

Package last updated on 29 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc