Skip to main content

How to get started with the Prolific CLI

Set up authentication, explore the available commands, and learn what the Prolific CLI can do for you

The Prolific CLI (command-line interface) lets you manage studies, submissions, and other resources through Prolific's application programming interface (API), directly from your terminal. Once it's installed, use this article to get up and running.

You'll need to install the CLI first. Follow the steps in How to install the Prolific CLI.

What can you do with the CLI?

Use the Prolific CLI to:

  • Manage studies from creation to publishing, including via a YAML or JSON configuration file

  • View and manage submissions, credentials, filter sets, and participant groups

  • Check your account, workspace, and project details

  • Automate workflows with hook subscriptions and messaging

It works in both interactive and non-interactive modes, so you can explore commands manually or build them into automated scripts.

See the CLI in action

Set up authentication

The CLI authenticates using a Researcher token.

  1. Go to your Prolific account tokens page and create a Researcher token.

  2. Set the token as an environment variable:

    export PROLIFIC_TOKEN="<your token>"

You'll need to set this variable in every new terminal session, unless you add it to your shell profile.

Optional settings

Use a different API environment

If Prolific has given you access to a different environment, point the CLI at it:

export PROLIFIC_URL="https://api.prolific.com"

Set a default workspace

Add a config file at $HOME/.config/prolific-oss/prolific.yaml with your default workspace:

workspace: <your workspace id>

You can point the CLI to a different config file at any time with the --config flag.

Available commands

Run prolific [command] to use any of the following:

Command

What it does

aitaskbuilder

Manage AI Task Builder batches, datasets, and collections

bonus

Create and pay bonuses for study participants

campaign

View details about your campaigns

collection

Manage and view your collections

completion

Generate an autocompletion script for your shell

credentials

Manage credential pools

eligibility-count

Count how many participants match a set of filters

feedback

View participant feedback for your studies

filter-sets

Manage and view your filter sets

filters

List all filters available for your study

help

Get help for any command

hook

Manage and view your hook subscriptions

invitation

Manage workspace invitations

message

Send and retrieve messages

participant

Manage and view your participant groups

project

Manage and view your projects in a workspace

researcher

Manage researcher resources

reward-recommendations

Calculate recommended participant reward rates

studies

List all of your studies

study

Manage and view your studies

submission

Manage and view your study submissions

survey

Manage and view your surveys

template

Browse and retrieve study and collection templates

whoami

View your account details

workspace

Manage and view your workspaces

Run prolific [command] --help to see everything a command can do.

Global flags

Flag

What it does

--config <path>

Use a config file from a custom location

-h, --help

Show help for the CLI or a command

--skill <name>

Identify the AI skill or workflow invoking this command (included in the User-Agent header sent with API requests)

-v, --version

Show the CLI version

What's next

Ready to create your first study from the command line? See How to create a study using the Prolific CLI.

Did this answer your question?