> For the complete documentation index, see [llms.txt](https://docs.sealsecurity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealsecurity.io/setup-apps-os/cli-in-cicd.md).

# Seal Apps via the Seal CLI in CI/CD

Running the Seal CLI in your CI/CD pipeline is the most complete way to use Seal Apps. The CLI scans your dependency manifest, applies the active Sealing Rules (or replaces every vulnerable package, in **all** mode), and produces the build that ships sealed packages instead of vulnerable ones. The same CLI run also feeds Seal's discovery side, so the Seal Project's package picture stays current.

This chapter is the canonical setup home for the three CLI-in-CI deployment methods (Remote, Local, and Automatic Remediation, see [Choosing your deployment method](/setup-apps-os/choosing-deployment-method.md)). The chapter is structured as:

* [Installing the Seal CLI](/setup-apps-os/cli-in-cicd/installing-the-cli.md): downloading and unpacking the binary on Linux, macOS, or Windows.
* [The CLI fix mode](/setup-apps-os/cli-in-cicd/cli-fix-mode.md): the three modes the CLI runs in (local, remote, all) and which one each deployment method uses.
* Per-platform CI integrations:
  * [Integrating with GitHub Actions](/setup-apps-os/cli-in-cicd/github-actions.md): the dedicated `seal-community/cli-action`.
  * [Integrating with GitLab CI](/setup-apps-os/cli-in-cicd/gitlab-ci.md)
  * [Integrating with Azure DevOps Pipelines](/setup-apps-os/cli-in-cicd/azure-devops.md)
  * [Integrating with Jenkins](/setup-apps-os/cli-in-cicd/jenkins.md)
  * [Integrating with CircleCI](/setup-apps-os/cli-in-cicd/circleci.md)
* [Running the CLI inside a Dockerfile](/setup-apps-os/cli-in-cicd/dockerfile.md): for builds that drop into a container, with or without a CI system around them.
* [Setting up local development](/setup-apps-os/cli-in-cicd/local-development.md): running the CLI on a developer's machine with a development token.
* [Common issues](/setup-apps-os/cli-in-cicd/common-issues.md): the failures that come up most often.

## Before you start

* The Seal CLI must run somewhere with network access to the Seal Platform and the [Seal Artifact Server](/discovering/artifact-server-discovery.md).
* You need a [token](/getting-started/tokens.md) for authentication. Production tokens for production-equivalent CI; development tokens for developer machines and feature-branch pipelines.
* You need a Seal Project for the CLI to attribute its activity to. The first run with a `SEAL_PROJECT` value that does not exist creates the project automatically; see [Project ID and project name](/getting-started/creating-a-seal-project.md#project-id-and-project-name).

## What the CLI does in CI

A typical CI invocation runs `seal fix`. The flow:

1. The CLI authenticates with the token from `SEAL_TOKEN`.
2. It scans the dependency manifest in the working directory and reports the discovered packages to the Seal Platform under the supplied `SEAL_PROJECT`.
3. Depending on the [fix mode](/setup-apps-os/cli-in-cicd/cli-fix-mode.md), the CLI fetches the relevant Sealing Rules (remote) or reads them from `.seal-actions.yml` (local), or skips the rule lookup and replaces every vulnerable package it can (all).
4. For each rule that applies, the CLI pulls the sealed version from the Seal Artifact Server and replaces the installed vulnerable version on disk.
5. Subsequent build steps run against the sealed packages in place of the originals.

## When in the pipeline the CLI runs

The CLI replaces packages **on disk** that the dependency-install step has already put there. The right place in your pipeline is therefore **after** the install step (`npm install`, `npm ci`, `mvn install`, `pip install`, `composer install`, and so on) and **before** any step that packages, bundles, or compiles those dependencies together (webpack, JAR packaging, `docker build`, and so on).

If the CLI runs before the install step, there are no installed packages to replace and the step is a no-op. If the CLI runs after the packaging step, the packaged output is already built from the vulnerable versions.

## Related

* [Choosing your deployment method](/setup-apps-os/choosing-deployment-method.md): the decision page for the five deployment methods.
* [Connecting via the Seal CLI in CI](/discovering/cli-in-ci.md): the discovery-side how-to that pre-dates this chapter.
* [Sealing Rules](/using-platform/sealing-rules.md): the rules the CLI applies in remote and local modes.
