Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fiatjaf/rel
command line tool for managing personal graphs of anything and writing them to dot
https://github.com/fiatjaf/rel
cli dot files graph graphviz local yaml
Last synced: 17 days ago
JSON representation
command line tool for managing personal graphs of anything and writing them to dot
- Host: GitHub
- URL: https://github.com/fiatjaf/rel
- Owner: fiatjaf
- License: mit
- Created: 2017-07-06T01:05:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-15T15:30:50.000Z (over 4 years ago)
- Last Synced: 2025-01-12T13:21:27.787Z (21 days ago)
- Topics: cli, dot, files, graph, graphviz, local, yaml
- Language: Go
- Size: 590 KB
- Stars: 57
- Watchers: 9
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rel
a command line utility to create and manage personal graphs, then write them to dot and make images with graphviz.
![](screencast.gif)
## install
Builds for all systems are available at https://gobuilder.me/github.com/fiatjaf/rel
or you can `go get github.com/fiatjaf/rel`
## how it works
`rel` is basically a file editor. On every run it will read all YAML files in the current directory and use data found on them to build an internal graph representation. When you tell it to add a node it will just create a new YAML file, when you tell it to add a relationship (relationships are called "links", by the way) it will just specify these relationships in the YAML files of the related nodes.
If you want to modify a file's name or add custom metadata, you can just edit the node file (just don't modify the ids). This means you can also save your graph to `git` or do anything else you can do with files.
## usage
* **rel add ** adds a node
* **rel print** shows a prompt with all node names available to tab/autocomplete, then outputs the selected node file contents.
* **rel edit** does the same as `rel print`, but opens an editor for you to directly edit the node file.
* **rel link [--neutral] ** opens a "from", then a "to" prompts from which you can search existing nodes or add new ones, then creates a relationship -> with the specified ``. `--neutral` means the relationship is not directed.
* **rel unlink** opens a prompt with all relationships available, so you can delete some.
* **rel [--json] nodes** lists all nodes sorted by name, `--json` makes it output a JSON array, useful for piping to [jq](https://stedolan.github.io/jq/manual/) and doing advanced filtering.
* **rel [--json] links** lists all relationships.
* **rel dot** outputs a [dot](http://www.graphviz.org/content/dot-language) representation of the graph.
* **rel template --template ** renders the given [Go template](https://golang.org/pkg/text/template/) with the data from the graph.## use cases
* family trees
* ?## this repository traffic statistics
[![](https://ght.trackingco.de/fiatjaf/rel)](https://ght.trackingco.de/)