agentleFS
alexei-ledalexei-led/spotinfo/llms.txt

spotinfo

llms.txt164 starsChanged 4 months agoApache-2.0View on GitHub

CLI tool and MCP server that lists and ranks Spot machines on AWS, GCP and Azure from committed price snapshots. spotinfo answers one question: which Spot machine meets a vCPU and memory floor at the lowest price, on a given cloud, at an interruption risk the workload can survive. Every cloud ships a reviewed snapshot compiled into the binary, so every cloud answers offline; each also has a live path — AWS feeds plus DescribeSpotPriceHistory, the anonymous Azure Retail Prices…

  • Installs packages

The file

We split this llms.txt into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Embedded data: every cloud answers offline.

    line 59
  2. Very specific:

    Provenance: every answer carries source URLs, content hashes and a live, cached or embedded-snapshot mode

    line 62
  3. Very specific:

    Every non-AWS snapshot is governed by an approved internal/providers/<cloud>/data/source-contract.json that enumerates its exact source …

    line 113

≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
llms.txt
# spotinfo

> CLI tool and MCP server that lists and ranks Spot machines on AWS, GCP and Azure from
> committed price snapshots.

`spotinfo` answers one question: which Spot machine meets a vCPU and memory floor at the
lowest price, on a given cloud, at an interruption risk the workload can survive. Every cloud
ships a reviewed snapshot compiled into the binary, so every cloud answers offline; each also
has a live path — AWS feeds plus `DescribeSpotPriceHistory`, the anonymous Azure Retail Prices
API, and the GCP Cloud Billing Catalog behind an API key. AWS is the only cloud that publishes
redistributable interruption data, so GCP and Azure answer the risk-free `cost` workload only
and report `risk.status: "unavailable"` rather than a zero. Every answer names its source URLs
and their SHA-256.

## Docs

- [README](README.md)
- [Quick start](docs/quick-start.md)
- [Installation](docs/installation.md)
- [Usage Guide](docs/usage.md)
- [Cloud coverage](docs/clouds.md) - what each cloud serves and refuses
- [MCP Server Integration](docs/mcp-server.md)
- [Data Sources](docs/data-sources.md)
- [API Reference](docs/api-reference.md) - the published payloads and the three MCP tools
- [Examples](docs/examples.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Migrating to v2](docs/migration-v2.md) - every renamed flag, MCP tool, schema and field
- [Placement Scores](docs/aws-spot-placement-scores.md) - AWS 1-10 scores and GCP obtainability
- [Claude Desktop Setup](docs/claude-desktop-setup.md)
- [CLI and MCP surface review](docs/reviews/cli-and-mcp-surface-review.md)
- [Surface validation](docs/reviews/surface-validation.md) - the built binary across the
  command x cloud x format matrix
- [CLAUDE.md](CLAUDE.md) - AI coding guidelines for this project

## Commands

- `spotinfo list [flags]` lists every matching machine with its price and risk, on any cloud.
- `spotinfo recommend --architecture <x86_64|arm64> --min-vcpu N --min-memory-gib N` ranks the
  best machines for a stated requirement. Those three flags are required.
- `spotinfo --mcp` starts the MCP server (or `SPOTINFO_MODE=mcp`).

`--cloud aws|gcp|azure` selects the cloud on both commands and defaults to `aws`. There is no
root query command: bare `spotinfo` prints help and exits 1. Every flag except `--mcp`,
`--debug`, `--quiet`, `--json-log`, `--help` and `--version` belongs to a subcommand and must
follow it.

## Key Features

- **Multi-cloud**: both commands answer on AWS, GCP and Azure
- **Spot pricing**: current spot prices per machine type, region, and OS
- **Interruption risk**: AWS Spot Advisor buckets (`<5%`, `5-10%`, `10-15%`, `15-20%`, `>20%`)
- **Explicit unknowns**: a cloud with no risk data reports `unavailable`, never a zero
- **Capability refusal**: an unanswerable request is rejected before any price is read
- **Savings**: percentage savings vs on-demand pricing
- **Placement figures**: AWS placement scores (1-10) and GCP obtainability (0.0-1.0), never
  normalised onto a shared scale
