are.na-cli
v0.0.6
Published
are.na Command Line Interface
Downloads
8
Readme
are.na Command Line Interface
# Open the 3 most recent public channels in your browser:
$ arena channels -x3 -l | xargs openInstallation
Available from the npm registry. Requires Node.js to be installed.
$ npm i -g are.na-cli
# or:
$ yarn global add are.na-cliYou 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=abcdAdd 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:neworadd)channel <title>: A new channelchannels <...titles>: Shortcut tochannel -mblock <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: Fetchntems 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 --link
https://are.na/excellent-websites
$ arena channels -x5 -p2 -s title slug
Motion Graphics, motion-graphics-1512356954
Lancing Ray, lancing-ray
Celeste Tsai, celeste-tsai
character sketches, character-sketches
plt, plt
$ arena add blocks excellent-websites http://archive.org/ http://are.na/
3982834
3849379
$ arena search channels websites -x3
Websites, James Oates, websites--13
Websites, Ian Williams, websites-1506709551
Websites, Paul Gacon, websites--22
$ arena edit block 3258203
# ^ This will open $EDITOR/$VISUAL to edit the block