Command Line Reference
Phrozn executable phr comes with extensive documentation by itself.
When in doubt:
$ phr help usage: phrozn <command> [options] [args] Type 'phrozn help <command>' for help on a specific command. Type 'phrozn ? help' for help on using help.
You can use phr and phrozn executables interchangeably.
Personally, I prefer much shorter phr alternative.
phr help
To get help on particular command use phr help <command> or phr ? <command>.
So, to get help on using help command:
$ phr ? help
Help on specific commands also contains verbose mode, which produce more elaborated version of docs:
$ phr ? -v help
$ phr help -v help
$ phr help -v init
$ phr help -v up
phr init
This command is used to initialize Phrozn project. It creates necessary folder structure and config files:
$ mkdir my-phrozn-project
$ cd my-phrozn-project
$ phr init
Or you can specify project directory explicitly:
$ mkdir my-phrozn-project
$ phr init my-phrozn-project
As you see, if project directory not specified current one is assumed.
For further info:
$ phr ? init
phr update
Update command is used to create/update static site representation of your project. By far, this is a command you will invoke most often.
phr up accepts two arguments: the first one is input directory containing Phrozn project, and the second one
is output directory. However, since both arguments default to current working directory, you generally omit them
altogether:
$ cd my-phrozn-project
$ phr up
For further info:
$ phr ? up
phr single
Single command is used to create/update a single static page.
phr single accepts three arguments: the first one is input file to process, the second one
is the source directory and the third one is the output folder. However, latest two arguments are optional and
use the current working directory, you generally omit them altogether:
$ cd my-phrozn-project
$ phr single path/to/my/file.ext
For further info:
$ phr ? single
phr clobber
This command locates and removes Phrozn project directory, effectively deleting all user generated content.
$ cd my-phrozn-project
$ phr clobber
You can manually simulate the clobber command by removing project directory .phrozn manually.
USE WITH CAUTION!! Once you purge the project, all changes are lost (albeit they are preserved in repo).
For further info:
$ phr ? clobber
phr bundle
Phrozn bundles are just archived directories with pluggable code that can be applied to any Phrozn project. Functionality contained within bundle is decoupled from the rest of the project, thus can be effortlessly reused.
For instance, consider that you've implemented some processor
for Project A. Moving that implementation to bundle will allow you to apply
the very same processor to any future project using single phr bundle command.
Make sure you run phr bundle command from within Phrozn project
directory (directory containing .phrozn) or from within .phrozn folder itself.
Bundle command accepts 4 different subcommands:
list,
info,
apply,
clobber
phr bundle list
Used to list bundles. Common use cases include:
$ cd my-phrozn-project
List all available bundles (both installed and not installed):
$ phr bundle list
$ phr bundle list -a
$ phr bundle list --all
# List all installed bundles:
$ phr bundle list -i
$ phr bundle list --installed
# List all not yet installed bundles:
$ phr bundle list -i
$ phr bundle list --installed
When listing bundles you may pass bundle name as additional parameter.
bundle list command is smart enough to filter results using provided search string.
For example, to list all installed bundles having "test" sting in their names:
$ phr bundle list -i test
$ phr bundle list --installed test
phr bundle info
This command is used to get full info about bundle:
$ phr bundle info test
Phrozn 0.1.38 by Victor Farazdagi
+-------------+--------------------------------------------------------------------+
| Param | Value |
+-------------+--------------------------------------------------------------------+
| id | processor.test |
| name | Test |
| description | Test processor plugin - used to demonstrate how new text processor |
| | might be added to Phrozn |
| | |
| version | 1.0 |
| author | Victor Farazdagi |
+-------------+--------------------------------------------------------------------+
phr bundle apply
Apply bundle to the current Phrozn project:
$ cd my-phrozn-project
# Install bundle from official repository:
$ phr bundle apply processor.test
# Install bundle from file:
$ phr bundle apply /path/to/bundle.tgz
# Install bundle from URL:
$ phr bundle apply https://domain.com/path/to/bundle/bundle.name.tgz
Phrozn will download, extract and copy files located in bundle into project directory.
phr bundle clobber
Phrozn keeps track of what files have been installed/copied on bundle apply step.
Should you need to remove previously installed bundle - it is trivial:
$ cd my-phrozn-project
$ phr bundle clobber processor.test
For further info:
$ phr ? bundle
Alternatively, if you want to see phr bundle examples as well:
$ phr ? bundle -v
