This project allows easy access token retrieval for BitBucket Cloud in CLI apps.
npm i @soliantconsulting/bitbucket-cloud-cli-auth
pnpm add @soliantconsulting/bitbucket-cloud-cli-auth
import { getAccessToken } from "@soliantconsulting/bitbucket-cloud-cli-auth";
const accessToken = await getAccessToken(clientId, port);