are.na Command Line Interface
# Open the 3 most recent public channels in your browser: $ arena channels -x3 -l | xargs open
Installation
Available from the npm registry. Requires Node.js to be installed.
$ npm i -g are.na-cli # or: $ yarn global add are.na-cli
You may optionally specify an access token for read/write access or retrieving private resources. Set the environment variable ARENA_ACCESS_TOKEN
to your access token, as so:
$ export ARENA_ACCESS_TOKEN=abcd
Add the export
line to your .bash_profile
or .bashrc
to persist accross terminal sessions.
Commands:
get
: Fetch... (default command, run if no other is specified)channel <slug|id>
: A channelchannels
: List of public channelschannels <...slugs|ids>
: Multiple channelsblock <id>
: Block by ID
create
: Create... (aliases:new
oradd
)channel <title>
: A new channelchannels <...titles>
: Shortcut tochannel -m
block <channel-slug> <url|content>
: A new block. You can specify the URL, or contentblocks <channel-slug> <...urls|content>
: Shortcut toblock -m
delete
: Delete...channel <slug|id>
: A channelchannels <...slugs|ids>
: Multiple channels
search
: Search...channels [query]
: Channelsblocks [query]
: Blocksusers [query]
: Users
edit
: Edit using $VISUAL/$EDITOR...block <id>
: A blockblocks <...ids>
: Multiple blockschannel <slug|id>
: A channel (only title and status for now...)channels <...slugs|ids>
: Multiple channels (only title and status for now...)
Options:
-m, --multiple
: accept multiple arguments (quoted) and execute the command for each:arena create channel -m "Some Title" "Another One"
-s slug author title, --select=author date
: Takes an list, and will only output the specified fields from the results (defaults to "slug" on creation, "title author slug" on fetch). Available fields:title, author, date, slug, link
-l, --link
: Print only link[s]-j=string, --join="string"
: Join individual fields with "string" (default: ", ")-p n, --page=n
: Fetch page numbern
-x n, --per=n
: Fetchn
tems per page-S public, --status=private
: Status of new or retrieved channel[s]. One ofpublic
,closed
, orprivate
-J, --json
: Output JSON instead of the default textual format-P, --pretty
: Pretty print JSON-f, --file
: Read arguments from this file (use-
for stdin)-y, --yaml
: Edit blocks/channels with YAML (default is true, use-y=false
,--no-yaml
, etc. to disable)-D, --dry, --debug
: Don't make the requests, print them-v, --version
: Show version-h, --help
: Show help
Examples:
$ arena create channel Excellent Websites --linkhttps://are.na/excellent-websites $ arena channels -x5 -p2 -s title slugMotion Graphics, motion-graphics-1512356954Lancing Ray, lancing-rayCeleste Tsai, celeste-tsaicharacter sketches, character-sketchesplt, plt $ arena add blocks excellent-websites http://archive.org/ http://are.na/39828343849379 $ arena search channels websites -x3Websites, James Oates, websites--13Websites, Ian Williams, websites-1506709551Websites, Paul Gacon, websites--22 $ arena edit block 3258203# ^ This will open $EDITOR/$VISUAL to edit the block