Introduction Installation Projects Tables Inserts Searches Updates Deletes CLI Production Installation 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 command for the cli is flaarum.cli and viewing its help can be gotten by running the command flaarum.cli --help

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'.
        et    Empty Table: Expects one or more project and table combo eg. 'first_proj/users'.
        rt    Rename Table: Expects a project, old table name and the new table name.


      Table Data Commands:

        ir    Insert a row: Expects a project and table combo eg. 'first_proj/users' and a path containing a
              json representation of the data to be inserted into the mentioned table.

        ur    Update Row: Expects a project, table and id combo eg. 'first_proj/users/31' and a path containing a
              json representation of the data to be inserted into the mentioned table.

        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 >