Skip to content

Latest commit

Β 

History

1,190 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

Prolific CLI

A command-line interface for Prolific


GitHub Badge

The CLI for all Prolific interactions β€” built for humans and AI agents.

brew install prolific-oss/tap/prolific see Installation for other options.

CLI application for retrieving data from the Prolific Platform

Usage:
  prolific [command]

Available Commands:
  aitaskbuilder AI Task Builder tools and utilities
  bonus         Create and pay bonuses for study participants
  campaign      Provide details about your campaigns
  collection    Manage and view your collections
  completion    Generate the autocompletion script for the specified shell
  credentials   Manage credential pools
  feedback      View participant feedback for your studies
  filter-sets   Manage and view your filter sets
  filters       List all filters available for your study
  help          Help about 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
  studies       List all of your studies
  study         Manage and view your studies
  submission    Manage and view your study submissions
  template      Browse and retrieve study and collection templates
  whoami        View details about your account
  workspace     Manage and view your workspaces

Flags:
      --config string   config file (default is $HOME/.config/prolific-oss/prolific.yaml)
  -h, --help            help for prolific
      --skill string    Optional identifier for the AI skill/workflow invoking this command; folded into the User-Agent header sent with API requests
  -v, --version         version for prolific

Use "prolific [command] --help" for more information about a command.

List view of studies

Detail view of a study

Main features include:

  • Ability to list and filter studies.
  • Ability to list submissions for a given study.
  • Ability to list studies and define which fields to do display in a table format.
  • Ability to render details about a study, and the submissions.
  • Ability to create and update credential pools for studies requiring authentication.
  • Ability to download credentials usage report for a study as CSV.
  • Ability to create a Study via a YAML/JSON configuration file.
  • Ability to publish a study whilst creating it (if you have sufficient funds).
  • Ability to silently create a study, meaning you can script creating many studies in one go.
  • Ability to get your user account details.
  • Ability to list your hook subscriptions.
  • Ability to send and retrieve messages.
  • Ability to list and view your filter sets.
  • Ability to list and view your participant groups.
  • Ability to retrieve participant feedback and aggregate study ratings.

Checkout the wiki for more tips and tricks.

Requirements

If you are wanting to build and develop this, you will need the following items installed. If, however, you just want to run the application I recommend using a binary (See below).

Configuration

You can create studies via a configuration file. See some examples in /docs/examples. It's one study per file.

You can then create a study by calling:

prolific study create -t docs/examples/standard-sample.yaml

You can also define some defaults in the configuration file: $HOME/.config/prolific-oss/prolific.yaml.

Currently you can define the following:

workspace: xxxxxxxxxx

Environment variables

You will need the following environment variables defining:

export PROLIFIC_TOKEN=""

You can create a Researcher token in your account.

You can optionally override the URL for the API too. This will be set as default to the Prolific API URL. You can override this if Prolific have granted you access to a different environment.

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

Installation

You can install this application a few ways:

Installation via Homebrew
brew install prolific-oss/tap/prolific
Installation via Git
git clone https://github.com/prolific-oss/cli.git
cd cli
make all
./prolific

You can also install into your $GOPATH/bin by running make build && go install.

Installation via Binaries

You can download the binaries from the release pages. Find the release you want, and check the "Assets" section.

Once downloaded, be sure to put the binary in a folder that is referenced in your $PATH.

Installation via Go Install
go install github.com/prolific-oss/cli/cmd/prolific@latest

Development with Claude Code

When implementing new CLI commands, use the /cli-command-create skill.

Option 1: Natural Language

Simply describe what command you want to create:

Create a new command to publish collections
Add a command that lets users delete studies

Claude will ask follow-up questions to gather the ticket number, API contract, and other details.

Option 2: Slash Command with Arguments

Use the slash command with optional arguments:

/cli-command-create

Or provide arguments directly (ticket, resource, command, command-type):

/cli-command-create DCP-2190 collection publish CREATE
/cli-command-create DCP-2200 study delete ACTION

Argument order: [ticket] [resource] [command] [command-type]

Argument Description Examples
ticket Jira ticket number DCP-2190
resource Resource name collection, study, workspace
command Command name list, get, create, publish
command-type Command type (optional) LIST, VIEW, CREATE, UPDATE, ACTION

