Download the PHP package shel/neos-terminal without Composer

On this page you can find all versions of the php package shel/neos-terminal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package neos-terminal

Neos CMS terminal for running Eel expressions and other commands in the UI

Tests

This package provides a Terminal emulator plugin for the Neos CMS UI. Several commands are provided to save time during development & debugging of Neos CMS projects.

All commands and their output are also automatically available in the browser dev console as NeosTerminal - for easier handling of JSON results and persistent history.

It uses the great terminal component by Linus Willner.

Quick overview:

How it looks

Watch the video

Installation

Run the following command in your Neos project:

Supported Neos versions

Due to required React features, the Terminal UI integration is only available for more recent Neos versions which provide React >= 16.8. But the commands are still registered and available via the NeosTerminal global window object even when the React version is too old.

Neos version Terminal
4.3 Commands are only available via the browser console
5.2 - 5.3 Full support
7.0+ Full support
8.0+ Full support

Usage

There are three ways to access the terminal functionality:

  1. Open the terminal by clicking on the terminal icon in the top menu bar in the Neos backend.
  2. Open the terminal with the t t hotkey (configured via the Neos hotkey API in the Settings.yaml).
  3. Access the terminal commands from the browser dev console via the global NeosTerminal object.

Now you can run any of the provided commands, or your own.

Included commands

Available default commands:

You can add custom commands.

Eel evaluator

The eel command allows you to run any Eel expression.

You can run simple expressions:

Read a specific setting:

Get a list of all Eel helpers:

Or more complex ones. The following call will return the labels of all subpages of your homepage:

By default, the current site, documentNode and the currently selected node are available in your expression context.

Note: The command will run some conversions on the result:

This will be optimised in future releases and should improve the readability of the output.

Flush caches

The flushCache command allows you to flush all caches or a single cache.

E.g. the following call will flush the Fusion rendering cache:

If the cache identifier is omitted, all caches are flushed.

Please use this command only when absolutely necessary. Caching issues can be fixed in the implementation.

Repair nodes

The nodeRepair command allows you to repair nodes by their nodetype. It uses the same plugins and methods as the ./flow node:repair CLI command.

E.g. the following call will remove undefined properties from the Neos example text nodes:

You can also do a dry run by adding the -d option and see what the method would do:

To filter by workspace you can add the name of the workspace:

Warning: Some repair methods would ask you for confirmation when you run them via CLI. Currently they would execute without asking for confirmation.

Configuration

Enabling the plugin in Production context

By default, the plugin is only loaded in Development context. If you want to have it active in Production, you have to override the setting in your Settings.yaml:

Security

Executing commands in the Neos backend opens up a possible security risk.

Therefore, if you use this plugin in production, make sure only a limited number of users have access to it.

When creating your own commands, keep in mind to make sure nothing bad can happen to your database or other systems.

Example: If you have your own Eel helper that can send API requests to another system with full write access, this could be abused by someone if a backend user with enough privileges is hacked.

Theming

Have a look at the Settings.yaml in this package and its frontendConfiguration. It allows you to override the theme with your own.

Command policies

By default, any Administrator has full access to all existing and added commands.

Additionally, the role Shel.Neos.Terminal:TerminalUser exists which by default can only run the eel command. You can add more privileges to this role to allow more commands and assign it to users or as a parentRole for other roles. See Policy.yaml in this package for examples.

Adding your own commands

Adding your commands takes just a few steps (depending on what you plan to do).

Create a new class named MyCommand and implement the TerminalCommandControllerPluginInterface from this package or inherit from AbstractTerminalCommand. As soon as you implemented all required methods, you are good to go!

As an example, you can create a command to show the joke of the day with the following class. Just adapt the namespace depending on your own package key.

Did you create awesome commands that could be helpful to others? Send a link to a gist containing the PHP class or a link to your repo, and we can add it to the docs.

Providing feedback to Neos UI

The Neos UI supports ServerFeedbacks. Those are commonly used to trigger reload of nodes and documents or changing the state of nodes after manipulating them.

You can add those feedbacks to the CommandInvocationResult.

An example of a invocation method which triggers a reload of the Neos UI guestframe after a node has been updated execution would look like this:

If you have a Neos UI plugin that has its own registered feedbacks you can trigger them too.

Providing commands in other packages

If you have a package that provides a command, you should check whether the Terminal is installed in your code when defining the command.

In order to achieve that, you have to wrap the command class in a condition and use the fully qualified name to reference classes and interfaces from the Terminal package:

Supporting this plugin / how to get rid of the sponsorship badge

Creating and maintaining a plugin like this takes a lot of time. Therefore, I decided to add a small nagging badge to promote financial support for my work.

There are several ways to get rid of the little sponsoring badge in the terminal:

  1. Get in touch with me for a direct sponsoring of 100€ (excl. VAT) / registration key
  2. Become a sponsor via Github 20$+/month level
  3. Become a patreon 20$+/month level

In return, you will feel much better, and you get a registration key you can put into your settings which will disable the mentioned badge.

This will help me to further develop this and other plugins. Of course, I'll also do my best to react quickly to issues & questions.

There is a 4th way: Fork this repo and patch the verification check (or whatever other way you might find). Sure you can do that. But you will receive bad karma, and you won't be helping the future of this plugin.

If the badge doesn't bother you, that's fine too. Keep it and enjoy the plugin :).

Contribute

Contributions are very welcome.

For code contributions, please create a fork and create a PR against the lowest maintained branch of this repository (currently master).

Run Tests

Make sure you have the behat dependency required in your composer.json and run the following command:

License

See License


All versions of neos-terminal with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
neos/neos Version ^8.3
neos/neos-ui Version ^8.3
symfony/console Version ^4.2 || ^5.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shel/neos-terminal contains the following files

Loading the files please wait ....