The Grid is a command line social network that is fast, modular, and simple.
To install:
gem install gridcli
To create account (writes username/auth token to ~/.grid/config):
grid signup <username>
To show your profile:
grid profile
To update your profile:
grid profile [--github-user <username>] [--name <name>] [--avatar <avatar text file>]
If you want a profile pic, use a program like jp2a to convert a jpeg image to ascii format first.
To show someone else’s profile, whether the user is a friend or not:
grid profile <username>
To add a friend:
grid befriend <username> [--message|-m <message>]
To list your friends:
grid friends
To list the friends of a friend:
grid friends <username>
To send a message to a list of users (recipients must be friends):
grid message <username>[,<username>,...] [-s <subject>] [-b <body>] [-f <body file>]
If you don’t give a -b/-f option, an editor will open allowing you to type your message.
To send a status update, like, or dislike to your friends:
grid status <status message> grid like <like message> grid dislike <dislike message>
To update all messages / likes / dislikes / etc, run:
grid update
You can search any type (or all types) for something.
grid search <like|dislike|message|status|all> "ruby gem" [<when>]
The <when> parameter is free form text and can be a range (“x to y”). For instance:
grid search like "chronic" today grid search like "chronic" yesterday grid search message "chronic" "two weeks ago to today" grid search all "the grid" "1 month ago to last week"
You can see your messages in your ~/.grid directory. For instance, if you want to search all likes using grep:
grep -RiI ~/.grid/like "grid"
You can list any type (or all types) of posts.
grid list <like|dislike|message|status|all> [<when>]
The <when> parameter is free form text and can be a range (“x to y”). For instance:
grid list like today grid list like yesterday grid list message "two weeks ago to today" grid list all "1 month ago to last week"
To block another user:
grid block <user>
This will “unfriend” them and they will no longer see your posts.
Subgrids are groups that you manage and are defined in a local config file.
To create a subgrid, use:
grid subgrid @mygroup bob,john,snakeplisskin
To see what subgrids exist:
grid subgrid
To see what users are in a particular subgrid:
grid subgrid @mygroup
You can then use the group as though it were a user. For instance, to send a message to @mygroup:
grid message @mygroup -s "hey guys" -b "Let's go make a rum ham."
If you prefer to simply edit the config file, you can do so (the file is located at ~/.grid/subgrids).
It’s possible to create command aliases much like aliases in .gitconfig. For instance, if you add a section to your ~/.grid/config file:
... alias: recent: list all "yesterday to now"
Then you can now run:
grid recent
Which is the equivalent of running:
grid list all "yesterday to now"
Plugins are easy to create and can register hooks. To install/uninstall a plugin, use:
grid plugin install <name> grid plugin uninstall <name>
To see a list of installed plugins:
grid plugin
An example plugin is the echo plugin:
grid plugin install echo
This command will install the gem “grid-plugin-echo” and load it each time the gridcli gem is loaded. It uses the available hooks:
-
before_post_creation(post_hash)
-
before_signup(username)
-
before_update
-
after_update
and prints out a message whenever a user signs up, a post is created, or the update command is called. You can see the code for the echo module at github.com/bmuller/grid-plugin-echo.