export const API_ENDPOINT = process.env.API_ENDPOINT ?? "https://api.zygon.tech"; export const getApiKey = (): string => { if (!process.env.ZYGON_API_KEY) { console.error("We could not find your API key."); console.error( "For security reasons, you must set your API key in an environment variable called ZYGON_API_KEY. If you do not already have one, you can generate a new key on https://app.zygon.tech/settings/apiKeys.", ); console.error( `On bash based shells (MacOS, Linux, sometimes Windows), you can inline your environment variable in front of your command: "ZYGON_API_KEY=your_key_here ${process.argv.slice(1).join(" ")}"`, ); console.error( `On CMD or PowerShell (Windows), you will need to first set your environment variable: "ZYGON_API_KEY=your_key_here". Then, you can call your command again: "${process.argv.slice(1).join(" ")}"`, ); process.exit(2); } return process.env.ZYGON_API_KEY; };