detl-optimizely-export
v0.0.0
Published
A CLI for exporting data from Optimizely
Readme
DETL Optimizely Export CLI
This is a CLI tool for exporting the decisions and events data from experiments that have ran in Optimizely. This allows you to see the data behind a particular experiment and how it performed over time as well as debug issues with result data.
To use this tool, you can follow the instructions below if you have an NPM account set up, if you don't then please do the following after cloning the repository:
1: Run pnpm install to install the dependencies.
2: Export your Optimizely API key as an environment variable called OPTIMIZELY_TOKEN.
3: Run the command pnpm run run export <EXPERIMENTID> <DATE> to export the data for a specific experiment and date.
- For example
pnpm run run export 9300002425237 2025-06-27will export the data for the experiment with ID9300002425237for the date2025-06-27.
If you'd like these files to be in a JSON format, you can run the following command after exporting the data:
pnpm run run transformThis will transform the exported Parquet files into the JSON format.
Usage
$ npm install -g detl-optimizely-export
$ detl-optimizely-export COMMAND
running command...
$ detl-optimizely-export (--version)
detl-optimizely-export/0.0.0 darwin-arm64 node-v22.17.0
$ detl-optimizely-export --help [COMMAND]
USAGE
$ detl-optimizely-export COMMAND
...Commands
detl-optimizely-export autocomplete [SHELL]detl-optimizely-export export EXPERIMENTID DATEdetl-optimizely-export help [COMMANDS]detl-optimizely-export transform
detl-optimizely-export autocomplete [SHELL]
Display autocomplete installation instructions.
USAGE
$ detl-optimizely-export autocomplete [SHELL] [-r]
ARGUMENTS
SHELL (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ detl-optimizely-export autocomplete
$ detl-optimizely-export autocomplete bash
$ detl-optimizely-export autocomplete zsh
$ detl-optimizely-export autocomplete powershell
$ detl-optimizely-export autocomplete --refresh-cacheSee code: @oclif/plugin-autocomplete
detl-optimizely-export export EXPERIMENTID DATE
Export experiment data from Optimizely
USAGE
$ detl-optimizely-export export EXPERIMENTID DATE [--type <value>]
ARGUMENTS
EXPERIMENTID The id for the experiment you want to export
DATE The date for the data you want to export
FLAGS
--type=<value> [default: decisions] The type of data you want to export
DESCRIPTION
Export experiment data from OptimizelySee code: src/commands/export/index.ts
detl-optimizely-export help [COMMANDS]
Display help for detl-optimizely-export.
USAGE
$ detl-optimizely-export help [COMMANDS] [-n]
ARGUMENTS
COMMANDS Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for detl-optimizely-export.See code: @oclif/plugin-help
detl-optimizely-export transform
Transform the exported experiment data from Optimizely to JSON
USAGE
$ detl-optimizely-export transform
DESCRIPTION
Transform the exported experiment data from Optimizely to JSONSee code: src/commands/transform/index.ts
