# C2PA command line tool [![CI](https://github.com/contentauth/c2patool/actions/workflows/ci.yml/badge.svg)](https://github.com/contentauth/c2patool/actions/workflows/ci.yml) [![Latest Version](https://img.shields.io/crates/v/c2patool.svg)](https://crates.io/crates/c2patool) [![codecov](https://codecov.io/gh/contentauth/c2patool/graph/badge.svg?token=L9XKK0W9VE)](https://codecov.io/gh/contentauth/c2patool) C2PA Tool, `c2patool`, is a command line tool for working with C2PA [manifests](https://c2pa.org/specifications/specifications/1.4/specs/C2PA_Specification.html#_manifests) and media assets (audio, image or video files). Use the tool on a file in one of the [supported formats](https://github.com/contentauth/c2pa-rs/blob/main/docs/supported-formats.md) to: - Read a summary JSON report of C2PA manifests. - Read a low-level report of C2PA manifest data. - Add a C2PA manifest to the file. > [!TIP] > For a series of educational videos on using C2PA Tool, see [Content Credentials Foundations](https://learn.contentauthenticity.org/signing-your-first-asset). For a simple example of calling c2patool from a Node.js server application, see the [c2patool-service-example](https://github.com/contentauth/c2patool-service-example) repository.
**Additional documentation**: - [Using C2PA Tool](docs/usage.md) - [Manifest definition file](docs/manifest.md) - [Signing assets](docs/signing.md) - [Change log / release notes](CHANGELOG.md) - [Contributing to the project](docs/project-contributions.md)
## Installation If you are using macOS, you can install C2PA Tool using Homebrew: 1. Install [Homebrew](https://brew.sh/) if you haven't already done so. 1. Install C2PA Tool: ``` brew install c2patool ``` If you're using another OS or don't want to use Homebrew, install a prebuilt binary of C2PA Tool: 1. Go to the [Releases page](https://github.com/contentauth/c2patool/releases). 2. Under **Assets**, click on the archive file for your operating system: - MacOS: `c2patool-vx.y.z-universal-apple-darwin.zip` - Windows: `c2patool-vx.y.z-x86_64-pc-windows-msvc.zip` - Linux: `c2patool-vx.y.z-x86_64-unknown-linux-gnu.tar.gz` 3. Download and extract the archive file. 4. Copy the `c2patool` executable file to a location on your `PATH`. > [!NOTE] > Looking for an older version? `c2patool` used to be part of the `c2pa-rs` monorepo. Releases `v0.27.15` and earlier live on [c2pa-rs's Releases page](https://github.com/contentauth/c2pa-rs/releases) instead, tagged `c2patool-vX.Y.Z`. After installing, confirm that you can run the tool by entering a command such as: ``` c2patool -h ``` When running a prebuilt binary, you may need to set execution permission for the tool on your system. For macOS, see [If you want to open an app that hasn’t been notarized or is from an unidentified developer](https://support.apple.com/en-us/102445#openanyway). NOTE: You also may want to get some of the example files provided in the repository `sample` directory. To do so, clone the repository with `git clone https://github.com/contentauth/c2patool.git`. ### Installing from source Instead of installing a prebuilt binary, you can [build the project from source](https://github.com/contentauth/c2patool/blob/main/docs/project-contributions.md#building-from-source). ### Upgrading To display the version of C2PA Tool that you have, enter this command: ``` c2patool -V ``` The tool will display the version installed. Compare the version number displayed with the latest release version shown in the [repository releases page](https://github.com/contentauth/c2patool/releases). If you don't have the latest version, simply reinstall C2PA Tool to get the latest version.