Changelog
v0.3.0 - 2026-04-27
CLI is now first-class in the docs
The l4 CLI gets a top-level /cli section: installation, authentication, output formats (--json, --jq, --template, --csv, --quiet, --web), per-command reference, and validated multi-step recipes — including a flagship pipeline that aggregates 100% savings recommendations across all pages with one CloudWatch summary row. Every recipe is checked by npm run validate:recipes against the live API.
The previous "Building a CLI" guide has been replaced by two integration guides that match real customer scenarios:
- Integrate the SDK into your CLI — embed the LevelFour SDK as a library inside an existing internal CLI (Python / TypeScript / Go)
- Integrate
l4into your CLI — shell out to the officiall4binary from scripts, Makefiles, and CI runners with no SDK dependency
CLI changes
- New 3-tab interactive TUI for
l4 recommendations view(Recommendation / Comparison / Risk & Implementation), with code-block scroll navigation - New interactive split-pane TUI for
l4 costs breakdown l4 recommendations listrebuilt with KPI cards and live filters (--provider,--service,--account,--environment,--tag,--status,--search)- Spinners are now suppressed when stdout is not a TTY — clean JSON for shell pipelines
- Brand color refresh
API changes
- Filter options are cross-constrained on
/api/v1/providers/{id}/costs/filter-options(AWS Cost Explorer behavior). Selecting a service narrows the regions / accounts / tags returned in subsequent dimensions; each dimension excludes its own selections when computing its option list. No code changes required, but UIs that cache filter lists per session may want to refetch on selection change. - New
dimensionquery parameter on cost endpoints for filtering distinct values per dimension (service,account_id,region,tag_key,tag_value). - New
show_cost_asparameter onGET /api/v1/providers/{id}/costs/breakdownfor switching the cost basis displayed. page_sizelimits raised on cost and recommendation list endpoints — see the per-endpoint parameter docs in API Reference./api/v1/recommendations/{id}/detailsenriched withlinked_to,comparison, andriskfields to match the data quality of the dashboard view.- New
linked_tofield andsearchquery param onGET /api/v1/providers/{id}/recommendations.linked_toexposes parent/child relationships between recommendations via the newLinkedToschema (parent recs include their child recommendations' rolled-upmonthly_savings). - MoM and previous-month savings percentages now use a same-period comparison window — historical reports may show different percentage values, but the underlying
monthly_savingstotals are unchanged.
Go SDK changes
Sub-client renames to align with the API resource layout. Breaking — code using these names must be updated:
client.Spending→client.Costsclient.Savings→client.RecommendationsAudit
The Python and TypeScript SDKs already exposed client.costs (no rename needed there); the Go change brings naming parity across all three.
v0.2.0 - 2026-04-23
Resource renames
spending→costs— The Spending resource is now Costs across API, SDKs, and docs. Endpoints moved from/api/v1/spending/*to/api/v1/costs/*. SDK clients useclient.costs(Python, TypeScript) andclient.Costs(Go). Existing SDK code written againstclient.spendingwill not compile; migrate toclient.costs.savings→recommendations/audit— Realized-savings endpoints moved from/api/v1/savings/*to/api/v1/recommendations/audit/*to reflect that audits are a view of recommendation outcomes. SDK access is nowclient.recommendations.audit.*.
New API endpoints / SDK methods
Per-provider cost views for dashboards and filtered breakdowns:
GET /api/v1/providers/{id}/costs/breakdown—Costs.ListByProvider(paginated, filterable, multi-group)GET /api/v1/providers/{id}/costs/summary—Costs.GetProviderSummary(KPIs + top 3 services)GET /api/v1/providers/{id}/costs/filter-options—Costs.GetProviderFilters(distinct values for autocomplete)GET /api/v1/providers/{id}/costs/timeline—Costs.GetProviderTimeline
Per-provider recommendation views:
GET /api/v1/providers/{id}/recommendations/overview—Recommendations.GetProviderOverview(KPI header)GET /api/v1/providers/{id}/recommendations—Recommendations.ListByProvider(paginated list with filters)
Breakdown request — new capabilities
The ListByProvider cost breakdown supports:
- Multi-dimension
group_by(service,account_id,region,tag) - Date presets (
30D,6M,12M) alongside explicitstart/end - Daily/monthly
granularity - Per-row previous-period cost and change percentage
- Per-date totals aggregated across all pages
sort_by_dateto sort by a specific date column
v0.1.0 - 2026-03-10
Initial release of LevelFour SDKs and API documentation.
API
- Standardized error responses across all endpoints
- Bearer auth via API keys (
l4_live_/l4_test_prefixes) - Offset-based pagination with
x-fern-paginationsupport - OpenAPI spec auto-generated from FastAPI
Python SDK (levelfour on PyPI)
- Sync (
LevelFour) and async (AsyncLevelFour) clients - API key validation and
LEVELFOUR_API_KEYenv var fallback - Typed error hierarchy:
AuthenticationError,NotFoundError,RateLimitError, etc. SyncPager/AsyncPagerfor automatic paginationWebhookVerifierfor HMAC-SHA256 signature verification- Per-request options via
RequestOptionsTypedDict
TypeScript SDK (levelfour on npm)
LevelFourClientwith full TypeScript type coverage- Typed error classes:
AuthenticationError,NotFoundError,RateLimitError, etc. Pageasync iterable for auto-paginationcollectAll()helper for collecting all pagesWebhookVerifierfor signature verificationHttpResponsePromisewith.withRawResponse()for raw HTTP access
Go SDK (github.com/LevelFourAI/levelfour-go)
levelfour.NewClient()with functional options pattern (WithBaseURL,WithMaxRetries,WithHTTPClient)- Typed error structs with
errors.Assupport - Generic
Page/PageIterator/CollectAllfor pagination webhooks.Verifierfor HMAC-SHA256 signature verification- Per-request options via the
optionpackage
Documentation
- Developer portal with quickstart, SDK references, resource guides
- Auto-generated API reference from OpenAPI spec
- Guides for GitHub Actions and scheduled execution