mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-10 01:06:17 +00:00
Merge: Resolve package-lock.json conflict and add logo video to README
This commit is contained in:
134
README.md
134
README.md
@@ -55,66 +55,47 @@ A **TypeScript bot** that automatically earns Microsoft Rewards points by comple
|
|||||||
git clone https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
|
git clone https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
|
||||||
cd Microsoft-Rewards-Bot
|
cd Microsoft-Rewards-Bot
|
||||||
|
|
||||||
# 2. Install dependencies
|
# 2. Start the bot (does EVERYTHING automatically!)
|
||||||
npm install
|
npm start
|
||||||
|
|
||||||
# 3. Setup and run
|
|
||||||
npm run setup
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**That's it!** The wizard will guide you through account setup and start earning points.
|
**That's literally it!** 🎉
|
||||||
|
|
||||||
|
The `npm start` command will automatically:
|
||||||
|
- ✅ Install dependencies if needed
|
||||||
|
- ✅ Install Chromium browser if needed
|
||||||
|
- ✅ Build TypeScript if needed
|
||||||
|
- ✅ Launch the bot
|
||||||
|
|
||||||
|
On first run, you'll be prompted to configure your accounts interactively.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🎮 Essential Commands
|
## 🎮 Essential Commands
|
||||||
|
|
||||||
Here are the most useful commands for daily usage:
|
### **🚀 Main Command**
|
||||||
|
|
||||||
### **🚀 Main Commands**
|
|
||||||
|
|
||||||
| Command | Description |
|
|
||||||
|---------|-------------|
|
|
||||||
| `npm run go` | **⭐ Ultimate command** — Installs browser if needed, builds, and starts the bot |
|
|
||||||
| `npm start` | **Quick start** — Runs the bot (builds automatically if needed) |
|
|
||||||
| `npm run setup` | **Interactive wizard** — Guides you through initial setup |
|
|
||||||
| `npm run dev` | **Development mode** — Watch mode with auto-reload |
|
|
||||||
|
|
||||||
### **🔧 Build & Maintenance**
|
|
||||||
|
|
||||||
| Command | Description |
|
|
||||||
|---------|-------------|
|
|
||||||
| `npm run build` | Compile TypeScript to JavaScript (`dist/` folder) |
|
|
||||||
| `npm run typecheck` | Check TypeScript errors without building |
|
|
||||||
| `npm run clean` | Remove build artifacts (`dist/` folder) |
|
|
||||||
| `npm run install:browser` | Install Playwright Chromium (smart: only installs once) |
|
|
||||||
|
|
||||||
### **🎯 Specialized Tools**
|
|
||||||
|
|
||||||
| Command | Description |
|
|
||||||
|---------|-------------|
|
|
||||||
| `npm run dashboard` | Start web dashboard on `http://localhost:3000` |
|
|
||||||
| `npm run creator` | Launch account creation wizard |
|
|
||||||
| `npm run test` | Run test suite |
|
|
||||||
|
|
||||||
### **💡 Quick Recipes**
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# First time setup
|
|
||||||
npm run go
|
|
||||||
|
|
||||||
# Daily usage (after first setup)
|
|
||||||
npm start
|
npm start
|
||||||
|
|
||||||
# Create new accounts
|
|
||||||
npm run creator -- -y backup@gmail.com https://rewards.bing.com/welcome?rh=CODE
|
|
||||||
|
|
||||||
# Monitor with dashboard
|
|
||||||
npm run dashboard
|
|
||||||
# Then open http://localhost:3000 in your browser
|
|
||||||
|
|
||||||
# Fix issues / rebuild
|
|
||||||
npm run clean ; npm run build
|
|
||||||
```
|
```
|
||||||
|
**The ONLY command you need!** Automatically handles:
|
||||||
|
- 📦 Dependencies installation (if missing)
|
||||||
|
- 🌐 Browser installation (if missing)
|
||||||
|
- 🔨 TypeScript compilation (if missing)
|
||||||
|
- ▶️ Bot execution
|
||||||
|
|
||||||
|
### **🔧 Optional Commands**
|
||||||
|
|
||||||
|
| Command | Use When |
|
||||||
|
|---------|----------|
|
||||||
|
| `npm run build` | Force rebuild TypeScript |
|
||||||
|
| `npm run clean` | Clean build artifacts before rebuild |
|
||||||
|
| `npm run dev` | Development mode (hot reload) |
|
||||||
|
| `npm run creator` | Create new Microsoft accounts |
|
||||||
|
| `npm run dashboard` | Start web dashboard on port 3000 |
|
||||||
|
| `npm test` | Run test suite |
|
||||||
|
|
||||||
|
**💡 Pro Tip:** For 99% of use cases, just use `npm start` — it's smart enough to figure out what needs to be done!
|
||||||
|
|
||||||
**📖 [Complete Commands Reference →](docs/commands.md)**
|
**📖 [Complete Commands Reference →](docs/commands.md)**
|
||||||
|
|
||||||
@@ -124,62 +105,53 @@ npm run clean ; npm run build
|
|||||||
|
|
||||||
### **First-Time Setup** (New User)
|
### **First-Time Setup** (New User)
|
||||||
```bash
|
```bash
|
||||||
# 1. Install dependencies
|
# Just run this - it does EVERYTHING!
|
||||||
npm install
|
|
||||||
|
|
||||||
# 2. Run the ultimate setup command
|
|
||||||
npm run go
|
|
||||||
# This will guide you through account setup, install browser, build, and start!
|
|
||||||
```
|
|
||||||
|
|
||||||
### **Daily Usage** (Regular User)
|
|
||||||
```bash
|
|
||||||
# Just start the bot - it builds automatically if needed
|
|
||||||
npm start
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use the ultimate command if you want to be extra safe:
|
On first run:
|
||||||
|
1. ✅ Installs all dependencies automatically
|
||||||
|
2. ✅ Installs Chromium browser automatically
|
||||||
|
3. ✅ Builds the TypeScript project automatically
|
||||||
|
4. ✅ Prompts you to configure accounts
|
||||||
|
5. ✅ Starts earning points!
|
||||||
|
|
||||||
|
### **Daily Usage** (Regular User)
|
||||||
```bash
|
```bash
|
||||||
npm run go
|
# Same command - but skips already-done steps!
|
||||||
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
### **After Git Pull** (Updating the Bot)
|
### **After Git Pull** (Updating)
|
||||||
```bash
|
```bash
|
||||||
# Quick method (recommended)
|
# Just this - it checks and updates what's needed
|
||||||
npm run go
|
npm start
|
||||||
|
|
||||||
# Or manual method
|
|
||||||
npm install # Update dependencies (if package.json changed)
|
|
||||||
npm run build # Rebuild if code changed
|
|
||||||
npm start # Run
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### **Creating New Accounts**
|
### **Creating New Accounts**
|
||||||
```bash
|
```bash
|
||||||
# Interactive mode (asks everything)
|
# Interactive mode
|
||||||
npm run creator
|
npm run creator
|
||||||
|
|
||||||
# Quick mode with recovery email + referral
|
# Quick mode with referral
|
||||||
npm run creator -- -y backup@gmail.com https://rewards.bing.com/welcome?rh=CODE
|
npm run creator -- -y backup@gmail.com https://rewards.bing.com/welcome?rh=CODE
|
||||||
```
|
```
|
||||||
|
|
||||||
### **Troubleshooting** (When Things Break)
|
### **Troubleshooting** (Issues)
|
||||||
```bash
|
```bash
|
||||||
# Clean rebuild
|
# Clean rebuild
|
||||||
npm run clean
|
npm run clean
|
||||||
npm run build
|
npm start
|
||||||
|
|
||||||
# Or full reset
|
# Full reset (nuclear option)
|
||||||
rm -rf node_modules dist
|
rm -rf node_modules dist .playwright-chromium-installed
|
||||||
npm install
|
npm start
|
||||||
npm run go
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### **Monitoring** (Check Status)
|
### **Monitoring**
|
||||||
```bash
|
```bash
|
||||||
# Start web dashboard
|
|
||||||
npm run dashboard
|
npm run dashboard
|
||||||
# Then open http://localhost:3000
|
# Open http://localhost:3000
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ services:
|
|||||||
|
|
||||||
# Volume mounts: Specify a location where you want to save the files on your local machine.
|
# Volume mounts: Specify a location where you want to save the files on your local machine.
|
||||||
volumes:
|
volumes:
|
||||||
- ../src/accounts.jsonc:/usr/src/microsoft-rewards-bot/dist/accounts.jsonc:ro
|
- ../src/accounts.jsonc:/usr/src/microsoft-rewards-bot/accounts.jsonc:ro
|
||||||
- ../src/config.jsonc:/usr/src/microsoft-rewards-bot/dist/config.jsonc:ro
|
- ../src/config.jsonc:/usr/src/microsoft-rewards-bot/config.jsonc:ro
|
||||||
- ../sessions:/usr/src/microsoft-rewards-bot/sessions # Optional, saves your login session
|
- ../sessions:/usr/src/microsoft-rewards-bot/sessions # Optional, saves your login session
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -73,21 +73,21 @@ The container needs access to your configuration files via volume mounts:
|
|||||||
```yaml
|
```yaml
|
||||||
volumes:
|
volumes:
|
||||||
# Read-only mounts for configuration (prevents accidental container edits)
|
# Read-only mounts for configuration (prevents accidental container edits)
|
||||||
- ./src/accounts.jsonc:/usr/src/microsoft-rewards-bot/dist/accounts.jsonc:ro
|
- ../src/accounts.jsonc:/usr/src/microsoft-rewards-bot/accounts.jsonc:ro
|
||||||
- ./src/config.jsonc:/usr/src/microsoft-rewards-bot/dist/config.jsonc:ro
|
- ../src/config.jsonc:/usr/src/microsoft-rewards-bot/config.jsonc:ro
|
||||||
|
|
||||||
# Read-write mount for persistent login sessions
|
# Read-write mount for persistent login sessions
|
||||||
- ./sessions:/usr/src/microsoft-rewards-bot/dist/browser/sessions
|
- ../sessions:/usr/src/microsoft-rewards-bot/sessions
|
||||||
```
|
```
|
||||||
|
|
||||||
**Paths explained:**
|
**Paths explained:**
|
||||||
- `./src/accounts.jsonc` = `docker/../src/accounts.jsonc` (relative from compose.yaml location)
|
- `../src/accounts.jsonc` = `docker/../src/accounts.jsonc` (relative from compose.yaml location, goes to project root)
|
||||||
- `./sessions` = `docker/sessions/` (local to docker folder)
|
- `../sessions` = `docker/../sessions/` (project root sessions folder)
|
||||||
|
|
||||||
**Before starting:**
|
**Before starting:**
|
||||||
1. Create `src/accounts.jsonc` (copy from `src/accounts.example.jsonc`)
|
1. Create `src/accounts.jsonc` (copy from `src/accounts.example.jsonc`)
|
||||||
2. Edit `src/config.jsonc` with your settings
|
2. Edit `src/config.jsonc` with your settings
|
||||||
3. (Optional) Create `docker/sessions/` directory for persistent login
|
3. (Optional) Create `sessions/` directory at project root for persistent login
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -334,8 +334,9 @@ docker inspect microsoft-rewards-bot | grep -A 10 Mounts
|
|||||||
```yaml
|
```yaml
|
||||||
# Paths are relative to compose.yaml location (docker/)
|
# Paths are relative to compose.yaml location (docker/)
|
||||||
volumes:
|
volumes:
|
||||||
- ./src/accounts.jsonc:/usr/src/microsoft-rewards-bot/dist/accounts.jsonc:ro
|
- ../src/accounts.jsonc:/usr/src/microsoft-rewards-bot/accounts.jsonc:ro
|
||||||
# This resolves to: docker/../src/accounts.jsonc (project root)
|
# This resolves to: docker/../src/accounts.jsonc (project root)
|
||||||
|
# Note: Files mount to project root, NOT dist/ (Load.ts searches multiple locations)
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
9
package-lock.json
generated
9
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "microsoft-rewards-bot",
|
"name": "microsoft-rewards-bot",
|
||||||
"version": "2.60.0",
|
"version": "2.60.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "microsoft-rewards-bot",
|
"name": "microsoft-rewards-bot",
|
||||||
"version": "2.60.0",
|
"version": "2.60.1",
|
||||||
"license": "CC-BY-NC-SA-4.0",
|
"license": "CC-BY-NC-SA-4.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.8.4",
|
"axios": "^1.8.4",
|
||||||
@@ -3227,10 +3227,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/playwright-core": {
|
"node_modules/playwright-core": {
|
||||||
"name": "rebrowser-playwright-core",
|
|
||||||
"version": "1.52.0",
|
"version": "1.52.0",
|
||||||
"resolved": "https://registry.npmjs.org/rebrowser-playwright-core/-/rebrowser-playwright-core-1.52.0.tgz",
|
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.52.0.tgz",
|
||||||
"integrity": "sha512-gjrvLNh0RX6B/tg6pWaPNGf+9+z1Jl2EyAh5MXD5xMa2lputGRZ9V2MJ/uofcC5Np3vSOJ3SdVSRqwteC0FjfQ==",
|
"integrity": "sha512-l2osTgLXSMeuLZOML9qYODUQoPPnUsKsb5/P6LJ2e6uPKXUdPK5WYhN4z03G+YNbWmGDY4YENauNu4ZKczreHg==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"playwright-core": "cli.js"
|
"playwright-core": "cli.js"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "microsoft-rewards-bot",
|
"name": "microsoft-rewards-bot",
|
||||||
"version": "2.60.0",
|
"version": "2.60.1",
|
||||||
"description": "Automate Microsoft Rewards points collection",
|
"description": "Automate Microsoft Rewards points collection",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
@@ -16,21 +16,16 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/LightZirconite/Microsoft-Rewards-Bot#readme",
|
"homepage": "https://github.com/LightZirconite/Microsoft-Rewards-Bot#readme",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"go": "node -e \"const fs = require('fs'); const cp = require('child_process'); console.log('🚀 Running complete setup and start...'); if (!fs.existsSync('.playwright-chromium-installed')) { console.log('📦 Installing Chromium...'); cp.execSync('npx playwright install chromium --with-deps', {stdio: 'inherit'}); fs.writeFileSync('.playwright-chromium-installed', new Date().toISOString()); } if (!fs.existsSync('dist/index.js')) { console.log('🔨 Building project...'); cp.execSync('npm run build', {stdio: 'inherit'}); } console.log('✅ Setup complete! Starting bot...'); cp.execSync('npm start', {stdio: 'inherit'});\"",
|
"start": "node -e \"const fs = require('fs'); const cp = require('child_process'); const path = require('path'); console.log('🚀 Starting Microsoft Rewards Bot...'); if (!fs.existsSync('node_modules')) { console.log('📦 Installing dependencies...'); cp.execSync('npm install', {stdio: 'inherit'}); } if (!fs.existsSync('.playwright-chromium-installed')) { console.log('🌐 Installing Chromium browser...'); cp.execSync('npx playwright install chromium --with-deps', {stdio: 'inherit'}); fs.writeFileSync('.playwright-chromium-installed', new Date().toISOString()); } if (!fs.existsSync('dist/index.js')) { console.log('🔨 Building TypeScript project...'); cp.execSync('npm run build', {stdio: 'inherit'}); } console.log('✅ All checks passed! Launching bot...\\n'); cp.execSync('node --enable-source-maps ./dist/index.js', {stdio: 'inherit'});\"",
|
||||||
"clean": "rimraf dist",
|
"clean": "rimraf dist",
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"install:browser": "node -e \"const fs = require('fs'); if (!fs.existsSync('.playwright-chromium-installed')) { console.log('📦 Installing Chromium browser...'); require('child_process').execSync('npx playwright install chromium --with-deps', {stdio: 'inherit'}); fs.writeFileSync('.playwright-chromium-installed', new Date().toISOString()); } else { console.log('✓ Chromium already installed (use npm run install:browser:force to reinstall)'); }\"",
|
|
||||||
"install:browser:force": "npx playwright install chromium --with-deps",
|
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"build:clean": "npm run clean && npm run build",
|
"build:clean": "npm run clean && npm run build",
|
||||||
"prestart": "node -e \"const fs = require('fs'); if (!fs.existsSync('dist/index.js')) { console.log('⚠️ Compiled files not found, building...'); require('child_process').execSync('npm run build', {stdio: 'inherit'}); }\"",
|
|
||||||
"start": "node --enable-source-maps ./dist/index.js",
|
|
||||||
"dev": "ts-node ./src/index.ts -dev",
|
"dev": "ts-node ./src/index.ts -dev",
|
||||||
"test": "node --test --require ts-node/register tests/**/*.test.ts",
|
"test": "node --test --require ts-node/register tests/**/*.test.ts",
|
||||||
"creator": "ts-node ./src/account-creation/cli.ts",
|
"creator": "ts-node ./src/account-creation/cli.ts",
|
||||||
"dashboard": "node --enable-source-maps ./dist/index.js -dashboard",
|
"dashboard": "node --enable-source-maps ./dist/index.js -dashboard",
|
||||||
"dashboard:dev": "ts-node ./src/index.ts -dashboard",
|
"dashboard:dev": "ts-node ./src/index.ts -dashboard",
|
||||||
"setup": "node ./scripts/installer/setup.mjs",
|
|
||||||
"update": "node ./scripts/installer/update.mjs",
|
"update": "node ./scripts/installer/update.mjs",
|
||||||
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
||||||
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
|
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
|
||||||
|
|||||||
Reference in New Issue
Block a user