Skip to content

CLI reference

The CLI wraps the same Public API v1 endpoints for terminal use and scripting. It reads its credentials from the environment and writes results to standard output, so it composes with ordinary shell tools.

Install

Install it globally, or run it without installing using npx.

bash
npm install -g asqiro-cli

# or run it without installing
npx asqiro-cli help

Authenticate

The CLI reads your key from the environment on every call. It never stores credentials on disk.

bash
export ASQIRO_API_KEY="asq_your_key_here"

Environment variables

VariableRequiredDescription
ASQIRO_API_KEYYesThe API key the CLI authenticates with. Create it in Settings.
ASQIRO_BASE_URLNoOverride the API host. Defaults to the production deployment; use HTTPS except for a loopback address in local development.

Commands

CommandDescription
asqiro versionPrint the installed CLI version.
asqiro helpPrint the available commands and authentication settings.
asqiro surveys listList the surveys in the API key's workspace as id, status, response count, and title.
asqiro surveys get <surveyId>Print one survey as JSON.
asqiro responses list <surveyId>Print one survey's response page as JSON.
asqiro responses export <surveyId>Print one survey's responses as CSV on standard output.
asqiro embeds create <surveyId> <externalUserId>Create an embed session for an external user and print its URL as JSON.
asqiro webhooks get <surveyId>Print the configured webhook settings for one survey as JSON.
asqiro webhooks test <surveyId>Send a signed webhook.test event to a survey's configured endpoint.
asqiro webhooks deliveries <surveyId>Print the survey webhook's recent delivery attempts, newest first.

Export responses to a file

responses export writes CSV to standard output, so redirect it to keep the file.

bash
asqiro surveys list

asqiro responses export s_7t2qk8wvbf31 > responses.csv