Wry for App.net

Wry is a command-line App.net tool for Mac OS X 10.7+.

With Wry, you can interact with your stream, send posts, follow users, et al — all through the power of the command line.

If you're using homebrew (and you really should be), you can install Wry with:

$ brew install wry

Alternatively, you can download the latest version using the Download button below and unzip to somewhere on your path, such as /usr/local/bin. You can also get the code from Github using the View on Github button below and compile it yourself.

View on Github Download Wry 1.7.2

Important Notes

If you're upgrading from versions before Wry 1.3, you must reauthorize using wry authorize. Version 1.3 adds file access (upload, download, ls), and previous versions of Wry didn't request access to your files.

Also, if you're seeing "Call requires authentication: Invalid token." see the FAQ.

Why Wry?

Wry probably won't be your only App.net client, or even your main one, unless you live in tmux and terminal Vim. Most of your App.net interaction will likely happen in a GUI client. You may find yourself using Wry, however, to quickly create a post, find a user, or search a hashtag.

Wry's potential, however, lies in scripts or plugins. With Wry, you can create a cron job to create posts from a file. You can create a Vim plugin or Alfred workflow. You can create a monitoring job that sends you a text anytime someone mentions your company in a hashtag. Ruby, Perl, Python, whatever your scripting language — you can talk to App.net through Wry.

Features

Wry follows a Git-like approach to its interface: you type wry plus the command you wish to run. The commands are intuitive, and arcane flags are usually unnecessary. For example, to authorize wry with App.net, type:

$ wry authorize

You must authorize Wry before using most of its functions. When you type wry authorize, Wry opens a browser to the App.net site so you can sign in. Your browser then shows you an authorization code that you paste back in to the terminal window running Wry. Wry stores this code in your Keychain so you don't have to sign in each time you use Wry.

As of version 1.4, Wry supports multiple users using the -u, --user option. To authorize an additional user, for example, make sure you're logged out of any alpha.app.net web sessions and type:

$ wry authorize

This time, log in as that other user. You can then pass -u otheruser to any Wry command to run it as otheruser. Omitting the -u option will run as the default user — the one with the asterisk beside it when you run wry users.

To retrieve your stream, type:

$ wry stream

To retrieve the global stream, type:

$ wry global

To post something, type:

$ wry post "Hey! I'm trying out Wry and I love it!"

Sometimes, a single command can't sufficiently convey your intentions. You must supply some additional information. To reply to a post, for example, you must specify the post you wish to reply to by its ID, and then the text of your reply. To reply to the post that has the ID 1234, type:

$ wry reply 1234 "Hey--me, too! I love Wry, too!"

When you're trying to specify a user, you can use either their user ID or their @username. To view information about me, for example, you can type:

$ wry user 258

Or you can type:

$ wry user @hoop33

Wry has built-in help, so type:

$ wry help

to get a list of Wry commands and a summary of what they do. To get deeper help on a particular command, pass that command's name to the help command. To get help on the user command, for example, type:

$ wry help user

Note that your shell's rules for parsing command line arguments are unavoidably in effect, so you may have to escape or avoid using some characters in your posts. Wry helps a little here — if you don't enclose your post text in quotes, for example, Wry reassembles the words into a single parameter. These two commands, for example, work the same:

$ wry post "This is a new post"
$ wry post This is a new post

Be a little wary of semicolons, exclamation points, or any other characters that your shell may consume instead of passing to Wry.

FAQ

Wry says it's authorized, but I get "Call requires authentication: Invalid token."

My fault. To fix, type:

$ wry users delete default
$ wry users default [your username]

Substitute your username for [your username], of course. Then, check that there's an asterisk next to your username when you type wry users:

$ wry users
*hoop33

About

Wry is written in Objective-C and released under The MIT License.

My name is Rob Warner.

Follow me on App.net at @hoop33.

Follow me on Twitter at @hoop33.

Read my blog at http://grailbox.com.