Manage the database using the pos-cli GUI
This guide introduces our database management tool, which is part of pos-cli
.
The pos-cli gui serve
command is an efficient way to preview your current database state. It also allows you to modify data easily via the UI. However, it is not recommended for use in a production environment. For modifying production data, consider writing a migration for a small amount of data or a one-time script that you can invoke in a staging environment first.
Requirements
To follow the steps in this tutorial, ensure you have pos-cli
installed and your environment configured.
- Get Started Guide: helps you get access to our platform, set up a site and install
pos-cli
. - Technologies
Starting the GUI
To start the Database UI locally, run the pos-cli gui serve [environment]
command.
For example:
$ pos-cli gui serve staging
[18:05:01] Connected to https://documentation.platformos.com/
[18:05:01] Admin: http://localhost:3333
[18:05:01] ---
[18:05:01] GraphiQL IDE: http://localhost:3333/gui/graphql
[18:05:01] Liquid evaluator: http://localhost:3333/gui/liquid
Note
Replace staging
with the environment name you want to develop on. To list all available environments, use pos-cli env list
Do not close your terminal and do not end the command, as pos-cli gui serve
has to be running in the background for the GUI to work correctly.
To start using the GUI, navigate to http://localhost:3333/database
with GraphQL in it.
UI and Features Overview
Here is an example of how the UI looks for our e-Commerce Marketplace Solution:
![Screenshot of Database UI](https://uploads.platformos.dev/instances/85/assets/images/get-started/database-ui.png?updated=1724963141)
The UI allows you to:
- List all existing tables
- Browse data in each table with filtering and sorting support (the UI builds records GraphQL queries with the proper arguments behind the scenes)
- Edit existing record
- Delete existing record
- Create a new record
- Browse soft-deleted records and undelete them