create-micdrop 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +61 -2
  2. package/dist/index.js +1315 -0
  3. package/package.json +53 -4
  4. package/templates/expo/App.tsx +123 -0
  5. package/templates/expo/README.md +65 -0
  6. package/templates/expo/_env.example +6 -0
  7. package/templates/expo/_gitignore +7 -0
  8. package/templates/expo/app.json +34 -0
  9. package/templates/expo/babel.config.js +6 -0
  10. package/templates/expo/index.ts +4 -0
  11. package/templates/expo/package.json +39 -0
  12. package/templates/expo/server/index.ts +36 -0
  13. package/templates/expo/server/tsconfig.json +14 -0
  14. package/templates/expo/src/serverUrl.ts +20 -0
  15. package/templates/expo/tsconfig.json +8 -0
  16. package/templates/nextjs/README.md +40 -0
  17. package/templates/nextjs/_env.example +9 -0
  18. package/templates/nextjs/_gitignore +7 -0
  19. package/templates/nextjs/app/CallLoader.tsx +10 -0
  20. package/templates/nextjs/app/VoiceCall.tsx +71 -0
  21. package/templates/nextjs/app/globals.css +45 -0
  22. package/templates/nextjs/app/layout.tsx +16 -0
  23. package/templates/nextjs/app/page.tsx +10 -0
  24. package/templates/nextjs/next.config.ts +5 -0
  25. package/templates/nextjs/package.json +34 -0
  26. package/templates/nextjs/server/index.ts +35 -0
  27. package/templates/nextjs/tsconfig.json +25 -0
  28. package/templates/nextjs/tsconfig.server.json +14 -0
  29. package/templates/node/README.md +48 -0
  30. package/templates/node/_env.example +6 -0
  31. package/templates/node/_gitignore +4 -0
  32. package/templates/node/package.json +21 -0
  33. package/templates/node/src/server.ts +34 -0
  34. package/templates/node/tsconfig.json +14 -0
  35. package/templates/phone/README.md +86 -0
  36. package/templates/phone/_env.example +31 -0
  37. package/templates/phone/_gitignore +5 -0
  38. package/templates/phone/package.json +25 -0
  39. package/templates/phone/src/recording.ts +65 -0
  40. package/templates/phone/src/server.ts +212 -0
  41. package/templates/phone/src/webhooks.ts +88 -0
  42. package/templates/phone/telephony/plivo/env.example +6 -0
  43. package/templates/phone/telephony/plivo/setup.md +7 -0
  44. package/templates/phone/telephony/plivo/telephony.ts +111 -0
  45. package/templates/phone/telephony/telnyx/env.example +8 -0
  46. package/templates/phone/telephony/telnyx/setup.md +9 -0
  47. package/templates/phone/telephony/telnyx/telephony.ts +107 -0
  48. package/templates/phone/telephony/twilio/env.example +6 -0
  49. package/templates/phone/telephony/twilio/setup.md +7 -0
  50. package/templates/phone/telephony/twilio/telephony.ts +98 -0
  51. package/templates/phone/telephony/vonage/env.example +7 -0
  52. package/templates/phone/telephony/vonage/setup.md +15 -0
  53. package/templates/phone/telephony/vonage/telephony.ts +105 -0
  54. package/templates/phone/tsconfig.json +14 -0
  55. package/templates/vite-react/README.md +39 -0
  56. package/templates/vite-react/_env.example +2 -0
  57. package/templates/vite-react/_gitignore +4 -0
  58. package/templates/vite-react/index.html +12 -0
  59. package/templates/vite-react/package.json +36 -0
  60. package/templates/vite-react/src/client/App.tsx +75 -0
  61. package/templates/vite-react/src/client/main.tsx +10 -0
  62. package/templates/vite-react/src/client/styles.css +45 -0
  63. package/templates/vite-react/src/server/index.ts +42 -0
  64. package/templates/vite-react/tsconfig.json +16 -0
  65. package/templates/vite-react/tsconfig.server.json +14 -0
  66. package/templates/vite-react/vite.config.ts +23 -0
package/README.md CHANGED
@@ -1,3 +1,62 @@
1
- # Temporary Holding Version
1
+ # 🖐️🎤 create-micdrop
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [Micdrop website](https://micdrop.dev) | [Documentation](https://micdrop.dev/docs/templates)
4
+
5
+ Start a voice AI app with [Micdrop](https://micdrop.dev) in one command: the
6
+ client, the Node server that runs the AI, a `.env` to fill and a README.
7
+
8
+ ```bash
9
+ npm create micdrop@latest
10
+ ```
11
+
12
+ It asks for a folder, a template and the AI that runs the call, then offers to
13
+ install the dependencies. `pnpm create micdrop`, `yarn create micdrop` and
14
+ `bun create micdrop` work the same way.
15
+
16
+ ## Templates
17
+
18
+ | Template | What you get |
19
+ | ------------ | ------------------------------------------------------------------------------ |
20
+ | `nextjs` | A Next.js page that holds the call, and a WebSocket server next to it |
21
+ | `vite-react` | A React page built with Vite, and a Fastify server |
22
+ | `expo` | An iOS and Android app with React Native, and its server |
23
+ | `phone` | A phone agent on Twilio, Telnyx, Vonage or Plivo, with transfers and recording |
24
+ | `node` | A WebSocket server alone, for any Micdrop client |
25
+
26
+ ## AI providers
27
+
28
+ Pick a preset (`openai`, `openai-realtime`, `gemini-live`, `grok-voice`,
29
+ `mistral`, `europe`, `local`) or each part of the call: speech to text, agent
30
+ and text to speech, or one speech to speech model. The `europe` preset runs
31
+ Speechmatics, Mistral and Gradium on their EU endpoints, and the `local` preset
32
+ runs Whisper, Ollama and Kokoro on your machine, with no key.
33
+
34
+ ## Without questions
35
+
36
+ ```bash
37
+ npm create micdrop@latest my-agent -- --template phone --telephony twilio --ai openai
38
+ pnpm create micdrop my-app --template nextjs --stt gladia --agent mistral --tts elevenlabs
39
+ ```
40
+
41
+ `--help` lists every flag, and the
42
+ [documentation](https://micdrop.dev/docs/templates) describes them.
43
+
44
+ ## Developing the templates
45
+
46
+ The templates live in `templates/`, one folder each, with `{{name}}` and the
47
+ other tokens of `src/generate.ts` replaced when a project is written. The
48
+ generator adds `ai.ts`, `.env.example` and `.env` from the providers picked, and
49
+ sets every `@micdrop/*` dependency to the version of this repository.
50
+
51
+ ```bash
52
+ pnpm test # the generator
53
+ pnpm test:templates # every template, typechecked on the packages of this repository
54
+ pnpm test:templates --install vite-react # one template, installed from npm and built
55
+ ```
56
+
57
+ `test:templates` needs the packages of the repository built (`pnpm build` at
58
+ its root). Neither command calls an AI provider.
59
+
60
+ ## License
61
+
62
+ MIT