Skip to main content

CLI

The lttle CLI is a command-line interface tool that allows you to interact with the lttle.cloud platform directly from your terminal. It provides various commands to manage your resources, deploy applications, and perform other tasks related to lttle.cloud.

Installing​

info

Right now we only support Linux x86 64 and MacOS Darwin Aarch64 (ARM 64). More platforms will be supported in the future.

The easiest way is to use the install script:

curl -fsSL https://install.lttle.sh | bash

Updating​

There is no automatic update mechanism yet. You need to re-run the install script to update to the latest version.

Commands​

CommandDescriptionUsage
loginAuthenticate with your JWT token.lttle login --api https://eu.lttle.cloud <JWT>
whoamiShow the currently authenticated user.lttle whoami
profileManage CLI profiles.lttle profile <subcommand>
gadgetAI assistant to help onboard projects.lttle gadget init
importImport existing resources into lttle.cloud.lttle import <subcommand>
deployDeploy resources to lttle.cloud.lttle deploy [OPTIONS] [PATH]
namespaceManage namespaces.lttle namespace <subcommand>
appManage applications.lttle app <subcommand>
machineManage machines.lttle machine <subcommand>
volumeManage volumes.lttle volume <subcommand>
serviceManage services.lttle service <subcommand>
certificateManage certificates.lttle certificate <subcommand>
queryQuery resources.lttle query [OPTIONS] <EXPRESSION>
dockerDocker management.lttle docker <subcommand>
completionGenerate shell completion scripts.lttle completion <SHELL>

login​

Right now the only way to authenticate is with your provided JWT token.

lttle login --api https://eu.lttle.cloud <JWT>

The only supported region is eu.

EARLY ACCESS

When your JWT token expires, please contact us to get a new one.

whoami​

You can check to see what user you are authenticated as by running:

lttle whoami
Current profile: default
You are logged in as your-username (tenant: your-tenant)

Replace your-username and your-tenant with your actual username and tenant.

profile​

What is a profile?

gadget​

This is our AI assistant that can help you onboard your projects faster.

You can invoke it by running lttle gadget init inside your project folder. It will analyze your project and create the necessary configuration files to get you started with deploying to lttle.cloud.


Here is an example of how it looks when running it inside a folder with just an index.html file:

lttle gadget init
Gadget is working on getting your project ready for lttle.cloud
Will use reasoning model with default reasoning effort
Created lttle.yaml
Created .vscode/settings.json
Created .vscode/extensions.json
warning: Repository contains a single static file (index.html). Deployed as an nginx static site exposing HTTPS on port 80. If you intended a different build (React/Next.js) or need environment variables, provide the project source code or .env files.
Gadget has finished initializing your project
Next steps:
→ Deploy your app with `lttle deploy`
→ Check on your machine with `lttle machine get static-site --ns test`
→ Check on your app with `lttle app get static-site --ns test`
→ See more things you can do with `lttle --help`
🎉 Happy clouding!

And you will see that it has

  1. Created or updated .vscode/settings.json and .vscode/extensions.json to help you work with the project in VSCode.
    • settings.json will contain recommended settings for working with lttle projects.
    • extensions.json will recommend installing recommended extensions
  2. Created lttle.yaml with a basic configuration for your project.

For our example with just an index.html file, it created a static site project for us that will deploy the static file using nginx.

lttle.yaml
app:
namespace: test
name: static-site
image: nginx:alpine
resources:
cpu: 1
memory: 256
mode:
flash:
strategy:
listen-on-port: 80
environment:
PORT: "80"
expose:
http:
port: 80
external:
protocol: https

import​

deploy​

The lttle deploy command is used to deploy or update your resources defined in a configuration file to lttle.cloud.

Usage:

lttle deploy [OPTIONS] [PATH]
OptionDescriptionUsage
--env <ENV_FILE>Specify an environment file to load environment variables from.lttle deploy --env .env.production
--vars <VAR_FILE>Specify a variables file to load variables from.lttle deploy --vars vars.yaml
--var <KEY=VALUE>Specify a single variable to override.lttle deploy --var version=1.2.3
--no-env-ambient-overrideDisable ambient environment variable overrides.lttle deploy --no-env-ambient-override

namespace​

Resources within lttle.cloud are organized into namespaces. You can read more about namespaces in the namespaces documentation.

SubcommandDescriptionUsage
list (short: ls)List all namespaces you have access to.lttle namespace list
delete (short: rm)Delete a namespace and all its resources.lttle namespace delete <NAMESPACE>
irreversible

The delete subcommand is irreversible. By default it will not delete namespaces.

To delete a namespace you also need to use the --yes (short: -y) flag to confirm you want to delete all resources within the namespace.

lttle namespace delete your-namespace --yes

app​

