Run CLI via tsx (no build required); note in README
This commit is contained in:
@@ -8,7 +8,7 @@ Small TypeScript CLI to send, monitor, and webhook WhatsApp messages via Twilio.
|
|||||||
2. Copy `.env.example` to `.env` and fill in `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, and `TWILIO_WHATSAPP_FROM` (use your approved WhatsApp-enabled Twilio number, prefixed with `whatsapp:`).
|
2. Copy `.env.example` to `.env` and fill in `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, and `TWILIO_WHATSAPP_FROM` (use your approved WhatsApp-enabled Twilio number, prefixed with `whatsapp:`).
|
||||||
- Alternatively, use API keys: `TWILIO_API_KEY` + `TWILIO_API_SECRET` instead of `TWILIO_AUTH_TOKEN`.
|
- Alternatively, use API keys: `TWILIO_API_KEY` + `TWILIO_API_SECRET` instead of `TWILIO_AUTH_TOKEN`.
|
||||||
- Optional: `TWILIO_SENDER_SID` to skip auto-discovery of the WhatsApp sender in Twilio.
|
- Optional: `TWILIO_SENDER_SID` to skip auto-discovery of the WhatsApp sender in Twilio.
|
||||||
3. Build once for the runnable bin: `pnpm build`
|
3. (Optional) Build: `pnpm build` (scripts run directly via tsx, no build required for local use)
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsx src/index.ts",
|
"dev": "tsx src/index.ts",
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsc -p tsconfig.json",
|
||||||
"start": "node dist/index.js",
|
"start": "tsx src/index.ts",
|
||||||
"warelay": "node dist/index.js",
|
"warelay": "tsx src/index.ts",
|
||||||
"warely": "node dist/index.js",
|
"warely": "tsx src/index.ts",
|
||||||
"lint": "echo \"No linter configured\"",
|
"lint": "echo \"No linter configured\"",
|
||||||
"test": "echo \"No tests yet\""
|
"test": "echo \"No tests yet\""
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user