# Installer sqlx-cli avec Homebrew, Nix, pacman, apk

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de sqlx-cli pour les workflows d'agents IA.

## installation

```sh
sudo av install brew:sqlx-cli
```

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install sqlx-cli
```

  Preuve: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#sqlx-cli
```

  Preuve: nixpkgs package indexes: pkgs/by-name/sq/sqlx-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S sqlx-cli
```

  Preuve: Arch Linux sync databases: sqlx-cli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- apk (92%):

```sh
sudo apk add cargo-sqlx
```

  Preuve: Alpine Linux edge package indexes: cargo-sqlx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

## Faits du paquet

- **Clé du paquet:** brew:sqlx-cli
- **Gestionnaire de paquets:** Homebrew
- **Version:** 0.9.0
- **Résumé source:** Command-line utility for SQLx, the Rust SQL toolkit
- **Page d'accueil:** <https://github.com/transact-rs/sqlx>
- **Dépôt:** <https://github.com/transact-rs/sqlx>
- **Dernière mise à jour:** 2026-07-04T16:53:45+09:00
- **Généré:** 2026-08-03T19:37:03+00:00

## exécutables

- cargo-sqlx (alias)
- sqlx (alias)

## Comportement d'installation

- Bouteille: non disponible

## Version et fraîcheur

- page générée: 2026-08-03
- version du gestionnaire: 0.9.0
## Historique du projet et usages

sqlx-cli is the command-line companion to SQLx, the Rust SQL toolkit, used for database management, migrations, and offline query metadata generation.

### Historique du projet

The SQLx repository's official README describes SQLx as an async, pure-Rust SQL crate with optional compile-time checked queries and support for PostgreSQL, MySQL, MariaDB, and SQLite. The sqlx-cli README describes the CLI as SQLx's associated command-line utility for managing databases, migrations, and offline mode for query macros.

Official repository metadata places the SQLx project in public GitHub development from late 2019. The CLI became important because SQLx's compile-time query checking creates a developer workflow need: capture query metadata with cargo sqlx prepare so projects can build without a live development database.

### Historique d'adoption

The supplied package-manager facts show sqlx-cli distributed as sqlx-cli or cargo-sqlx through Homebrew, Alpine, Nix, and Arch. That packaging matters because Rust users often need the executable in CI images and developer shells even when the application itself depends on SQLx as a library.

### Modes d'utilisation

The official sqlx-cli README documents cargo install options by database backend and TLS stack, DATABASE_URL via command-line option, environment, or .env file, database create/drop commands, migration creation and execution, reversible migrations, cargo sqlx prepare, the .sqlx metadata directory, and prepare --check for CI.

### Pourquoi les passionnés de paquets s'y intéressent

Package nerds care about sqlx-cli because it bridges Rust's compile-time SQL checking with ordinary package-manager workflows. It is a CLI that must stay version-compatible with a Rust library, database drivers, TLS choices, and CI environments.

### Chronologie

- 2019: Official repository metadata reports SQLx public repository creation.
- 2020: Public issue history shows early CLI design work around cargo-sqlx and migration commands.
- 2021: The sqlx-cli README documents reversible migrations using timestamped up/down SQL files.
- 2023: Changelog notes offline query metadata moving toward one file per query invocation.
- 2026: Latest crate/docs metadata continues to describe sqlx-cli as SQLx's command-line utility.

### Related projects

- sqlx-cli is tightly coupled to SQLx query macros, Rust's cargo workflow, and database backends including PostgreSQL, MySQL/MariaDB, and SQLite.

### Sources

- <https://docs.rs/crate/sqlx-cli/latest>
- <https://github.com/launchbadge/sqlx/issues/170>
- <https://github.com/transact-rs/sqlx>
- <https://github.com/transact-rs/sqlx/tree/main/sqlx-cli#readme>
- source_facts.package-manager


## Notes de sécurité

broad file, network, media, or database tool signal.

- **Risque Geiger:** blue / moyen
- broad file, network, media, or database tool signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Credential files

- Unix: .env
## Autres enregistrements de gestionnaires de paquets

- Nix - sqlx-cli: normalized package name match | nixpkgs package indexes: pkgs/by-name/sq/sqlx-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - sqlx-cli - 0.9.0-1: normalized package name match | Arch Linux sync databases: sqlx-cli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command-line utility for SQLx, the Rust SQL toolkit | https://github.com/launchbadge/sqlx
- apk - cargo-sqlx - 0.8.6-r0: installed executable or alias match | Alpine Linux edge package indexes: cargo-sqlx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command-line utility for SQLx, the Rust SQL toolkit - cargo subcommand | https://github.com/launchbadge/sqlx
- apk - sqlx - 0.8.6-r0: installed executable or alias match | Alpine Linux edge package indexes: sqlx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command-line utility for SQLx, the Rust SQL toolkit | https://github.com/launchbadge/sqlx
- apk - sqlx-bash-completion - 0.8.6-r0: installed executable or alias match | Alpine Linux edge package indexes: sqlx-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for sqlx | https://github.com/launchbadge/sqlx
- apk - sqlx-doc - 0.8.6-r0: installed executable or alias match | Alpine Linux edge package indexes: sqlx-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command-line utility for SQLx, the Rust SQL toolkit (documentation) | https://github.com/launchbadge/sqlx
- apk - sqlx-fish-completion - 0.8.6-r0: installed executable or alias match | Alpine Linux edge package indexes: sqlx-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for sqlx | https://github.com/launchbadge/sqlx
- apk - sqlx-zsh-completion - 0.8.6-r0: installed executable or alias match | Alpine Linux edge package indexes: sqlx-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for sqlx | https://github.com/launchbadge/sqlx


## Liens liés

- [sqlx-cli](https://pkg.so/fr/pkg/cargo/sqlx-cli/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/sqlx-cli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/sqlx-cli.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
