The Perforce API Project

About This Project


The Perforce API Project collects user-contributed interfaces to allow programmatic access to Perforce. Most of these do so by providing a layer between the Perforce API and a particular language; some use the Perforce command line client.

(Also, see WebKeeper for another Perforce API implementation example.)


Please contact Perforce if you have any submitted contributions you'd like integrated into the public branch of the Perforce API Project.

API Interfaces


P4Client, a Python interface to the Perforce ClientApi class. A Python review daemon script that uses it is provided as an example. Contributed by Mike Meyer.


A Perl interface to the Perforce API. Contributed by Tony Smith.


A Ruby interface to the Perforce API. Contributed by Tony Smith.


A Java interface to the Perforce API. Contributed by Michael Bishop.

Interface Toolkits

These tools provide higher level capabilities (as opposed to the basic API/language bindings in the API Interfaces section above).

P4Package, a high-level Java API for Perforce. These classes provide a way to encapsulate source control objects like branches, files, users, etc. This implementation is based on the execution of the Perforce command line client, rather than the Perforce API proper. Contributed by David Markley.


This application allows multiple users to access the perforce using the same web application using their own credentials. This makes it easy to add pages that implement other perforce functions and have them execute using appropriate authorization. An example would be a page that handled integrations from one branch to another at the click of one button or link. Contributed by David Markley.

You're browsing a file stored as $Id: //public/perforce/api/index.html#14 $