SubcommandDescriptionUsage
list (short: ls)List all applications`lttle app list
getGet details of a specific applicationlttle app get <APP_NAME>
delete (short: rm)Delete a specific applicationlttle app delete <APP_NAME>

All of these subcommands run assuming you are checking the default (default) namespace in your profile. You can override this behavior using the following options:

  • --namespace <NAMESPACE> (short: --ns): Specify the namespace to run the subcommand in. If not provided, the default namespace from your profile will be used.
  • --all-namespaces (short: -a): Run the subcommand across all namespaces. This option cannot be used together with --namespace.
irreversible action

The delete subcommand is irreversible. By default it will not delete namespaces.

To delete a namespace you also need to use the --yes (short: -y) flag to confirm you want to delete all resources within the namespace.

lttle namespace delete your-namespace --yes

machine​

SubcommandDescriptionUsage
list (short: ls)List all machineslttle machine list
getGet details of a specific machinelttle machine get <MACHINE_NAME>
logsGet logs of a specific machinelttle machine logs <MACHINE_NAME> [OPTIONS]
execExecute a command on a specific machinelttle machine exec [OPTIONS] <MACHINE_NAME> [COMMAND]
delete (short: rm)Delete a specific machinelttle machine delete <MACHINE_NAME>
restartRestart a specific machinelttle machine restart <MACHINE_NAME>

All of these subcommands run assuming you are checking the default (default) namespace in your profile. You can override this behavior using the following options:

  • --namespace <NAMESPACE> (short: --ns): Specify the namespace to run the subcommand in. If not provided, the default namespace from your profile will be used.
  • --all-namespaces (short: -a): Run the subcommand across all namespaces. This option cannot be used together with --namespace.
irreversible action

The delete subcommand is irreversible. By default it will not delete machines.

To delete a machine you also need to use the --yes (short: -y) flag to confirm you want to delete the machine.

lttle machine delete your-machine --yes

logs​

OptionsDescriptionUsage
--since <DURATION> (default: 1d, short: -s)Show logs since a specific duration (eg. 1d, 1h, 1m, 10s)lttle machine logs my-machine --since 1h
--timestamps (short: -t)Show timestamps in the log outputlttle machine logs my-machine --timestamps
--follow (short: -f)Follow the log outputlttle machine logs my-machine --follow
--elapsed (short: -e)Show elapsed time since the log entrylttle machine logs my-machine --elapsed
--follow (short: -f)Follow the log outputlttle machine logs my-machine --follow

exec​

OptionsDescriptionUsage
--stdin (short: -i)Pass stdin to the container (interactive)lttle machine exec -i my-machine /bin/sh
--tty (short: -t)stdin is a TTY (allocate pseudo-terminal)lttle machine exec -t my-machine /bin/sh

Examples:

  • Run an interactive shell on the machine:

    lttle machine exec -it my-machine /bin/sh
  • Run a command non-interactively:

    lttle machine exec my-machine ls /path/to/directory

volume​

SubcommandDescriptionUsage
list (short: ls)List all volumeslttle volume list
getGet details of a specific volumelttle volume get <VOLUME_NAME>
delete (short: rm)Delete a specific volumelttle volume delete <VOLUME_NAME>

All of these subcommands run assuming you are checking the default (default) namespace in your profile. You can override this behavior using the following options:

  • --namespace <NAMESPACE> (short: --ns): Specify the namespace to run the subcommand in. If not provided, the default namespace from your profile will be used.
  • --all-namespaces (short: -a): Run the subcommand across all namespaces. This option cannot be used together with --namespace.
irreversible action

The delete subcommand is irreversible. By default it will not delete volumes.

To delete a volume you also need to use the --yes (short: -y) flag to confirm you want to delete the volume.

lttle volume delete your-volume --yes

service​

SubcommandDescriptionUsage
list (short: ls)List all serviceslttle service list
getGet details of a specific servicelttle service get <SERVICE_NAME>
delete (short: rm)Delete a specific servicelttle service delete <SERVICE_NAME>

All of these subcommands run assuming you are checking the default (default) namespace in your profile. You can override this behavior using the following options:

  • --namespace <NAMESPACE> (short: --ns): Specify the namespace to run the subcommand in. If not provided, the default namespace from your profile will be used.
  • --all-namespaces (short: -a): Run the subcommand across all namespaces. This option cannot be used together with --namespace.
irreversible action

The delete subcommand is irreversible. By default it will not delete services.

To delete a service you also need to use the --yes (short: -y) flag to confirm you want to delete the service.

lttle service delete your-service --yes

certificate​

SubcommandDescriptionUsage
list (short: ls)List all certificateslttle certificate list
getGet details of a specific certificatelttle certificate get <CERTIFICATE_NAME>
delete (short: rm)Delete a specific certificatelttle certificate delete <CERTIFICATE_NAME>

All of these subcommands run assuming you are checking the default (default) namespace in your profile. You can override this behavior using the following options:

  • --namespace <NAMESPACE> (short: --ns): Specify the namespace to run the subcommand in. If not provided, the default namespace from your profile will be used.
  • --all-namespaces (short: -a): Run the subcommand across all namespaces. This option cannot be used together with --namespace.
irreversible action

The delete subcommand is irreversible. By default it will not delete services.

To delete a service you also need to use the --yes (short: -y) flag to confirm you want to delete the service.

lttle service delete your-service --yes

query​

TODO

docker​

SubcommandDescriptionUsage
loginLogin to the lttle Docker registrylttle docker login

completion​

You can enable autocompletion for your shell by adding the following line to your shell configuration file:

We currently support bash, zsh, fish, elvish and powershell. Run the following command to get the exact command for your shell:

lttle completion <SHELL>

The command will try to update your shell configuration file automatically, but if it fails you can follow the instructions printed in the terminal.