truffle

command module
v0.36.8 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 1 Imported by: 0

README

truffle

CI Go Report Card codecov Go Reference

Find EC2 instance types, compare spot prices, check quotas.

Most commands work without AWS credentials — only truffle quotas and truffle capacity require them.

Installation

macOS / Linux (Homebrew)

brew install spore-host/tap/truffle

Windows (Scoop)

scoop bucket add spore-host https://github.com/spore-host/scoop-bucket
scoop install truffle

Debian / Ubuntu

curl -LO https://github.com/spore-host/truffle/releases/latest/download/truffle_linux_amd64.deb
sudo dpkg -i truffle_linux_amd64.deb

RHEL / Fedora

sudo rpm -i https://github.com/spore-host/truffle/releases/latest/download/truffle_linux_amd64.rpm

Direct download — pre-built binaries for Linux, macOS, and Windows (amd64/arm64) on the releases page.

Build from source

git clone https://github.com/spore-host/truffle
cd truffle && make build && sudo make install

Quick Start

# Search instance types
truffle search "m7i.*"

# Compare spot prices (no credentials needed)
truffle spot c6a.xlarge c7g.xlarge --sort-by-price --active-only

# Find by natural language
truffle find "h200 8gpu efa"
truffle find "amd turin 32 cores 64gb" --exact
truffle find graviton --region us-east-1

# Check EC2 quotas (requires credentials)
truffle quotas --regions us-east-1 --family P

# Check SageMaker quotas
truffle quotas --service sagemaker --family g5 --regions us-west-2

# Find available capacity reservations
truffle capacity --gpu-only

Commands

Command Description
search <pattern> Search instance types by pattern
find [query...] Natural language instance search (supports --exact for precise matching)
help Show help for truffle or a specific command
version Show version, build info, and project URL
spot <pattern> Spot prices and availability
az <pattern> AZ-first availability view
capacity On-demand capacity reservations
list List instance families or sizes
quotas EC2 and SageMaker service quotas
app list Browse application catalog

Go Library

import "github.com/spore-host/truffle/pkg/aws"

client, _ := aws.NewClient(ctx)
results, _ := client.SearchInstanceTypes(ctx, regions, matcher, opts)

// On-demand rate for one type (live AWS Price List, cached)
rate, _ := client.HourlyRate(ctx, "c6i.4xlarge", "us-east-1", "on-demand")

// Spot prices with on-demand comparison populated
prices, _ := client.GetSpotPricing(ctx, results, aws.SpotOptions{ShowSavings: true})

Python Bindings

CGO bindings for Python are available in bindings/python/.

Documentation

Full reference at spore.host/docs.

License

Apache 2.0 — Copyright 2025-2026 Scott Friedman.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
aws
Package aws provides EC2 capacity discovery for the truffle tool.
Package aws provides EC2 capacity discovery for the truffle tool.
aws/awsmock
Package awsmock provides a configurable mock implementation of aws.Finder for unit testing downstream consumers of truffle's instance discovery API.
Package awsmock provides a configurable mock implementation of aws.Finder for unit testing downstream consumers of truffle's instance discovery API.
find
Package find implements the natural language EC2 instance search pipeline used by the truffle tool.
Package find implements the natural language EC2 instance search pipeline used by the truffle tool.
quotas
Package quotas queries AWS Service Quotas and current EC2 usage to determine whether a given instance type can be launched under an account's limits.
Package quotas queries AWS Service Quotas and current EC2 usage to determine whether a given instance type can be launched under an account's limits.
testutil
Package testutil provides shared test helpers for truffle packages.
Package testutil provides shared test helpers for truffle packages.

Jump to

Keyboard shortcuts

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