PHPackages                             netglue/prismic-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. netglue/prismic-cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

netglue/prismic-cli
===================

CLI tooling for developing Prismic content models

1.15.0(3mo ago)086.2k↑841.7%[3 issues](https://github.com/netglue/prismic-cli/issues)MITPHPPHP ~8.2 || ~8.3 || ~8.4 || 8.5CI passing

Since Jun 9Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/netglue/prismic-cli)[ Packagist](https://packagist.org/packages/netglue/prismic-cli)[ Docs](https://github.com/netglue/prismic-cli)[ RSS](/packages/netglue-prismic-cli/feed)WikiDiscussions 1.16.x Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (49)Used By (0)

PHP Based Prismic CLI Tooling
=============================

[](#php-based-prismic-cli-tooling)

[![Build Status](https://github.com/netglue/prismic-cli/workflows/Continuous%20Integration/badge.svg)](https://github.com/netglue/prismic-cli/actions?query=workflow%3A%22Continuous+Integration%22)

[![codecov](https://camo.githubusercontent.com/5a956d4f4a349f46e35187623964bc424afbdff3e600a7fae3aaf2ed4dc7de04/68747470733a2f2f636f6465636f762e696f2f67682f6e6574676c75652f707269736d69632d636c692f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/netglue/prismic-cli)[![Psalm Type Coverage](https://camo.githubusercontent.com/ae80e2cf015571449d462fc9cf7898ed1efe9d075ce072ce593215cd0546f496/68747470733a2f2f73686570686572642e6465762f6769746875622f6e6574676c75652f707269736d69632d636c692f636f7665726167652e737667)](https://shepherd.dev/github/netglue/prismic-cli)

[![Latest Stable Version](https://camo.githubusercontent.com/b6f4cdb2cfe0fae4090034edf98fee03a92c5a4f527c56b638a1b3fe7d67cb44/68747470733a2f2f706f7365722e707567782e6f72672f6e6574676c75652f707269736d69632d636c692f762f737461626c65)](https://packagist.org/packages/netglue/prismic-cli)[![Total Downloads](https://camo.githubusercontent.com/b46ec428dff58f3e0d37481405cec40ea73b9353ae00aa6927add1f9fe743c41/68747470733a2f2f706f7365722e707567782e6f72672f6e6574676c75652f707269736d69632d636c692f646f776e6c6f616473)](https://packagist.org/packages/netglue/prismic-cli)

This is a development tool based on Symfony Console so require it with `--dev` - it's meant to be used as part of a build process with a tool like `npm-watch` or similar.

```
$ composer require --dev netglue/prismic-cli
```

The primary installation target for this lib is a [Mezzio](https://github.com/mezzio) app as it has been built to integrate with the [Laminas CLI](https://github.com/laminas/laminas-cli) package.

During installation you should be prompted to inject the config provider(s) if installing as part of a Mezzio app.

`laminas/laminas-cli` is not required by this lib, so you'll need to require it too if that's what you want.

There's nothing to stop you from using this tool 'stand-alone' - the `./example/example.php` should point you in the right direction for this. It's also worth inspecting that example so everything makes sense.

Building Document Model JSON Files
----------------------------------

[](#building-document-model-json-files)

The command `primo:build`, given some configuration, generates JSON files from PHP sources that you can copy and paste into [Prismic.io's](https://prismic.io) custom type editor.

Assuming that you are using a DI container that returns application-wide config as an array using `config` as a service id, You can drop configuration similar to this in order to have the tool build your types upon invocation.

```