If any arguments are omitted, Claude will ask for them interactively.

What the Skill Does

  1. Gathers requirements (API contract, flags, command type)
  2. Presents an implementation plan for approval
  3. Implements model, client, command, UI renderers, mocks, and tests
  4. Verifies with make test and make lint

API Coverage

A full manifest of which Prolific API operations this CLI covers, generated from the test suite that validates the client against the live API spec on every run β€” useful if you're deciding whether to shell out to the CLI or call the API directly from an agent or script.

Operations are grouped as they appear in contract_test/contract_test.go, which validates every entry marked βœ… against the live Prolific OpenAPI spec on every test run.

Workspaces
Operation Method Path Coverage
get-workspaces GET /api/v1/workspaces/ βœ… GetWorkspaces
create-workspace POST /api/v1/workspaces/ βœ… CreateWorkspace
get-workspace GET /api/v1/workspaces/{workspace_id}/ βž– Not exposed in the CLI
update-workspace PATCH /api/v1/workspaces/{workspace_id}/ βž– Not exposed in the CLI
get-workspace-balance GET /api/v1/workspaces/{workspace_id}/balance/ βœ… GetWorkspaceBalance
Projects
Operation Method Path Coverage
get-projects GET /api/v1/workspaces/{workspace_id}/projects/ βœ… GetProjects
create-project POST /api/v1/workspaces/{workspace_id}/projects/ βœ… CreateProject
get-project GET /api/v1/projects/{project_id}/ βœ… GetProject
update-project PATCH /api/v1/projects/{project_id}/ βž– Not exposed in the CLI
delete-project-study DELETE /api/v1/projects/{project_id}/studies/{study_id}/ βž– Not exposed in the CLI
Filters
Operation Method Path Coverage
get-filters GET /api/v1/filters/ βœ… GetFilters
get-filter-distribution GET /api/v1/filters/{id}/distribution/ βž– Not exposed in the CLI
get-eligible-count POST /api/v1/eligibility-count/ βœ… GetEligibilityCount
Filter Sets
Operation Method Path Coverage
get-filter-sets GET /api/v1/filter-sets/ βœ… GetFilterSets
create-filter-set POST /api/v1/filter-sets/ βœ… CreateFilterSet
get-filter-set GET /api/v1/filter-sets/{id}/ βœ… GetFilterSet
delete-filter-set DELETE /api/v1/filter-sets/{id}/ βž– Not exposed in the CLI
update-filter-set PATCH /api/v1/filter-sets/{id}/ βž– Not exposed in the CLI
clone-filter-set POST /api/v1/filter-sets/{id}/clone/ βž– Not exposed in the CLI
lock-filter-set POST /api/v1/filter-sets/{id}/lock/ βž– Not exposed in the CLI
unlock-filter-set POST /api/v1/filter-sets/{id}/unlock/ βž– Not exposed in the CLI
Webhooks
Operation Method Path Coverage
get-event-types GET /api/v1/hooks/event-types/ βœ… GetHookEventTypes
get-secrets GET /api/v1/hooks/secrets/ βœ… GetHookSecrets
create-secret POST /api/v1/hooks/secrets/ βœ… CreateHookSecret
get-subscriptions GET /api/v1/hooks/subscriptions/ βœ… GetHooks
create-subscription POST /api/v1/hooks/subscriptions/ βœ… CreateHookSubscription
get-subscription GET /api/v1/hooks/subscriptions/{subscription_id}/ βž– Not exposed in the CLI
confirm-subscription POST /api/v1/hooks/subscriptions/{subscription_id}/ βœ… ConfirmHookSubscription
delete-subscription DELETE /api/v1/hooks/subscriptions/{subscription_id}/ βœ… DeleteHookSubscription
update-subscription PATCH /api/v1/hooks/subscriptions/{subscription_id}/ βœ… UpdateHookSubscription
get-events GET /api/v1/hooks/subscriptions/{subscription_id}/events/ βœ… GetEvents
Surveys
Operation Method Path Coverage
get-surveys GET /api/v1/surveys/ βœ… GetSurveys
create-survey POST /api/v1/surveys/ βœ… CreateSurvey
get-survey GET /api/v1/surveys/{survey_id} βœ… GetSurvey
delete-survey DELETE /api/v1/surveys/{survey_id} βœ… DeleteSurvey
get-responses GET /api/v1/surveys/{survey_id}/responses/ βœ… GetSurveyResponses
create-response POST /api/v1/surveys/{survey_id}/responses/ βœ… CreateSurveyResponse
delete-responses DELETE /api/v1/surveys/{survey_id}/responses/ βœ… DeleteAllSurveyResponses
get-summary GET /api/v1/surveys/{survey_id}/responses/summary/ βœ… GetSurveyResponseSummary
get-response GET /api/v1/surveys/{survey_id}/responses/{response_id} βœ… GetSurveyResponse
delete-response DELETE /api/v1/surveys/{survey_id}/responses/{response_id} βœ… DeleteSurveyResponse
AI Task Builder β€” Batches
Operation Method Path Coverage
get-task-builder-batches GET /api/v1/data-collection/batches βœ… GetAITaskBuilderBatches
create-task-builder-batch POST /api/v1/data-collection/batches βœ… CreateAITaskBuilderBatch
get-task-builder-batch GET /api/v1/data-collection/batches/{batch_id} βœ… GetAITaskBuilderBatch
update-task-builder-batch PATCH /api/v1/data-collection/batches/{batch_id} βœ… UpdateAITaskBuilderBatch
get-task-builder-batch-status GET /api/v1/data-collection/batches/{batch_id}/status βœ… GetAITaskBuilderBatchStatus
setup-task-builder-batch POST /api/v1/data-collection/batches/{batch_id}/setup βœ… SetupAITaskBuilderBatch
get-task-builder-batch-task-responses GET /api/v1/data-collection/batches/{batch_id}/responses βœ… GetAITaskBuilderResponses
get-task-builder-batch-report GET /api/v1/data-collection/batches/{batch_id}/report/ βž– Not exposed in the CLI
duplicate-task-builder-batch POST /api/v1/data-collection/batches/{batch_id}/duplicate βž– Not exposed in the CLI
sync-task-builder-batch POST /api/v1/data-collection/batches/{batch_id}/sync βœ… SyncAITaskBuilderBatch
get-batch-sync-status GET /api/v1/data-collection/batches/{batch_id}/syncs/{sync_id} βœ… GetAITaskBuilderBatchSyncStatus
request-batch-export POST /api/v1/data-collection/batches/{batch_id}/export βœ… InitiateBatchExport
get-batch-export-status GET /api/v1/data-collection/batches/{batch_id}/export/{export_id} βœ… GetBatchExportStatus
AI Task Builder β€” Datasets
Operation Method Path Coverage
create-task-builder-dataset POST /api/v1/data-collection/datasets βœ… CreateAITaskBuilderDataset
update-task-builder-dataset PATCH /api/v1/data-collection/datasets/{dataset_id} βž– Not exposed in the CLI
append-dataset-datapoints POST /api/v1/data-collection/datasets/{dataset_id}/datapoints βž– Not exposed in the CLI
get-dataset-upload-url GET /api/v1/data-collection/datasets/{dataset_id}/upload-url/{filename} βœ… GetAITaskBuilderDatasetUploadURL
get-task-builder-dataset GET /api/v1/data-collection/datasets/{dataset_id} βœ… GetAITaskBuilderDataset
get-task-builder-dataset-status GET /api/v1/data-collection/datasets/{dataset_id}/status βœ… GetAITaskBuilderDatasetStatus
get-dataset-import-status GET /api/v1/data-collection/datasets/{dataset_id}/imports/{import_id} βœ… GetAITaskBuilderDatasetImportStatus
get-schema-migration-status GET /api/v1/data-collection/datasets/{dataset_id}/schema-migrations/{job_id} βž– Not exposed in the CLI
AI Task Builder β€” Instructions
Operation Method Path Coverage
get-task-builder-instructions GET /api/v1/data-collection/batches/{batch_id}/instructions βž– Not exposed in the CLI
create-task-builder-instructions POST /api/v1/data-collection/batches/{batch_id}/instructions βœ… CreateAITaskBuilderInstructions
update-task-builder-instructions PUT /api/v1/data-collection/batches/{batch_id}/instructions βž– Not exposed in the CLI
AI Task Builder β€” Collections
Operation Method Path Coverage
list-collections GET /api/v1/data-collection/collections βœ… GetCollections
create-collection POST /api/v1/data-collection/collections βœ… CreateAITaskBuilderCollection
get-collection GET /api/v1/data-collection/collections/{collection_id} βœ… GetCollection
update-collection PUT /api/v1/data-collection/collections/{collection_id} βœ… UpdateCollection
get-collection-responses GET /api/v1/data-collection/collections/{collection_id}/responses βž– Not exposed in the CLI
request-collection-export POST /api/v1/data-collection/collections/{collection_id}/export βœ… InitiateCollectionExport
get-collection-export-status GET /api/v1/data-collection/collections/{collection_id}/export/{export_id} βœ… GetCollectionExportStatus
Invitations
Operation Method Path Coverage
create-invitation POST /api/v1/invitations/ βœ… CreateInvitation
Messages
Operation Method Path Coverage
get-messages GET /api/v1/messages/ βœ… GetMessages
send-message POST /api/v1/messages/ βœ… SendMessage
bulk-message-participants POST /api/v1/messages/bulk/ βœ… BulkSendMessage
send-message-to-participant-group POST /api/v1/messages/participant-group/ βœ… SendGroupMessage
get-unread-messages GET /api/v1/messages/unread/ βœ… GetUnreadMessages
Studies
Operation Method Path Coverage
get-studies GET /api/v1/studies/ βœ… GetStudies
create-study POST /api/v1/studies/ βœ… CreateStudy
get-project-studies GET /api/v1/projects/{project_id}/studies/ βœ… GetStudies
delete-project-study DELETE /api/v1/projects/{project_id}/studies/{study_id}/ βž– Not exposed in the CLI
get-study GET /api/v1/studies/{id}/ βœ… GetStudy
delete-study DELETE /api/v1/studies/{id}/ βž– Not exposed in the CLI
update-study PATCH /api/v1/studies/{id}/ βœ… UpdateStudy
publish-study POST /api/v1/studies/{id}/transition/ βœ… TransitionStudy
create-test-study POST /api/v1/studies/{id}/test-study βœ… TestStudy
get-study-access-details-progress GET /api/v1/studies/{id}/access-details-progress/ βž– Not exposed in the CLI
get-study-cost GET /api/v1/studies/{id}/cost/ βž– Not exposed in the CLI
get-study-submissions GET /api/v1/studies/{id}/submissions/ βœ… GetSubmissions
count-study-submissions-by-status GET /api/v1/studies/{id}/submissions/counts/ βœ… GetStudySubmissionCounts
download-study-credential-report GET /api/v1/studies/{id}/credentials/report/ βœ… GetStudyCredentialsUsageReportCSV
export-study GET /api/v1/studies/{id}/export/ βž– Not exposed in the CLI
export-demographic-data POST /api/v1/studies/{id}/demographic-export/ βœ… ExportDemographics
get-demographic-export-history GET /api/v1/studies/{id}/demographic-export-history/ βž– Not exposed in the CLI
duplicate-study POST /api/v1/studies/{id}/clone/ βœ… DuplicateStudy
calculate-study-cost POST /api/v1/study-cost-calculator/ βž– Not exposed in the CLI
Credentials
Operation Method Path Coverage
list-credential-pools GET /api/v1/credentials/ βœ… ListCredentialPools
create-credential-pool POST /api/v1/credentials/ βœ… CreateCredentialPool
update-credential-pool PATCH /api/v1/credentials/{credential_pool_id}/ βœ… UpdateCredentialPool
Reward Recommendations
Operation Method Path Coverage
calculate-reward-recommendations GET /api/v1/reward-recommendations/ βœ… GetRewardRecommendations
Well-known endpoints
Operation Method Path Coverage
get-study-jwks GET /.well-known/study/jwks.json βž– Not exposed in the CLI
Submissions
Operation Method Path Coverage
get-submissions GET /api/v1/submissions/ βž– Not exposed in the CLI
get-submission GET /api/v1/submissions/{id}/ βž– Not exposed in the CLI
transition-submission POST /api/v1/submissions/{id}/transition/ βœ… TransitionSubmission
request-submission-return POST /api/v1/submissions/{id}/request-return/ βœ… RequestSubmissionReturn
get-submission-feedback-upload-url GET /api/v1/submissions/signals/upload-url/{filename} βž– Not exposed in the CLI
bulk-approve-submissions POST /api/v1/submissions/bulk-approve/ βœ… BulkApproveSubmissions
Bonuses
Operation Method Path Coverage
create-bonus-payments POST /api/v1/submissions/bonus-payments/ βœ… CreateBonusPayments
pay-bonus-payments POST /api/v1/bulk-bonus-payments/{id}/pay/ βœ… PayBonusPayments
Users
Operation Method Path Coverage
get-user GET /api/v1/users/me/ βœ… GetMe
create-test-participant-for-researcher POST /api/v1/researchers/participants/ βœ… CreateTestParticipant
Participant Groups
Operation Method Path Coverage
get-participant-groups GET /api/v1/participant-groups/ ⚠️ Covered, not spec-validated β€” test harness limitation
create-participant-group POST /api/v1/participant-groups/ βœ… CreateParticipantGroup
get-participant-group GET /api/v1/participant-groups/{id}/ βž– Not exposed in the CLI
delete-participant-group DELETE /api/v1/participant-groups/{id}/ βž– Not exposed in the CLI
update-participant-group PATCH /api/v1/participant-groups/{id}/ βž– Not exposed in the CLI
get-participant-group-participants GET /api/v1/participant-groups/{id}/participants/ βœ… GetParticipantGroup
add-to-participant-group POST /api/v1/participant-groups/{id}/participants/ βž– Not exposed in the CLI
remove-from-participant-group DELETE /api/v1/participant-groups/{id}/participants/ βœ… RemoveParticipantGroupMembers

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to get started.

