- Prerequisites and minimum Dart SDK requirements
- How to add
jetleaftopubspec.yamland import it - How to enable
jetleaf_devtoolfor local development - When to prefer the Hapnium builder vs manual installation
Recommended: Use the Hapnium builder for new projects (fast, configurable, production-ready outputs); use manual installation to add JetLeaf to existing projects or when you prefer full control over dependencies.
1) Manual installation (pub.dev)
Add dependency
Edit your project’spubspec.yaml and add JetLeaf as a dependency:
Tip: Replace<latest-version>with the version you want or use^latestafter checking the package page on pub.dev.
Minimum Dart SDK
Check the JetLeaf package’spubspec on pub.dev for the required SDK constraint and set your project’s environment accordingly. Example:
SDK entry in the package details.
Import in code
Using jetleaf_devtool (optional but recommended for development)
If you want the developer tooling (commands such as jl proxy, jl build, jl dev), activate the CLI:
- Global activation:
- Or add as a dev dependency (so it is recorded in your project):
CLI must be activated (globally or available in project dev deps) to access dev commands. If you use the Hapnium builder and include the devtool, remember to activate the CLI locally to run the generated commands.
2) Install using JetLeaf Hapnium (UI-based)
Visit: https://build.jetleaf.hapnium.com The Hapnium builder gives you a polished, visual way to configure your JetLeaf project:- Select the JetLeaf packages you want to include
- Preview generated files in an IDE-style view
- Configure project name, description and metadata
- Optionally include
jetleaf_devtooland see the CLI commands included - Generate a
Dockerfileand recommended production settings - Download the ready-made project or push to a repo
The Hapnium builder speeds up project setup and reduces manual configuration mistakes — especially useful if you want a ready Docker configuration and a pre-configured dev toolchain.
Note: If you include the devtool via the Hapnium UI, you still need to activate thejetleaf_devtoolCLI locally (dart pub global activate jetleaf_devtool) to run commands likejl dev.