@embeddable.com/init
v0.1.23
Published
CLI tool for Embeddable
Readme
@embeddable.com/init
A 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.
Usage
Run the following command to get started:
npx @embeddable.com/initThe CLI will walk you through:
- Creating a new project folder
- Downloading the boilerplate project template
- Installing dependencies
- Configuring your API credentials and region (US/EU)
- Building and deploying your initial bundle to your Embeddable workspace
Requirements
- Node.js 20 or higher
- An Embeddable account with an API key
Development
Setup
npm installBuild
npm run buildWatch mode
npm run devRun tests
npm testThe 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
Test locally
After building, you can test the CLI locally:
node dist/index.jsor run from a separate directory:
npx <path-to-this-repo>Publishing to npm
Publishing happens automatically when code is merged to main. The GitHub Action will:
- Build the package
- Bump the patch version
- Publish to npm
- Push the version bump commit back to the repo
To verify a release:
npm view @embeddable.com/initProject Structure
├── 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 configurationLicense
MIT
