New:Socket for Asana Is Now Available.Learn more
Get Started

@sonarapp/cli

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sonarapp/cli

Sonar — App Store Optimization from the command line

Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
213
26.04%
Maintainers
1
Weekly downloads
 
Created
Source

@sonarapp/cli

npm license

sonar — App Store Optimization from the command line.

Look up apps, research keywords, track rankings, and run competitor analysis on the App Store and Google Play, all from your terminal. Powered by Sonar.

Install

npm install -g @sonarapp/cli

Requires Node.js 20+.

Authenticate

Get an API key at trysonar.app/developers (requires a Sonar subscription — 7-day free trial available).

sonar auth login

This stores your key in ~/.config/sonar/config.json (mode 0600). Or set SONAR_API_KEY in your environment.

export SONAR_API_KEY=aso_...

Quick start

# Look up an app
sonar apps get <app-id> --table

# Research a keyword
sonar keywords search "meditation" --store ios --table

# Get autocomplete suggestions
sonar keywords suggestions "med" --store ios --table

# Track a keyword's ranking history
sonar rankings <app-id> --table

# Estimate monthly revenue
sonar revenue --store ios --id 1450772168 --table

# Export rankings to CSV
sonar export rankings <app-id> --format csv > rankings.csv

Add --table for human-readable tables. Default output is JSON, ready to pipe into jq, fx, or other tools.

Commands

sonar auth login                              Authenticate with your API key
sonar auth status                             Show authentication status
sonar auth logout                             Remove saved credentials

sonar apps list                               List your tracked apps
sonar apps get <id>                           Show app details

sonar keywords search <query>                 Keyword research (volume, difficulty)
sonar keywords list <app-id>                  Keywords your app ranks for
sonar keywords suggestions <seed>             Autocomplete suggestions

sonar rankings <app-id>                       Rank history for an app
sonar rankings keyword <keyword-id>           Apps ranking for a keyword

sonar competitors keywords <competitor-id>    Competitor keyword analysis

sonar revenue --store <ios|android> --id <id> Estimate monthly revenue

sonar export rankings <app-id>                Export rankings to CSV/JSON

Run sonar <command> --help for full options.

Global flags

--table                   Output as a formatted table instead of JSON
--verbose                 Show request timing and rate-limit info
--base-url <url>          Override the API base URL (for self-hosting / staging)

Environment variables

VariableDescription
SONAR_API_KEYYour Sonar API key. Overrides the value in config.json.
SONAR_API_URLAPI base URL. Default https://trysonar.app.
SONAR_CONFIG_PATHPath to the config file. Default ~/.config/sonar/config.json.

Companion: MCP server for AI agents

If you want Claude, Cursor, or Cline to drive Sonar directly, install @sonarapp/mcp.

License

MIT © Peter Sutarik

Keywords

aso

FAQs

Package last updated on 08 May 2026

Related posts