@aredotna/cli
v0.8.1
Published
Are.na from the terminal
Readme
Are.na CLI
A command-line interface for Are.na.
Install
npm install -g @aredotna/cliRequires Node.js 20 or later.
Upgrade
npm update -g @aredotna/cliAuthentication
arena loginOpens your browser to authorize via OAuth. Your token is stored locally and used for subsequent requests.
arena logoutUsage
Running arena with no arguments opens an interactive session. Pass a command for direct access.
Quick Start
arena login
arena whoami
arena search "brutalist architecture" --type Image
arena channel worldmaking
arena add my-channel "Hello world"
arena upload photo.jpg --channel my-channelGetting Help
arena --helpshows a concise overview and common workflows.arena help <command>shows command-specific help.arena <command> --helpalso shows command-specific help.
Examples:
arena help search
arena channel --help
arena channel contents --helpGlobal Flags
| Flag | Description |
| --------- | ----------------------------------------------- |
| --json | Output as JSON (import --json streams NDJSON) |
| --quiet | Compact JSON output when supported |
| --yes | Bypass destructive confirmation prompts |
| --help | Show help |
Output & Errors
stdout:- Successful command output.
--jsonreturns JSON objects;import --jsonreturns NDJSON progress events.--quietonly changes JSON formatting (compact, single-line); it does not change response fields.
stderr:- Human-readable failures in non-interactive mode.
- Structured JSON errors in
--jsonmode.
- JSON error shape:
{"error": string, "code": number | null, "type": string, "hint"?: string}- Common
typevalues include:unknown_command,unknown_subcommand,json_not_supported, API-derived types likenot_found.
- Exit codes:
0success1client/usage errors and unknown command/subcommand2unauthorized (401)3not found (404)4validation/bad request (400,422)5rate limited (429)6forbidden (403)
Non-Interactive Behavior
- Interactive session mode only starts when both
stdinandstdoutare TTYs. - In non-interactive contexts (pipes/CI), output is deterministic and unknown commands fail fast with non-zero exits.
batchis JSON-only; use--json.- For stdin-driven automation (for example piping content into
add), use--json.
Command Reference
Examples are shown first, then options.
Authentication
login
Authenticate via OAuth.
Examples:
arena loginOptions:
--token <token>
whoami
Show current authenticated user.
Examples:
arena whoamiOptions:
- None
logout
Clear local auth token.
Examples:
arena logoutOptions:
- None
Search
search
Search across blocks, channels, users, and groups.
Examples:
arena search "brutalist architecture"
arena search "photography" --type Image
arena search "design" --scope my
arena search "*" --type Attachment --ext pdf
arena search "architecture" --sort created_at_desc
arena search "*" --sort random --seed 42
arena search "*" --channel-id 789Options:
--page <n>--per <n>--type <t>--scope <all|my|following>--sort <s>--ext <ext>--after <iso8601>--seed <n>--user-id <id>--group-id <id>--channel-id <id>
Channels
channel
View channel details.
Examples:
arena channel worldmakingOptions:
--page <n>--per <n>
channel contents
List channel contents.
Examples:
arena channel contents worldmaking
arena channel contents worldmaking --sort updated_at_desc --user-id 123Options:
--page <n>--per <n>--sort <s>--user-id <id>
channel create
Create a channel.
Examples:
arena channel create "My Research" --visibility private
arena channel create "Team Notes" --group-id 123Options:
--visibility <public|private|closed>--description <text>--group-id <id>
channel update
Update a channel.
Examples:
arena channel update my-research --title "New Title" --description "Updated"Options:
--title <text>--description <text>--visibility <public|private|closed>
channel delete
Delete a channel.
Examples:
arena channel delete my-researchOptions:
- None
channel connections
Show where a channel appears.
Examples:
arena channel connections worldmaking --sort connected_at_descOptions:
--page <n>--per <n>--sort <s>
channel followers
List channel followers.
Examples:
arena channel followers worldmaking --sort connected_at_descOptions:
--page <n>--per <n>--sort <s>
Blocks
block
View a block.
Examples:
arena block 12345Options:
- None
block update
Update block metadata/content.
Examples:
arena block update 12345 --title "New Title"Options:
--title <text>--description <text>--content <text>--alt-text <text>
block comments
List block comments.
Examples:
arena block comments 12345 --sort connected_at_descOptions:
--page <n>--per <n>--sort <s>
block connections
Show channels connected to a block.
Examples:
arena block connections 12345 --sort connected_at_desc --filter OWNOptions:
--page <n>--per <n>--sort <s>--filter <ALL|OWN|EXCLUDE_OWN>
add
Add text/URL content to a channel.
Examples:
arena add my-channel "Hello world"
arena add my-channel "Hello" --title "Greeting" --description "Pinned note"
arena add my-channel https://example.com --alt-text "Cover image" --insert-at 1
arena add my-channel https://example.com --original-source-url https://source.com --original-source-title "Original"
echo "piped text" | arena --json add my-channelOptions:
--title <text>--description <text>--alt-text <text>--original-source-url <url>--original-source-title <text>--insert-at <n>
upload
Upload local file content.
Examples:
arena upload photo.jpg --channel my-channel
arena upload photo.jpg --channel my-channel --title "Cover" --description "Homepage image"Options:
--channel <slug|id>(required)--title <text>--description <text>
batch
Create many blocks asynchronously.
batch is available in --json mode.
Examples:
arena batch my-channel "https://a.com" "https://b.com"
arena batch status 1234Options:
--title <text>--description <text>
import
Import local files in bulk.
Examples:
arena import my-channel --dir ./assets
arena import my-channel --dir ./assets --recursive
arena import my-channel --interactiveOptions:
--dir <path>--recursive--interactive--batch-size <n>--upload-concurrency <n>--poll-interval <ms>
Connections
connect
Connect a block/channel to a channel.
Examples:
arena connect 12345 my-channel
arena connect 12345 my-channel --type Channel --position 1Options:
--type <Block|Channel>--position <n>
connection
Inspect/delete/move connections.
Examples:
arena connection 67890
arena connection delete 67890
arena connection move 67890 --movement move_to_top
arena connection move 67890 --movement insert_at --position 1Options:
--movement <move_to_top|move_to_bottom|insert_at>(forconnection move)--position <n>(forconnection move)
Comments
comment
Create or delete comments.
Examples:
arena comment 12345 "Nice find"
arena comment delete 67890Options:
- None
Users & Groups
user
View users and relationships.
Examples:
arena user damon-zucconi
arena user contents damon-zucconi --type Image --sort updated_at_desc
arena user followers damon-zucconi --sort connected_at_desc
arena user following damon-zucconi --type User --sort connected_at_descOptions:
--page <n>--per <n>--type <t>--sort <s>
group
View groups and group activity.
Examples:
arena group are-na-team
arena group contents are-na-team --type Image --sort updated_at_desc
arena group followers are-na-team --sort connected_at_descOptions:
--page <n>--per <n>--type <t>--sort <s>
Other
ping
Check API health.
Examples:
arena pingOptions:
- None
Aliases
| Alias | Command |
| ----- | --------- |
| ch | channel |
| bl | block |
| me | whoami |
| s | search |
Development
git clone https://github.com/aredotna/cli.git
cd cli
npm install
cp .env.example .env # Configure API base URL
npm run dev # Run from source
npm run check # Typecheck + test + buildTesting
Tests use a file-based VCR to record and replay API responses.
npm test # Run tests (auto mode — records if no cassette)
ARENA_VCR_MODE=replay npm test # Strict replay (no network, used in CI)
rm .vcr/registry-test.json && npm test # Re-record cassettes