#cli #lenra

app lenra_cli

The Lenra command line interface

20 releases

new 1.0.0-beta.22 Jan 24, 2023
1.0.0-beta.21 Jan 6, 2023
1.0.0-beta.16 Oct 26, 2022
1.0.0-beta.5 Sep 26, 2022
0.0.0 Oct 4, 2022

#230 in Command line utilities

Download history 99/week @ 2022-10-08 105/week @ 2022-10-15 74/week @ 2022-10-22 18/week @ 2022-10-29 5/week @ 2022-11-12 18/week @ 2022-11-19 1/week @ 2022-11-26 12/week @ 2022-12-03 18/week @ 2022-12-17 2/week @ 2022-12-24 74/week @ 2022-12-31 29/week @ 2023-01-07 9/week @ 2023-01-14 25/week @ 2023-01-21

137 downloads per month

MIT license

94KB
2.5K SLoC

Contributors Forks Stargazers Issues MIT License


Lenra CLI

The Lenra's command line interface.

Report Bug · Request Feature

What is Lenra

Lenra is an open source framework to create your app using any language, and deploy it without any Ops scale, built on ethical values.

Discover our framework

Getting Started

Prerequisites

To build and run the Lenra elements that handle your app, the Lenra CLI needs Docker and Docker Compose.

You can also install the Docker buildx command to use the Buildkit optimization given by Dofigen.

Install the Lenra CLI using one of the next possibilities.

Download the binary

You can download the binary from the release page and add it to your path environment variable.

Cargo install

First install Cargo, the Rust package manager: https://doc.rust-lang.org/cargo/getting-started/installation.html

Then use the next command to install the Lenra's cli:

cargo install lenra_cli

Build it from sources

First install Cargo, the Rust package manager: https://doc.rust-lang.org/cargo/getting-started/installation.html

Then clone this repository and install it with Cargo:

git clone https://github.com/lenra-io/lenra_cli.git
cargo install --path .

(back to top)

How to use it

Use the help options to understand how to use it:

$ lenra --help
lenra_cli 0.0.0
The Lenra command line interface

USAGE:
    lenra <SUBCOMMAND>

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    build     Build your app in release mode
    check     Checks the running app
    dev       Start the app in an interactive mode
    help      Print this message or the help of the given subcommand(s)
    init      Generates dockerfile and docker compose file with the init command
    logs      View output from the containers
    new       Create a new Lenra app project
    start     Start your app previously built with the build command
    stop      Stop your app previously started with the start command
    update    Update the tools Docker images

(back to top)

Subcommands

This tool contains many subcommands to help you doing what you need.

  • new: creates a new Lenra app project
  • dev: starts your app in dev mode
  • update: updates the tools Docker images
  • build: builds the Lenra app of the current directory
  • start: starts your app previously built with the build command
  • logs: displays output from the containers
  • stop: stops your app previously started with the start command
  • check: checks the running app
  • init: generates Docker and Docker Compose files

(back to top)

Configuration file

The Lenra's configuration file describes your Lenra app configurations, like API versions or how to build it.

Here is an example using a Dofigen file:

componentsApi: "1.0"
generator:
  dofigen: dofigen.yml

Configuration

The configuration is the main element of the file:

Field Type Description
componentsApi String The components API version
generator Generator The generator configuration

Generator

The generator define your application is built. There are many configurators:

Dofigen

The Dofigen generator use a Dofigen configuration to generate the Docker image.

The Dofigen configuration can be the path to a Dofigen file or it content directly.

Docker

The Docker generator use a Dockerfile to generate the Docker image.

The Dockerfile can be the path to a file or it content directly.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please open an issue with the tag "enhancement" or "bug". Don't forget to give the project a star! Thanks again!

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Lenra - @lenra_dev - contact@lenra.io

Project Link: https://github.com/lenra-io/lenra_cli

(back to top)

Dependencies

~11–18MB
~370K SLoC