Skip to content
Balajivarma28092006Public

About

A simple terminal mapping tool that stores the maps and renders cool UML like flows in your terminal

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

goMapper

goMapper is a terminal-based mind map editor written in Go with tcell. It lets you create draggable text nodes, connect them with routed lines, pan around a larger canvas, and save maps as JSON files.

Features

  • Create, move, resize, edit, and delete nodes in a terminal UI
  • Add titles and multi-line body text to each node
  • Connect nodes with directional terminal-drawn links
  • Pan around the canvas with keyboard controls
  • Save and load named maps from the maps/ directory
  • Store maps as readable JSON

Requirements

  • Go 1.25.6 or newer
  • A terminal with mouse support

Getting Started

Clone the project, then run it from the repository root:

go run .

By default, goMapper opens maps/default.json. To open a different named map:

go run . map2

Named maps are resolved to JSON files inside maps/, so map2 becomes maps/map2.json. You can also pass a direct JSON path:

go run . maps/my-map.json

To build an executable:

go build

Controls

Control Action
Mouse move Move the cursor target
Left mouse drag Drag a node
Arrow keys Pan the camera
n Create a node at the mouse position
t Edit the node title under the mouse
e Edit the node body under the mouse
c Start or finish connecting two nodes
d Delete the node under the mouse, or the selected node
+ / = Increase selected node size
- Decrease selected node size
f Fit the camera to the map content
s Save the current map
S Save as a named map
l / o Open a named map
L Reload the current map
m List saved maps
h / H Show the help/status line
q Quit

Editing Text

When editing a title, body, or map name:

Control Action
Enter Confirm
Esc Cancel
Backspace / Delete Remove text
Left / Right Move the input cursor
Home / End Jump to the start or end

Body text uses | as a line separator. For example:

First point | Second point | Third point

Map Files

Maps are saved as JSON with this structure:

{
  "rects": [
    {
      "ID": 1,
      "X": 30,
      "Y": 13,
      "W": 18,
      "H": 5,
      "Title": "Idea",
      "Body": ["A note"]
    }
  ],
  "connections": [
    {
      "From": 1,
      "To": 2
    }
  ],
  "camX": 0,
  "camY": 0,
  "nextID": 3
}

Named maps are stored in maps/<name>.json. The app creates the directory when saving if it does not already exist.

Project Layout

.
├── main.go          # Event loop, input handling, and app startup
├── canvas.go        # Canvas state and node operations
├── draw.go          # Terminal rendering for nodes, links, and status input
├── rect.go          # Node geometry and sizing helpers
├── connection.go    # Connection data model
├── persistence.go   # JSON save/load support
├── mapfiles.go      # Named map path resolution and listing
└── maps/            # Saved map JSON files

Notes

  • The app relies on mouse events, so run it in a terminal that supports mouse input.
  • Saved maps are plain JSON and can be edited manually if needed.
  • Connections are cleaned up automatically when a node is deleted or when a map is loaded with invalid links.

About

A simple terminal mapping tool that stores the maps and renders cool UML like flows in your terminal

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages