CLI tool for Embeddable
npm install @embeddable.com/initA CLI tool that helps you quickly set up your first Embeddable project. It guides you through the entire onboarding process—from project creation to pushing your first components to your workspace.
Run the following command to get started:
``bash`
npx @embeddable.com/init
The CLI will walk you through:
1. Creating a new project folder
2. Downloading the boilerplate project template
3. Installing dependencies
4. Configuring your API credentials and region (US/EU)
5. Building and deploying your initial bundle to your Embeddable workspace
- Node.js 20 or higher
- An Embeddable account with an API key
`bash`
npm install
`bash`
npm run build
`bash`
npm run dev
`bash`
npm test
The test suite covers:
- User cancellation at each prompt stage
- Error handling (network failures, npm install failures, build/push failures)
- Happy path flows for both US and EU regions
- Non-fatal warnings (git init failure, config update issues)
- Cleanup behavior on failure
After building, you can test the CLI locally:
`bash`
node dist/index.js
or run from a separate directory:
`bash`
npx
Publishing happens automatically when code is merged to main. The GitHub Action will:
1. Build the package
2. Bump the patch version
3. Publish to npm
4. Push the version bump commit back to the repo
To verify a release:
`bash`
npm view @embeddable.com/init
```
├── src/
│ └── index.ts # Main CLI application
├── test/
│ └── index.test.ts # Test suite
├── dist/ # Compiled output (generated)
├── package.json # Package configuration
├── tsconfig.json # TypeScript configuration
└── tsup.config.ts # Build configuration
MIT