Install the latest version of Node.JS
Run the following command:
npm i -g cnfair-cli
Install the latest version of Node.JS
Install the latest version of Bun
Run the following command:
bun install --production --frozen-lockfile
Run the following command:
bun run build
Run the following command:
bun link
To update the CLI you can simply run the following command:
npm i -g cnfair-cli
To use the CLI run the following command:
cnfair --help
Allows to set the pandabuy token used to redeem the products
You can find out your current token by running this in a browser tab currently logged into pandabuy:
token = localStorage.getItem("PANDABUY_TOKEN");
console.log(token || "ERROR: Pandabuy token not found")
Recovers the redeem code for every specified productId on CNFair and then redeem them on Pandabuy.
Product ids often look like this: PI0000000000
and can be found in the URL of a CNFair product, example:
https://cnfair.com/detail/PI0000000000
flag | description | Default |
---|---|---|
-r, --restock | Enable restock mode | false |
-d, --delay | Delay between each attempts in seconds | 5 |
--restock-delay | Delay between each attempts in seconds when in restock mode | 10 |
-w, --way | Payment method (choices: "points", "balance") | points |
Redeem a single product:
cnfair redeem PI00000001
Redeem two products:
cnfair redeem PI00000001 PI00000002
Redeem two products and pay with balance:
cnfair redeem -w balance PI00000001 PI00000002
Redeem a product with a retry delay of 1s:
cnfair redeem -d 1 PI00000001
Monitor a product for restock:
cnfair redeem -r PI00000001
Monitor a product for restock every 20s:
cnfair redeem -r --restock-delay 20 PI00000001
Redeem 3 products with a delay of 1s, enable restock monitoring with a delay of 20s and pay with balance:
cnfair redeem -d 1 -r --restock-delay 20 -w balance PI00000001 PI00000002 PI00000003