Integrations
CLI

Pickle CLI

You can use the Pickle CLI to generate TypeScript types for your project based on your project plan.

Install

npm i -D souranalytics/cli

Usage

pickle generate -k YOUR_PROJECT_API_KEY

This will generate types for your plan. Add the file to your tsconfig.json and you're good to go!

Options

OptionTypeDescriptionRequestDefault
-k, --keystringProject API keyYesenv var PICKLE_KEY
-o, --outputstringOutput pathNo./typings/pickle.d.ts
-u, --urlstringProject API keyNohttps://pickle.sh

Tips

  • You can also set the key in the PICKLE_KEY environment variable and skip the -k option
  • You can add a predev script to package.json to call the Pickle CLI. This way, you always have the latest types in your project