Table of Contents

Introduction Installation Projects Tables Inserts Searches Updates Deletes CLI Production Installation Good Practices Conclusion

CLI - Flaarum Tutorials

Flaarum also provides a CLI (Command Line Interface) for easy administration of the database. The cli must be called from the same machine as the database: if you are running a production database, you must SSH into the machine and use the cli from there.

The flaarum's cli command is flaarum.cli

Available Sub-Commands in Flaarum's CLI

The output of flaarum.cli is contained here to show all the sub-commands of flaarum's cli


flaarum cli provides some utilites for a flaarum installation.
Please Run this program from the same server that powers your flaarum.
Please don't expose your flaarum database to the internet for security sake.

Directory Commands:
pwd   Print working directory. This is the directory where the files needed by any command
      in this cli program must reside.

Project(s) Commands:

lp    List Projects
cp    Create Project: Expects the name(s) of projects after the command.
rp    Rename Project. Expects the name of the project to rename  followed by the new name of the project.
dp    Delete Project. Expects the name(s) of projects after the command.

Table(s) Commands:

lt    List Tables: Expects a project name after the command.
ct    Create Table: Expects a project name and the path to a file containing the table structure
uts   Update Table Structure: Expects a project name and the path to a file containing the table structure
ctvn  Current Table Version Number: Expects a project and table combo eg. 'first_proj/users'
ts    Table Structure Statement: Expects a project and table combo eg. 'first_proj/users' and a valid number.
dt    Delete Table: Expects one or more project and table combo eg. 'first_proj/users'.


Table Data Commands:

bir   Begin Insert Row: This command creates a file that would be edited and passed into the 'ir' command.
      It expects a project and table combo eg. 'first_proj/users'

ir    Insert a row: Expects a project and table combo eg. 'first_proj/users' and a path containing a
      file generated from the 'bir' command.

bur   Begin Update Row: This command creates a file that would be edited and passed into the 'ur' command.
      It expects a project, table and id combo eg. 'first_proj/users/31'

ur    Update Row: Expects a project, table and id combo eg. 'first_proj/users/31' and a path containing a
      file generated from the 'bur' command.

dr    Delete Row: Expects one or more project, table and id combo eg. 'first_proj/users/31'

vr    View Row: Expects a project, table and id combo eg. 'first_proj/users/31'


Table Search Commands:
st    Search Table: Expects a project and a file containing the search statement.
arc   All Rows Count: Expects a project and table combo eg. 'first_proj/users'
rc    Count of rows found in a search. Expects a project and a file containing a search statement.


  
< Previous Next >