lester
Version, currently 2.0.313 versions
- 2.0.3latestMar 28, 2026
- 2.0.2not indexedAug 10, 2026
- 2.0.1not indexedAug 10, 2026
- 2.0.0not indexedAug 10, 2026
- 1.0.2not indexedAug 10, 2026
- 1.0.1not indexedAug 10, 2026
- 1.0.0not indexedAug 10, 2026
- 0.4.0not indexedAug 10, 2026
- 0.3.0not indexedAug 10, 2026
- 0.2.2not indexedAug 10, 2026
- 0.2.1not indexedAug 10, 2026
- 0.2.0not indexedAug 10, 2026
- 0.1.0not indexedAug 10, 2026
github.com/GrottoPress/lester
A low-level API client for LXD
3 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
lester:
github: GrottoPress/lester
version: ~> 2.0.3Then run:
shards installshard.yml
- Crystal
~> 1.2- License
- MIT
- Authors
- GrottoPress, N Atta Kusi Adusei
Dependencies
Development Dependencies
README
Lester
Lester is a low-level API client for LXD. It features an intuitive interface that maps directly to the LXD API.
Usage Examples
-
Create client:
lxd = Lester.new(socket: "/var/snap/lxd/common/lxd/unix.socket") # OR: # # lxd = Lester.new( # base_uri: "https://1.2.3.4:8443", # private_key: "priv.key", # certificate: "cert.pem", # # ca_certificates: "ca.pem", # # verify_mode: "none" # ) -
Add new trusted certificate:
lxd.certificates.add( certificate: "X509 PEM certificate...", name: "castiana", password: "secret", # ... ) do |response| return puts response.message unless response.success? puts response.type puts response.code end -
List all images:
lxd.images.list(project: "default") do |response| return puts response.message unless response.success? response.metadata.try &.each do |image| puts image.architecture puts image.auto_update? puts image.cached? # ... end end -
Download instance backup:
lxd.instances.backups.export( instance_name: "instance-04", name: "backup0", destination: "/home/user/Downloads/backup.zip" ) do |response| puts response.message end -
Add new storage pool:
lxd.pools.create( project: "default", target: "lxd0", config: {"volume.block.filesystem": "ext4", "volume.size": "50GiB"}, description: "Local SSD pool", driver: "zfs", name: "local", # ... ) do |response| return puts response.message unless response.success? puts response.type puts response.code end
Documentation
Find the complete documentation in the docs/ directory of this repository.
Development
-
Create a
.env.shfile:#!/bin/bash # export LXD_SOCKET='/var/snap/lxd/common/lxd/unix.socket' # Set these if you need to test against a remote LXD server export LXD_BASE_URI='https://1.2.3.4:8443' export LXD_TLS_KEY_PATH='priv.key' export LXD_TLS_CERT_PATH='cert.pem' export LXD_TLS_CA_PATH='' export LXD_TLS_VERIFY_MODE='none'Update the file with your own details.
-
Run tests with
source .env.sh && crystal spec.
Contributing
- Fork it
- Switch to the
masterbranch:git checkout master - Create your feature branch:
git checkout -b my-new-feature - Make your changes, updating changelog and documentation as appropriate.
- Commit your changes:
git commit - Push to the branch:
git push origin my-new-feature - Submit a new Pull Request against the
GrottoPress:masterbranch.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
2.0.3- Tagged
- Mar 28, 2026
- Commit
8060bd50f28e- Crystal
~> 1.2- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/GrottoPress/lester
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 13