Fabric
fabfile.org
- Windows
- macOS
- Linux
What Fabric is
Fabric is a free, open-source Python library for running shell commands remotely over SSH and receiving results as Python objects. It works with one host or many hosts, using serial or parallel execution. You can also run Python functions or code blocks against individual connections or groups of connections. Fabric builds on Invoke for subprocess and command-line features, and Paramiko for SSH support. Its `fab` command exposes Python tasks with parameters and optional pre- or post-tasks; a comma-separated host list supports serial execution. Authentication options include private key files, SSH agents and passwords. Install it with `pip install fabric`; the listed requirements are Python, Invoke and Paramiko. Fabric runs on Linux, macOS and Windows and uses a self-hosted, agentless model. Remote commands use a clean environment by default rather than copying local environment data. Each `run` or `sudo` call starts a separate shell session, so directory changes do not persist between calls.
Who it suits
Fabric suits Python users and network or systems operators who need SSH-based command and task execution across individual or multiple hosts.
Good to know, and what to watch
- Runs shell commands over SSH
- Supports serial and parallel multi-host execution
- Exposes Python tasks through the fab command
- Supports keys, agents and passwords
- Available on Linux, macOS and Windows
- Each run or sudo call uses a separate shell
- Adds no extra GSSAPI support beyond Paramiko
- Requires Python, Invoke and Paramiko
The verdict
Fabric provides Python-driven SSH automation with both library and command-line workflows. Its separate shell sessions and Paramiko-dependent GSSAPI support are important operational constraints.
What the maker publishes
- CLI host option
- The `fab` command supports a comma-separated host list for serial task execution. source
- CLI tasks
- Fabric integrates with Invoke so Python functions can be exposed as command-line tasks through the `fab` command. source
- Command-line tasks
- Fabric exposes Python tasks through the `fab` command-line tool, with support for task parameters and pre- or post-tasks. source
- Dependencies
- Fabric builds on Invoke for subprocess and command-line features and Paramiko for SSH protocol support. source
- Dependencies
- Fabric builds on Invoke for command execution and task features, and Paramiko for SSH. source
- Downloads
- Source archives are available through the project’s PyPI page, which also serves as the entry point for pip installation. source
- GSSAPI limit
- Fabric says it adds no extra GSSAPI support beyond Paramiko’s existing connection parameters. source
- Host execution
- Fabric supports running commands on individual hosts and across multiple hosts, including serial and parallel approaches. source
- Installation
- The installation guide recommends installing Fabric with `pip install fabric`. source
- Installation
- The project recommends installing Fabric with `pip install fabric`. source
- Legacy compatibility
- The `fabric2` package lets users install modern Fabric alongside Fabric 1, while the project says `fabric3` is an unauthorized fork it does not control. source
- Limit
- Each `run` or `sudo` call uses its own remote shell session, so commands such as `cd` do not persist between calls. source
- Maintainer
- The project’s development team is headed by Jeff Forcier, and the site copyright identifies Jeff Forcier. source
- Multi-host execution
- It can run commands and Python code on individual hosts or across multiple hosts, serially or in parallel. source
- Purpose
- Fabric is a Python library for running shell commands remotely over SSH and returning Python objects. source
- Python tasks
- Users can run Python functions or code blocks against individual connections or multiple hosts. source
- Requirements
- The installation guide lists Python, Invoke, and Paramiko as installation requirements. source
- Security configuration
- Fabric defaults remote commands to a clean environment instead of copying the local process environment, to avoid leaking local environment data. source
- SSH authentication
- Fabric documents support for private key files, SSH agents, and password authentication. source
- SSH authentication
- Fabric supports SSH key files, SSH agents, and password authentication through its connection configuration. source
- Support
- The project recommends its fab-user mailing list for usage help and also points users to GitHub Issues for bugs. source
- Supported environment
- The installation page lists Python 2.7 or 3.4+ as requirements, alongside Invoke and Paramiko. source
- Upgrade path
- The project says modern Fabric can be installed alongside Fabric 1 to allow users to upgrade at their own pace. source
- What it does
- Fabric is a Python library for running shell commands remotely over SSH and returning Python objects. source
Checked against the maker's pages on 8 Oct 2026.