lsh

command module
v1.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: BSD-3-Clause, MIT Imports: 1 Imported by: 0

README

lsh

lsh is the Latitude.sh command-line interface (CLI) that will help you make it easier to retrieve any data from your team or perform any action you need.

Installation

MacOS / Linux / WSL

Installing the latest version

Homebrew
brew install latitudesh/tools/lsh
Installation Script
curl -fsSL https://cli.latitude.sh/install.sh | sh
Windows is not supported yet

From Github

Visit the releases page and select any version you want to download.

Getting Started

Log in into Latitude.sh. An API Key is required.

lsh login <API_KEY>

The CLI automatically detects when you use sudo and loads your credentials from your user directory.

List your servers

lsh servers list

Commands

The list of the available commands is available here.

Examples

See more examples here.

List a server with a specific hostname:


lsh servers list --hostname <HOSTNAME>

Create a server with Ubuntu 24:


lsh servers create --operating_system ubuntu_24_04_x64_lts --project <PROJECT_ID_OR_SLUG> --site <LOCATION> --hostname <HOSTNAME> --plan <PLAN>

List all GPU plans:


lsh plans list --gpu true

List volumes:


lsh volume list --project <PROJECT_ID>

Mount volume to a server (requires sudo, auto-installs nvme-cli and connects):

# First, login as normal user
lsh login <API_KEY>

# Then mount with sudo (automatically uses your credentials)
sudo lsh volume mount --id vol_abc123

Why sudo is required:

  • Installs nvme-cli package if not present
  • Loads NVMe kernel modules (nvme_tcp)
  • Writes to /etc/nvme/hostnqn
  • Runs privileged nvme connect commands

Important:

  • Login as a normal user (without sudo): lsh login <API_KEY>
  • The CLI automatically finds your credentials when you run commands with sudo
  • Volume mount needs sudo for nvme-cli installation and NVMe operations

Troubleshooting

Uninstalling

If you encounter any problems when installing the CLI with the installation script, you can use the command below to uninstall the CLI.

curl -sSL  https://raw.githubusercontent.com/latitudesh/cli/main/uninstall.sh | bash
Sudo Authentication Issues

If sudo lsh volume mount says "API key not found":

# Make sure you've logged in as your normal user (not with sudo)
lsh login <API_KEY>

# Then try mount again
sudo lsh volume mount --id <VOLUME_ID>

The CLI automatically detects your username via the SUDO_USER environment variable and loads your config.

Docs

For more information, see the documentation.

Provide feedback and contribute

  • Open an issue for questions, feedback, bug reports or feature requests.

  • We welcome pull requests for bug fixes, new features, and improvements to the examples.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
lsh
Package to configure options that should be acessible througout all commands
Package to configure options that should be acessible througout all commands
internal
tui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL