PHPackages                             staticka/console - 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. staticka/console

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

staticka/console
================

Terminal-based package for Staticka.

v0.2.0(1y ago)01771MITPHPPHP &gt;=5.3.0CI failing

Since Apr 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/staticka/console)[ Packagist](https://packagist.org/packages/staticka/console)[ Docs](https://roug.in/staticka/console/)[ RSS](/packages/staticka-console/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (1)

Staticka Console
================

[](#staticka-console)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f35f442cb92e6deea3439b3b00ffc9a78b4e38c951d97873b0520a11d167d199/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7374617469636b612f636f6e736f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/staticka/console)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/staticka/console/blob/master/LICENSE.md)[![Build Status](https://camo.githubusercontent.com/9805304cc80f6f829390e3481f1d31a75c40bc2aed6eecb1c2d6be8d317c1f87/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7374617469636b612f636f6e736f6c652f6275696c642e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/staticka/console/actions)[![Coverage Status](https://camo.githubusercontent.com/440bd939499f59f71f02c97c495b5ff44ab3db30af4e3a380554caefcbd94efe/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7374617469636b612f636f6e736f6c653f7374796c653d666c61742d737175617265)](https://app.codecov.io/gh/staticka/console)[![Total Downloads](https://camo.githubusercontent.com/4b9145782d020acd464b5755efb280653789536381a72095d21319cf87dea781/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7374617469636b612f636f6e736f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/staticka/console)

`Console` is a terminal-based package of [Staticka](https://github.com/staticka/staticka) which allows creating and building of pages through a terminal.

Installation
------------

[](#installation)

Installing the `Console` package is possible through [Composer](https://getcomposer.org/):

```
$ composer require staticka/console
```

Basic Usage
-----------

[](#basic-usage)

To create a new page, use the `create` command with its title:

```
$ vendor/bin/staticka create "Hello world!"
[PASS] "Hello world!" page successfully created!
```

```

---
name: Hello world!
link: /hello-world
title: Hello world!
description:
tags:
category:
---

# Hello world!
```

```
ciacme/
├── pages/
│   └── 20241028202552_hello-world.md
├── vendor/
└── composer.json

```

After adding some text to the newly created page, use the `build` command to compile the `.md` files to `.html`:

```
$ vendor/bin/staticka build
[PASS] Pages successfully compiled!
```

```
ciacme/
├── build/
│   └── hello-world/
│       └── index.html
├── pages/
│   └── 20241028202552_hello-world.md
├── vendor/
└── composer.json

```

```

Hello world!
```

Note

`Console` will try to create the required directories (e.g., `build`, `pages`) if they do not exists in the current working directory.

Using `staticka.yml`
--------------------

[](#using-statickayml)

`Console` typically works out of the box without any configuration. But if there is a need to change the path of its other supported directories or needs to extend the core functionalities of `Console`, the `staticka.yml` file can be used in those kind of scenarios:

```
# staticka.yml

root_path: %%CURRENT_DIRECTORY%%
timezone: Asia/Manila

assets_path: %%CURRENT_DIRECTORY%%/assets
build_path: %%CURRENT_DIRECTORY%%/build
config_path: %%CURRENT_DIRECTORY%%/config
pages_path: %%CURRENT_DIRECTORY%%/pages
plates_path: %%CURRENT_DIRECTORY%%/plates
scripts_path: %%CURRENT_DIRECTORY%%/scripts
styles_path: %%CURRENT_DIRECTORY%%/styles
```

To create the said `staticka.yml` file, simply run the `initialize` command:

```
$ vendor/bin/staticka initialize
[PASS] "staticka.yml" added successfully!
```

After successfully creating the said file, it will provide the following properties below:

### `root_path`

[](#root_path)

This property specifies the current working directory. By default, it uses the `%%CURRENT_DIRECTORY%%` placeholder that returns the current directory of the `staticka.yml` file:

```
# staticka.yml

root_path: %%CURRENT_DIRECTORY%%/Sample

# ...
```

### `timezone`

[](#timezone)

This allows to change the timezone to be used when creating timestamps of a new page. If not specified, `Console` will use the default timezone specified in the `php.ini` file:

```
# staticka.yml

timezone: Asia/Tokyo

# ...
```

### `assets_path`

[](#assets_path)

This specifies the path for all other web assets like images (`.jpg`, `.png`) and PDF files (`.pdf`). `Console` does not use this specified path but it might be useful to locate the directory for organizing asset files:

```
# staticka.yml

assets_path: %%CURRENT_DIRECTORY%%/assets

# ...
```

### `build_path`

[](#build_path)

This is the property that will be used by `Console` to determine the destination directory of the compiled pages:

```
# staticka.yml

build_path: %%CURRENT_DIRECTORY%%/build

# ...
```

### `config_path`

[](#config_path)

One of the properties of `Console` that locates the directory for storing configuration files. If defined, it will load its `.php` files to a `Configuration` class. The said class is useful when creating extensions to `Console`:

```
# staticka.yml

config_path: %%CURRENT_DIRECTORY%%/config

# ...
```

```
// config/parser.php

return array(
    /**
     * @var \Staticka\Filter\FilterInterface[]
     */
    'filters' => array(
        'Staticka\Expresso\Filters\GithubFilter',
        'Staticka\Expresso\Filters\ReadmeFilter',
    ),
);
```

```
// src/Package.php

namespace Ciacme;

use Rougin\Slytherin\Container\ContainerInterface;
use Rougin\Slytherin\Container\ReflectionContainer;
use Rougin\Slytherin\Integration\Configuration;
use Rougin\Slytherin\Integration\IntegrationInterface;

class Package implements IntegrationInterface
{
    public function define(ContainerInterface $container, Configuration $config)
    {
        // Will try to access the "config/parser.php" file ---
        /** @var class-string[] */
        $filters = $config->get('parser.filters', array());
        // ---------------------------------------------------

        // ...
    }
}
```

Note

To allow custom packages for `Console`, kindly add the specified package class in `staticka.yml`. Please see the `Extending Console` section below for more information.

### `pages_path`

[](#pages_path)

This is the location of the generated pages from `create` command:

```
# staticka.yml

pages_path: %%CURRENT_DIRECTORY%%/pages

# ...
```

### `plates_path`

[](#plates_path)

One of the special variables of `Console` to specify a directory that can be used for third-party templating engines (`RenderInterface`):

```
# staticka.yml

plates_path: %%CURRENT_DIRECTORY%%/plates

# ...
```

### `scripts_path`

[](#scripts_path)

This is the property for the directory path of script files (`.js`, `.ts`). Although not being used internally by `Console`, this property can be used when extending core functionalities (e.g., compiling `.js` files through [Webpack](https://webpack.js.org/) when running the `build` command):

```
# staticka.yml

scripts_path: %%CURRENT_DIRECTORY%%/scripts

# ...
```

### `styles_path`

[](#styles_path)

Same as `scripts_path`, this property specifies the directory path for styling files (`.css`, `.sass`):

```
# staticka.yml

styles_path: %%CURRENT_DIRECTORY%%/styles

# ...
```

Extending `Console`
-------------------

[](#extending-console)

`Console` is based on the [Slytherin](https://github.com/rougin/slytherin) PHP micro-framework which provides an easy way to integrate custom packages through `IntegrationInterface`. The said interface can be used to create instances related to `Staticka`:

```
// src/Package.php

namespace Ciacme;

use Rougin\Slytherin\Container\ContainerInterface;
use Rougin\Slytherin\Container\ReflectionContainer;
use Rougin\Slytherin\Integration\Configuration;
use Rougin\Slytherin\Integration\IntegrationInterface;
use Staticka\Filter\HtmlMinifier;
use Staticka\Layout;

class Package implements IntegrationInterface
{
    /**
     * This sample package will always minify the compiled HTML files.
     *
     * @param \Rougin\Slytherin\Container\ContainerInterface $container
     * @param \Rougin\Slytherin\Integration\Configuration    $config
     *
     * @return \Rougin\Slytherin\Container\ContainerInterface
     */
    public function define(ContainerInterface $container, Configuration $config)
    {
        $layout = new Layout;

        $layout->addFilter(new HtmlMinifier);

        $container->set(get_class($layout), $layout);

        return $container;
    }
}
```

To add the specified custom package, kindly add it to the `staticka.yml` file:

```
# staticka.yml

root_path: %%CURRENT_DIRECTORY%%

# ...

packages:
  - Ciacme\Package
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](https://github.com/staticka/console/blob/master/CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

The unit tests of `Console` can be run using the `phpunit` command:

```
$ vendor/bin/phpunit
```

Credits
-------

[](#credits)

- [All contributors](https://github.com/staticka/console/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](https://github.com/staticka/console/blob/master/LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1205 days

Total

3

Last Release

554d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7721589a958a1fbcef1b527c794d820d75b82988f14b2ed86a1c6904d76a59e?d=identicon)[rougin](/maintainers/rougin)

---

Top Contributors

[![rougin](https://avatars.githubusercontent.com/u/6078637?v=4)](https://github.com/rougin "rougin (65 commits)")

---

Tags

php-cliphp-librarystatic-site-generatorstatickaphp-consolesite generator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/staticka-console/health.svg)

```
[![Health](https://phpackages.com/badges/staticka-console/health.svg)](https://phpackages.com/packages/staticka-console)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
