Back to template gallery

CLI-based Actor starter

Actorize a CLI utility with the Apify Actor CLI

Language

javascript

Tools

Features

main.sh

1#!/bin/bash
2set -ex
3
4# Parse input values
5input="$(apify actor get-input)"
6name="$(jq -r .name <<< "$input")"
7
8# Construct an output object and push it to the dataset (Actor results)
9echo '{}' |
10    jq ".name = \"$name\"" |
11    jq ".greeting = \"Hello $name!\"" |
12    apify actor push-data

Actor CLI starter template

Start a new Actorization project quickly and easily with this project template. It provides a basic structure for building an Actor with the Apify CLI and allows you to easily add your own functionality.

Included features

How it works

This template is useful when you're already familiar with the Apify Platform and want to use the Apify CLI to turn almost any project into an Actor.

Resources

Already have a solution in mind?

Sign up for a free Apify account and deploy your code to the platform in just a few minutes! If you want a head start without coding it yourself, browse our Store of existing solutions.