Eitri CLI¶
The Eitri CLI is the starting point for developing Eitri-Apps. With it, you can create, develop, test, and publish Eitri-Apps for your organization's applications.
Requirements¶
To use the Eitri CLI, you will need to have the following installed on your machine:
Tip
Run eitri doctor to check that your machine has everything the CLI needs.
Installation¶
npm install -g eitri-cli
Info
If you encounter any permission errors during installation, check if your user privileges are sufficient for the installation.
Update¶
To update your CLI, use the eitri self-update command.
Available Commands¶
Add --help or -h at the end of any command to see how to use it and all its options. Most commands can only be run after eitri login.
| Command | What it does |
|---|---|
login |
Links the CLI to your Eitri developer account |
create |
Creates a new Eitri-App |
start |
Runs the Eitri-App in development mode, with hot-reload |
push-version |
Uploads a version of the Eitri-App to the Console |
publish |
Publishes the current version in an environment |
test |
Runs the Eitri-App tests |
clean |
Cleans your remote workspace |
workspace |
Manages your workspaces |
app |
Runs and manages several Eitri-Apps of an application (app-config.yaml) |
dependencies |
Lists, adds, and opens the docs of Eitri-App dependencies |
theme |
Manages the Luminus theme versions of the application |
agents |
Sets up the AI agents of the Eitri-App |
libs |
Lists the versions of the Eitri libraries |
doctor |
Checks your machine's dependencies |
self-update |
Updates the CLI to the latest version |
login¶
eitri login [options]
Logs into the Eitri platform, saving your account credentials on your machine and linking the CLI to your Eitri developer account.
Options¶
| Option | Description |
|---|---|
--yes |
Accepts the redirection to the Console without asking. |
-v, --verbose |
Displays detailed messages during execution. |
create¶
eitri create [options] <project-name>
Creates a new Eitri-App project on your machine and registers it on the Eitri platform.
You will need to provide some information when creating an Eitri-App:
Application
: The application in which your Eitri-App will run.
Display Name
: Name used in the Console listing. It is used internally and is not visible to users.
Marketing Name
: Product name, used in promotion and contact points with the user. This name may be visible to users.
Unique Name
: Also called slug, it uniquely identifies the Eitri-App on the Eitri platform and is used to reference it in several places, including deep links. It must be unique among Eitri-Apps and must not contain spaces or special characters.
Options¶
| Option | Description |
|---|---|
--yes |
Uses the default values for name, title, and organization. |
--application <application> |
Sets the application of the Eitri-App. |
-t, --template [template] |
Creates the Eitri-App from the given template. Without a value, shows the template selection. |
-v, --verbose |
Displays detailed messages during execution. |
eitri create my-eitri-app --template
start¶
eitri start [options]
Starts the Eitri-App for development in an online workspace and shows a QR Code to be scanned with your organization's app (or with Eitri Play).
As you save your files, the Eitri-App is hot-reloaded and the changes show up on your device in real time.
Options¶
| Option | Description |
|---|---|
-i, --initialization-params <query-params> |
Sends initialization parameters to the Eitri-App. E.g.: 'foo=bar&hello=world'. |
-p, --playground |
Shows the QR Code to open the Eitri-App in Eitri Play. |
-e, --emulator <platform> |
Opens the Eitri-App in the emulator of the given platform: android or ios. |
-sh, --shared |
Runs the Eitri-App in shared mode. |
-S, --show-deeplink |
Displays the workspace deep link. |
-sm, --skip-mini-log |
Skips the connection to the mini-log. |
-f, --force |
Forces the start. |
-v, --verbose |
Displays detailed messages during execution. |
Deprecated: --initializationParams
The --initializationParams <initializationParams> form still works, but it is deprecated. Use --initialization-params.
Keyboard shortcuts¶
While eitri start or eitri app start is running, type a key in the terminal and press enter:
| Key | Action |
|---|---|
a |
Opens the Eitri-App on Android. |
i |
Opens the Eitri-App on iOS (macOS only). |
q / Q |
Shows the QR Code again. |
r |
Reloads the Eitri-App. |
p |
Changes the initialization parameters without restarting. |
In eitri app start, the a, i, q, and r keys ask which Eitri-App of the app-config.yaml you want to use.
Initialization parameters¶
Initialization parameters let you open the Eitri-App in a specific scenario (a product, a user, a route) without changing the code. Inside the Eitri-App, read them with Eitri.getInitializationInfos(), which returns them already converted into an object:
const params = await Eitri.getInitializationInfos();
// --initialization-params 'productId=123&[email protected]'
// params => { productId: "123", email: "[email protected]" }
eitri start --initialization-params 'productId=123&[email protected]'
In the app-config.yaml:
initialization-params:
type: "string"
value: "productId=123&[email protected]"
Query string only
These parameters must be in query string format (key=value&key2=value2). JSON is not supported here; to send JSON, use the parameters of each tab of the Bottom Tab Bar simulation.
Changing the parameters while running¶
You don't need to stop and run start again to try other parameters. Type p and press enter in the terminal:
The prompt comes filled in with the current parameters. Edit the value and press enter; leave it empty to remove the parameters.
Info
The p key is not available with --playground.
Without bottom-tab-view-simulation, it changes the parameters of the Eitri-App marked as focus in the app-config.yaml, the same way as in eitri start.
When the app-config.yaml has bottom-tab-view-simulation, Eitri Play uses the parameters of each tab and ignores the global ones. So the p key asks:
- which tab to change;
- the parameter type:
string(query string) orjson; - the value (empty removes the tab parameters). Invalid JSON is rejected on the spot.
After changing, the CLI publishes the new parameters again. Scan the QR Code again or reopen the Eitri-App through the deep link to apply them.
Note
Changes made with p only last for the current session: the app-config.yaml file is not changed.
See the initialization parameters guide for more examples.
push-version¶
eitri push-version [options]
Uploads a version of your Eitri-App to the Console. The version becomes available for publication in the environments registered for the application.
Options¶
| Option | Description |
|---|---|
-m, --message <version-message> |
Adds a message to the version. |
-r, --release |
Generates a new release from the commits, creating the CHANGELOG.md file automatically. See Semantic Release. |
-s, --shared |
Uploads the version of a shared Eitri-App. |
-y, --yes |
Automatically accepts the prompt answers. |
-v, --verbose |
Displays detailed messages during execution. |
Warning
Check the version of your Eitri-App in eitri-app.conf.js: you cannot upload a version that already exists in the Console.
publish¶
eitri publish --environment <environment-id> [options]
Publishes the current version of the Eitri-App, defined in eitri-app.conf.js, in the selected environment.
Options¶
| Option | Description |
|---|---|
-e, --environment <environment-id> |
Required. Environment where the version will be published. |
-m, --message <message> |
Adds comments to the publication. |
Where to find the environment id
In the Eitri Console, go to Applications, select your application and click Your environments.
test¶
eitri test [options]
Runs the tests of your Eitri-App. See Tests.
Options¶
| Option | Description |
|---|---|
-p, --path <path> |
Path of the test file to run. |
-w, --watch |
Watches the files and runs the tests again on every change. |
-v, --verbose |
Displays detailed messages during execution. |
clean¶
eitri clean [options]
Cleans your remote workspace.
When you run eitri start, your workspace is built with the code on your machine and updated as you save your files. If something goes wrong with the cloud build, eitri clean helps restore it.
Options¶
| Option | Description |
|---|---|
-v, --verbose |
Displays detailed messages during execution. |
workspace¶
eitri workspace <command> [options]
Manages your workspaces, allowing you to use more than one.
| Command | Description |
|---|---|
list |
Lists your workspaces. |
use [options] |
Selects the workspace to be used. |
create |
Creates a new workspace. |
current |
Displays the current workspace, following the priority Local > Global. |
clean |
Cleans the remote workspace. Useful when the cloud build of the Eitri-App malfunctions. Follows the priority Local > Global. |
use options¶
| Option | Description |
|---|---|
--local |
Selects a workspace only for the current Eitri-App directory. |
--name <workspace-name> |
Selects a previously created workspace by name. |
app¶
eitri app <command> [options]
Runs and manages the Eitri-Apps of the application declared in the app-config.yaml file.
Info
See Developing multiple Eitri-Apps to configure the app-config.yaml.
| Command | Description |
|---|---|
start |
Starts all Eitri-Apps of the app-config.yaml. |
logs |
Displays the logs of the Eitri-Apps started by eitri app start. |
clean |
Cleans the remote and local workspaces of all Eitri-Apps. |
create |
Creates an application with Eitri-Apps from a template. |
snapshot |
Creates a testable and distributable snapshot of the application. |
app start¶
eitri app start [options]
Starts all Eitri-Apps of the app-config.yaml. The QR Code opens the Eitri-App marked as focus. The keyboard shortcuts and the initialization parameters work the same way as in eitri start.
| Option | Description |
|---|---|
-p, --playground |
Shows the QR Code to open in Eitri Play. |
-v, --verbose |
Displays detailed messages during execution. |
app logs¶
eitri app logs
Displays the logs of the Eitri-Apps running from eitri app start.
app clean¶
eitri app clean [options]
Cleans the workspaces completely, removing both the remote workspaces and the local .workspaces/ folders of all apps in the app-config.yaml. Useful to solve conflicts or invalid data in the workspaces.
| Option | Description |
|---|---|
-v, --verbose |
Displays detailed messages during the cleanup. |
app create¶
eitri app create [options] <application-name>
Creates an application with several Eitri-Apps, based on a selected template.
| Option | Description |
|---|---|
-v, --verbose |
Displays detailed messages during execution. |
app snapshot¶
eitri app snapshot [options]
Creates a snapshot of the application's source code, generating a link and a QR Code to test a feature before publishing it. See Snapshots.
| Option | Description |
|---|---|
-b, --branch-name <branch-name> |
Name of the branch for the snapshot. |
-v, --verbose |
Displays detailed messages during execution. |
Bottom Tab Bar simulation¶
While developing with Eitri Play you can simulate the Bottom Tab Bar and its behaviors. Check here how to simulate it.
dependencies¶
eitri dependencies <command> [options]
Manages the dependencies of the Eitri-App. See Dependencies.
| Command | Description |
|---|---|
list |
Lists the dependencies available for Eitri-Apps. |
add |
Selects dependencies and declares them in eitri-app-dependencies in eitri-app.conf.js. |
docs [options] |
Selects a dependency and opens its documentation in the browser. |
docs options¶
| Option | Description |
|---|---|
--no-open |
Only displays the link, without opening the browser. |
theme¶
eitri theme <command> [options]
Manages the versions of the application's Luminus theme (Tailwind + DaisyUI) from a tailwind.config.js file, without having to edit it in the Console.
| Command | Description |
|---|---|
create |
Creates a new (DRAFT) theme version from the tailwind.config.js in the current directory. |
list |
Lists the theme versions of the application. |
show [build] |
Displays the colors and settings of a theme version. |
publish [build] |
Publishes a theme version. |
sync [build] |
Creates or updates the tailwind.config.js in the current directory with a theme version. |
All commands accept --application-id <id>. Without it, the CLI uses the application-id from the app-config.yaml in the current directory, or asks which application to use. In the commands with [build], provide the build number shown by eitri theme list.
Warning
The theme is included when the Eitri-App version is generated. After publishing a theme version, generate a new version of your Eitri-App with eitri push-version to apply it.
Workflow¶
eitri theme sync # downloads the published version into tailwind.config.js
# edit tailwind.config.js
eitri theme create --name "New palette"
eitri theme publish # choose among the DRAFT versions
The tailwind.config.js file¶
The file must export the object with module.exports = { ... }. Eitri only uses these top-level keys; any other key is ignored by eitri theme create:
| Key | Description |
|---|---|
daisyui |
DaisyUI configuration. Required, with themes containing at least one theme. |
theme |
Tailwind theme (colors, fontFamily, extend, …). |
safelist |
Classes that are always included in the CSS. |
module.exports = {
daisyui: {
themes: [
{
eitri: {
primary: "#e12d2d",
"primary-content": "#FFFFFF",
secondary: "#184595",
"base-100": "#FFFFFF",
},
},
],
},
theme: {
extend: {
colors: {
"neutral-100": "#F9F9F9",
},
},
},
};
Info
Values must be JSON: functions (such as plugins), undefined, and class instances are rejected. Node must be installed for the CLI to read the file.
theme create¶
eitri theme create [options]
Creates a new theme version, with DRAFT status, from the tailwind.config.js in the current directory.
| Option | Description |
|---|---|
--application-id <id> |
ID of the application. |
--name <name> |
Name of the theme version. |
--publish |
Publishes the version right after creating it. |
theme list¶
eitri theme list [options]
Lists the theme versions of the application, highlighting the currently published version.
| Option | Description |
|---|---|
--application-id <id> |
ID of the application. |
theme show¶
eitri theme show [build] [options]
Displays the colors and settings of a theme version. Without build, displays the published version.
| Option | Description |
|---|---|
--application-id <id> |
ID of the application. |
--json |
Prints the version's JSON, without visual formatting. |
eitri theme show 3 --json > theme.json
theme publish¶
eitri theme publish [build] [options]
Publishes a theme version. Without build, lets you choose among the DRAFT versions. The CLI asks for confirmation before publishing, except when the CI environment variable is set.
| Option | Description |
|---|---|
--application-id <id> |
ID of the application. |
theme sync¶
eitri theme sync [build] [options]
Creates or updates the tailwind.config.js in the current directory with a theme version. Without build, uses the published version.
If the local file has content different from the chosen version, the CLI asks for confirmation before overwriting it. Differences in formatting or comments alone don't count as changes.
| Option | Description |
|---|---|
--application-id <id> |
ID of the application. |
-y, --yes |
Overwrites the local file without asking for confirmation. |
agents¶
eitri agents <command> [options]
Manages the AI agents of the Eitri-App. To understand what agents can do in your app and which integration mode to choose, see AI Agents.
| Command | Description |
|---|---|
setup [options] |
Sets up the agent environment variables, for the workspace or production. |
generate:rag |
Generates the files needed for the RAG. |
setup options¶
| Option | Description |
|---|---|
-e, --env <env> |
Environment: workspace (default) or production. |
-l, --llm <llm> |
Name of the LLM. |
-k, --api-key <api-key> |
API key of the LLM. |
-m, --model <model> |
Model of the LLM. |
eitri agents setup --env workspace --llm <llm> --model <model> --api-key <api-key>
libs¶
eitri libs [options]
Lists the versions of the Eitri libraries.
| Option | Description |
|---|---|
--luminus |
Lists the versions of the Eitri Luminus component library. |
--bifrost |
Lists the versions of the Eitri Bifrost SDK. |
doctor¶
eitri doctor
Checks the dependencies and settings of your machine to make sure everything is ready for Eitri-App development.
self-update¶
eitri self-update
Updates the Eitri CLI, uninstalling previous versions and installing the latest stable version.
Keeping the CLI up to date ensures the best performance, compatibility, stability, and development experience.