- **Live price fallback**: EC2 DescribeSpotPriceHistory for machines the static feed prices at
  zero
- **Embedded data**: every cloud answers offline. `--offline` skips the price feeds; it does
  not suppress `--with-score`, which has no snapshot to answer from
- **Live GCP preemption risk**: opt-in with `--live-risk`, visible but never filterable
- **Provenance**: every answer carries source URLs, content hashes and a `live`,
  `cached` or `embedded-snapshot` mode
- **MCP server**: expose Spot data to Claude, Cursor, and other MCP-compatible AI tools
- **Output formats**: `number|text|json|table|csv` on `list`; `text|json|table|csv` on
  `recommend`, which refuses `number`

## MCP tools

- `list_cloud_regions` — every region a cloud publishes, plus its complete source list;
  emits `spotinfo.regions/v1`
- `list_spot_machines` — AWS, GCP and Azure; emits `spotinfo.list/v1`
- `recommend_spot_machines` — AWS, GCP and Azure; emits `spotinfo.recommend/v3`

The old names `find_spot_instances`, `list_spot_regions` and `recommend_spot_instances` are
retired and return a JSON-RPC `-32602`. A failing call returns `spotinfo.error/v1`.

## Architecture

- `cmd/spotinfo/` — CLI entry point and flag definitions
- `internal/cloud/` — provider-neutral domain: Query, Result, Capabilities, Money, the
  recommender, and the `spotinfo.list/v1` and `spotinfo.recommend/v3` DTOs. Imports no
  provider SDK.
- `internal/providers/` — one adapter per cloud (`aws/`, `gcp/`, `azure/`) plus the registry
- `internal/snapshot/` — manifest and source-contract validators shared by every snapshot
- `internal/spot/` — legacy AWS business logic, still the AWS acquisition path
  - `client.go` — `Client` struct with functional options pattern
  - `data.go` — embedded data fetching and parsing
  - `liveprice.go` — `livePriceProvider` interface, EC2 API live price enrichment
  - `score.go` — placement score fetching and caching
  - `types.go` — shared types (`Advice`, `TypeInfo`, `Range`, etc.)
- `internal/mcp/` — MCP server tools
- `docs/plans/contracts/` — the normative JSON Schemas the payloads are validated against

## Data Sources

AWS:

- Spot Advisor data: `https://spot-bid-advisor.s3.amazonaws.com/spot-advisor-data.json`
- Static pricing: `https://website.spot.ec2.aws.a2z.com/spot.json` (feed behind the AWS spot
  pricing page; plain JSON, hourly. Replaces the legacy `spot-price.s3.amazonaws.com/spot.js`,
  frozen since 2024-05-13)
- Live prices: EC2 `DescribeSpotPriceHistory` API (fallback for zero-price instances)

GCP: Google's public server-rendered Spot and Compute pricing pages. The committed snapshot
covers `us-central1`; a Cloud Billing Catalog API key (`--gcp-billing-key` or
`SPOTINFO_GCP_BILLING_KEY`) prices further regions for one invocation and never enters a
snapshot.
Azure: the anonymous Azure Retail Prices API joined to Microsoft Learn VM size pages, 55
regions, Linux and Windows. The Retail Prices API needs no credential, so an explicit region
can be priced live at runtime.

Every non-AWS snapshot is governed by an approved
`internal/providers/<cloud>/data/source-contract.json` that enumerates its exact source URLs
and thresholds. All snapshots are embedded at build time; builds never fetch. Refresh with
`make update-data update-price update-gcp-data update-azure-data`, then `make verify-data`.

## Install

```bash
brew install alexei-led/tap/spotinfo
```

Or download from [GitHub Releases](https://github.com/alexei-led/spotinfo/releases).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.