satis
Create a private Composer repository
TLDR
Initialize a Satis configuration
Add a VCS repository to the Satis configuration
Build the static output from the configuration
Build the static output by updating only the specified repository
Remove useless archive files
SYNOPSIS
satis [command] [options] [arguments]
Common commands include:
satis build [--repository-url=
satis init [options]
satis validate [options]
PARAMETERS
build
Generates the static Composer repository based on the satis.json configuration file. This is the most frequently used command.
init
Initializes a basic satis.json configuration file in the current directory, providing a starting point for your repository.
validate
Checks the satis.json configuration file for syntax errors and common issues without building the repository.
--no-interaction
Prevents satis from asking any interactive questions during execution, useful for automated scripts.
-v, -vv, -vvv
Increases the verbosity of messages: -v for normal output, -vv for more verbose, and -vvv for debug output.
--ansi / --no-ansi
Forces or disables ANSI output (colored output) for the command line.
--profile
Displays timing and memory usage information after the command execution.
DESCRIPTION
Satis is a command-line tool built on top of Composer that serves as a static Composer repository generator. It allows you to create a local, self-hosted mirror of your PHP project dependencies, including both public packages from Packagist and private packages from your own Git or other version control systems.
The primary use case for satis is to provide a reliable, fast, and private source for your Composer dependencies. Instead of fetching packages directly from external sources like Packagist.org for every deployment, you can point your projects to your internally generated satis repository. This is particularly beneficial for large organizations, CI/CD pipelines, or when dealing with numerous private packages.
When run, satis reads a configuration file (typically satis.json) that specifies which packages and repositories it should mirror. It then fetches these packages, resolves their dependencies, and generates a set of static JSON and package files, often placed in a "web" directory. This directory can then be served by any standard web server (e.g., Nginx, Apache) to act as a Composer repository.
CAVEATS
Satis requires PHP and Composer to be installed and accessible. Building large repositories can consume significant disk space and take a considerable amount of time, especially during the initial build or when many packages are updated. It's crucial to ensure the generated "web" directory is served securely if it contains private packages or sensitive information. satis is a repository generator, not a package manager itself; it relies on Composer for dependency resolution and installation.
CONFIGURATION FILE (<I>SATIS.JSON</I>)
The core of satis operation relies on a JSON configuration file, typically named satis.json. This file defines the `homepage` for your repository, a list of `repositories` (e.g., Git, VCS, Packagist) to source packages from, and a `require` section specifying which packages from those repositories should be mirrored. It also supports `archive` options for creating zipped package archives and `config` settings.
GENERATED OUTPUT
Upon successful execution of the build command, satis generates a directory (defaulting to 'web/') containing static JSON files (e.g., `packages.json`, `p/provider-2016-1.json`) and potentially zipped archives of packages. This output directory is designed to be served directly by any static file server, making it a ready-to-use Composer repository.
HISTORY
Satis was developed by the creators of Composer, Nils Adermann and Jordi Boggiano, as a complementary tool to address the need for self-hosted Composer repositories. It emerged to provide a solution for private package hosting and to reduce reliance on external services like Packagist.org for internal or large-scale deployments, thereby improving build speeds and reliability within controlled environments.