mongotui

command module
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

README

MongoTUI - MongoDB TUI client

CI Build codecov Go Report Card

Screenshot

MongoDB TUI client written in Go, using the tview library for UI, Keyring for storing connections and the MongoDB Go Driver.

The unit tests are using Testify.

MongoTUI allows to connect to multiple MongoDB instances and execute commands in JSON syntax on them.

Features

  • Tree view of the connected instance, its databases and collections
  • Command execution
  • Result tree view

Installation

Just download a release and copy the mongotui binary to your favorite destination.

Instruction manual

To start MongoTUI just run mongotui without arguments.

You can run mongotui with the -c argument specifying a MongoDB connection URI to directly connect to a database, for example:

mongotui -c mongodb://localhost

Press <Ctrl>-<c> to connect to a MongoDB instance, you can enter the connection parameters individually or the connection URI as well. Note that the connection URI always wins, if the individual fields and the connection URI are filled.

If you just send an empty form, the mongoTUI tries to connect to localhost by default.

The open database connections, accessed by <Ctrl>-<d>, their databases and collections are displayed as a tree view in the left application panel. You can navigate through the nodes with the arrow keys or left-click on them.

The command editor is accessible by <Ctrl>-<e>. The commands are fired on the database which are selected in the tree view by pressing <Enter> or <Return> in the command editor.

For a reference of the usable commands see the official MongoDB database commands documentation.

Note that the command has to be valid json, which means that property names and strings must be quoted, for example:

{"create":"foobar"}

The command result is shown in the result panel as a tree view. You can access it with <Ctrl>-<r> and navigate through the nodes with the arrow keys.

<Ctrl>-<u> opens the use database dialog which prompts for the database name. If the database does not exist, it is created as knwon from the MongoDB use <db> command.

<Ctrl>-<x> opens the drop database dialog and drops the database selected in the database tree view.

<Ctrl>-<t> disconnects (terminates) the selected connection.

<Ctrl>-<q> disconnects the open connections and quits the application.

Documentation

Overview

MongoTUI is a MongoDb TUI client which allows to connect to multiple MongoDB instances.

Usage of mongotui:
  -c string
        MongoDB Connection URI to connect directly after the application start

Press <Ctrl>-<c> to connect to a MongoDB instance, you can enter the connection parameters individually or the connection URI as well. Notice that the connection URI always wins, if the individual fields and the connection URI are filled.

The open database connections, accessed by <Ctrl>-<d>, their databases and collections are displayed as a tree view in the left application panel. You can navigate through the nodes with the arrow keys or left-click on them.

The command editor is accessible by <Ctrl>-<e>. The commands are fired on the database which are selected in the tree view by pressing <Enter> or <Return> in the command editor.

The command result is shown in the result panel as a tree view. You can access it with <Ctrl>-<r> and navigate through the nodes with the arrow keys.

<Ctrl>-<t> disconnects (terminates) the selected connection.

<Ctrl>-<q> disconnects the open connections and quits the application.

Directories

Path Synopsis
cmd
seed
main.go
main.go
result.go
result.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL