Build Mobile Apps Faster. Way Faster.
The Crossbuild UI CLI is your command-line companion for jumpstarting Expo projects and integrating stunning, pre-built UI components from Crossbuild UI directly into your workflow.
- Project Initialization: Quickly scaffold new Expo projects with pre-configured templates.
- Component Installation: Seamlessly download and integrate Crossbuild UI components.
- Authentication: Securely log in to your Crossbuild UI account to access exclusive components and features.
- Component Updates: Keep your Crossbuild UI components up-to-date with the latest versions.
- User-Friendly Interface: Interactive prompts and clear feedback with spinners and emojis.
To use the Crossbuild UI CLI, you'll need Node.js (LTS version recommended). You can install the CLI globally using npm or yarn:
npm install -g cbui-cli
# or
yarn global add cbui-cliAfter installation, you can verify it by running:
cbui-cli --versionThe Crossbuild UI CLI provides several commands to help you manage your projects and components.
To see all available commands and options:
cbui-cli --helpFor help with a specific command:
cbui-cli help [command]Initialize a new Expo project with Crossbuild UI setup.
cbui-cli init my-expo-appOptions:
-t, --template <templateName>: Specify a project template (e.g., "default", "cbui-free").cbui-cli init my-premium-app --template cbui-pro
This command will:
- Create a new directory with your
<projectName>. - Download the specified (or default) template from the Crossbuild UI GitHub repository.
- Customize
package.jsonwith your project name. - Prompt you to customize
app.json(name, slug, scheme) with intelligent defaults. - Provide you with the next steps to get your project running.
Authenticate with your Crossbuild UI account via the browser. This is required to download and install components.
cbui-cli loginThis command will open your default web browser to the Crossbuild UI login page. After successful authentication, your credentials will be securely stored locally for future CLI use.
Clear your stored Crossbuild UI authentication credentials from your local machine.
cbui-cli logoutInstall Crossbuild UI components into your current project.
- Install specific components:
cbui-cli install @Crossbuildui/button @Crossbuildui/card
- Install/update components from
package.json: If no package names are provided, the CLI will look for aCrossbuildui.dependenciessection in your project'spackage.jsonand install/update those components to their latest versions.cbui-cli install
Note: You must be logged in (cbui-cli login) to use this command. Components are typically installed into a Crossbuildui directory (or src/Crossbuildui if src exists). Peer dependencies might be added to your project's package.json; you'll be prompted to run npm install (or equivalent) if this happens.
Update specified Crossbuild UI components to their latest versions.
- Update specific components:
cbui-cli update @Crossbuildui/button
Options:
-a, --all: Update all Crossbuild UI components listed in your project'spackage.jsonunderCrossbuildui.dependencies.cbui-cli update --all
Note: You must be logged in (cbui-cli login) to use this command.
Check your current Crossbuild UI authentication status.
cbui-cli statusContributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository on GitHub.
- Clone your fork locally.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with clear, descriptive messages.
- Push your changes to your fork.
- Submit a pull request to the main repository.
Please ensure your code adheres to the project's coding standards and includes tests where appropriate.
This project is licensed under the MIT License.
Happy Building! 🚀 The Crossbuild UI Team