Passion project OpenProject CLI

Passion project: Introduce OpenProject Command Line Interface (CLI)

Geschätzte Lesezeit: 2 Minuten

A command line interface (CLI) is a text-based user interface (UI) that allows users to run programs, manage computer files, and interact with the computer. CLIs accept only keyboard input as commands. It involves passing lines of text to the computer either directly from the keyboard or in the form of a script, which the computer then executes.

Introducing a CLI for OpenProject

In a graphical user interface, users derive the action from what they perceive on the screen, e.g. a label on a button indicating what the button will do. On the contrary, the CLI will guide the user with help pages and suggestions for command completions.

All OpenProject interactions (use cases) must currently be performed directly in the browser. For this, users have to log in and execute the respective action. This may feel time-consuming for some users, especially if one only wants to execute individual commands, such as a file upload. Developers in particular are used to working with the terminal and can execute commands easily via the command line.

For a team during our Passion Time it was desirable to identify particular use cases and to be able to execute them quickly via an OpenProject CLI.

Passion project: Introduce OpenProject Command Line Interface (CLI).
Why: Devs love their command line, so it should also be possible to operate with it in OpenProject.
How: Building an interface for dedicated use cases OpenProject provides without opening a browser.
What: Identifying and implementing use cases that should be executed via the command line.

Was wir getan haben

The team initiated a new repository on GitHub with a new tech stack “Go”, separately from the actual tech stack of the product. The OpenProject CLI can then be downloaded for any operating system. With this tool it will then be possible to execute individual use cases in a guided way.

OpenProject CLI Example: OpenProject CLI

For OpenProject we have implemented a selection of use cases, for example:

  • Display the notification center with latest unread notifications
  • Create, update, filter and inspect work packages, e.g.
    • Dateien an Arbeitspakete anhängen
    • Set assignees
    • Execute custom actions
    • Add comments
  • List visible projects

OpenProject CLI work packages details Example: display details of a work package with the inspect command

What’s next

We will be adding the information of the OpenProject CLI also to our documentation. There will be plenty of use cases that can be implemented this way. One focus will be to gain some practical experience with it first.

As always, we are very happy to get feedback from the Community.