This is the command-line interface for Bootstrap 4.
You'll need the following software installed to get started.
- Node.js 0.12+: Use the installer provided on the NodeJS website.
- With Node installed, run
[sudo] npm install -g grunt bower
.
- With Node installed, run
- Git: Use the installer for your OS.
- Windows users can also try Git for Windows.
Some projects require Gulp instead of Grunt, [sudo] npm install -g gulp
to install Gulp.
The Bootstrap CLI is installed through npm.
npm install -g bootstrap-cli
This will add the bootstrap
command to your system.
The CLI periodically gets updates that add features or fix bugs. Use npm to upgrade the CLI to the newest version.
npm update -g bootstrap-cli
To check what version you currently have, use -v
.
bootstrap -v
Starts the setup process for a new Bootstrap project. The CLI will ask you which template you want to use and a folder name for the project.
bootstrap new
bootstrap new --repo https://github.com/username/template-name.git
Or create a PR to add your templates to the bootstrap-cli/lib/util/templates.js
file.
While inside of your app's folder, use the watch
command to assemble your app and run a test server.
cd appName
bootstrap watch
While this process is running, you can view the assembled app in your browser, at this URL:
http://localhost:8080
While the server is running, any changes you make to your HTML, Sass, or JavaScript will automatically be processed and added to your live app.
To build your app for production, use bootstrap build
.
bootstrap build
Updates your Bower packages, which includes Bootstrap. Run this command when you want to update an existing project to the newest version of Bootstrap.
Bootstrap update
Lists all available commands in the CLI.
bootstrap help
Add a command name at the end to learn how a specific command works.
bootstrap help new
Inspired on Foundation CLI