> ## Documentation Index
> Fetch the complete documentation index at: https://alguna.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs and CLI

> Official Alguna client libraries for TypeScript, Python, Go and Rust, and the alguna command-line tool: packages, install commands and source repositories.

Alguna publishes a client library for TypeScript, Python, Go and Rust, and the `alguna` command-line tool. Use one when you call the [public API](/docs/api-reference/v2/overview) from code or from a terminal and do not want to write the HTTP calls yourself. All five are generated from the same versioned OpenAPI spec as this reference, so every endpoint has a method (or a command), and they behave the same way:

* They send the `Authorization` and `Alguna-Version` headers. The API version defaults to the one the release was generated against; set it to pin the version you integrate against.
* They send an `Idempotency-Key` on every write, yours or a generated one, and reuse it on each retry. See [Idempotency](/docs/api-reference/v2/idempotency).
* They retry `408`, `429`, `502`, `503` and `504`, a `409` with `Retry-After`, and network failures, 2 times by default. They do not retry a `500`. See [Errors](/docs/api-reference/v2/errors#retrying).
* They raise a typed error for a failed response, with the HTTP status and the `X-Request-Id`.

The API key is a secret. Use the libraries on a server only. For a purchase flow in the browser, use [Embedded Checkout](/docs/hosted/embedded-checkout) (`@alguna/checkout-sdk`).

## Libraries

| Language | Package | Install | Source |
| - | - | - | - |
| [TypeScript](/docs/api-reference/v2/sdks/typescript) | [`@alguna/sdk`](https://www.npmjs.com/package/@alguna/sdk) on npm | `npm install @alguna/sdk` | [alguna-io/alguna-ts](https://github.com/alguna-io/alguna-ts) |
| [Python](/docs/api-reference/v2/sdks/python) | [`alguna`](https://pypi.org/project/alguna/) on PyPI | `pip install alguna` | [alguna-io/alguna-python](https://github.com/alguna-io/alguna-python) |
| [Go](/docs/api-reference/v2/sdks/go) | [`github.com/alguna-io/alguna-go`](https://pkg.go.dev/github.com/alguna-io/alguna-go) | `go get github.com/alguna-io/alguna-go` | [alguna-io/alguna-go](https://github.com/alguna-io/alguna-go) |
| [Rust](/docs/api-reference/v2/sdks/rust) | [`alguna`](https://crates.io/crates/alguna) on crates.io | `cargo add alguna` | [alguna-io/alguna-rust](https://github.com/alguna-io/alguna-rust) |
| [CLI](/docs/api-reference/v2/sdks/cli) | [`@alguna/cli`](https://www.npmjs.com/package/@alguna/cli) on npm, and [GitHub Releases](https://github.com/alguna-io/cli/releases) | `npm install --global @alguna/cli` | [alguna-io/cli](https://github.com/alguna-io/cli) |

Each repository's README is the full reference for that library. When you report a problem with a call, include its `X-Request-Id`.

## Versions

A library has two versions, and they change independently:

* The **package version** is the release of the library. A new package version adds endpoints and types and fixes defects. Each release has a `v<version>` tag in its repository.
* The **API version** is the date in the `Alguna-Version` header. Only the API version changes the request and response shapes. When you set it on the client, a newer package version still sends the date you set. See [Versioning](/docs/api-reference/v2/overview#versioning).

## Sandbox

Every library and the CLI take a base URL. Set it to `https://api.sandbox.alguna.io` and use a sandbox API key to work against your sandbox. See [Testing](/docs/getting-started/testing).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.