Release Process

Releases are managed via GitHub Releases with changelog generation powered by git-cliff.

1. Generate changelog

make changelog VERSION=0.0.60

This generates grouped release notes from conventional commits, merges any hand-written notes from the ## next section of CHANGELOG.md, and updates the changelog file.

2. Create a release PR

Create a PR with the updated CHANGELOG.md and apply the release label.

One CI gate will validate the PR:

  • Changelog gate β€” confirms CHANGELOG.md is modified when the release label is present.

Steps 1–2 can also happen automatically. .github/workflows/release-cadence-check.yml runs weekly (and on manual workflow_dispatch) checking for unreleased user-facing commits on main; if it finds any, it runs make changelog and opens a release PR itself, defaulting to a PATCH version bump. It never merges, tags, or releases anything β€” step 3 below still requires a human to review and merge, exactly as if the PR had been opened by hand. If the auto-computed PATCH bump is wrong for a given batch of changes (i.e. it includes a breaking change), edit the version heading in the PR's CHANGELOG.md diff to the next MINOR version before merging.

Not the right time to release (e.g. other work is still landing and you'd rather batch it in)? Closing an auto-opened PR without merging is a normal way to defer β€” it isn't permanent, and the next scheduled run will propose a fresh PR if unreleased commits still remain.

3. Merge to trigger the release

Merging the PR to main triggers .github/workflows/create-release.yml on that push. The workflow only performs a release when the merged PR has the release label (it checks linked PRs for that label); other pushes to main do not create tags or releases.

When a release runs, it automatically:

  1. Extracts the version from the top-most ## x.y.z section in CHANGELOG.md
  2. Creates and pushes a vx.y.z git tag
  3. Creates a GitHub Release titled vx.y.z (always use the v prefix for tags and release names, e.g. v1.0.1, not 1.0.1) with the matching changelog section as release notes
  4. Builds binaries for multiple platforms (darwin, linux, windows, freebsd) and uploads them to the release

Users can then download binaries from the release page or use go install.

About

πŸ”¬ A CLI for managing and automating workflows on the Prolific platform

Resources

Contributing

Stars

13 stars

Watchers

5 watching

Forks

Releases

Contributors

Languages