Zero-install CLI for the MIRA research API. Enqueues a research job, polls until it completes, and prints the result.
No install needed:
npx @mira/cli research "<query>"Or install globally:
npm install -g @mira/cli
mira research "<query>"mira research "<query>" [options]
Options:
--depth quick | deep Research depth (default: quick)
--sources <csv> Comma-separated source list (default: all)
--help Show help
Examples:
mira research "CRM pain points for small teams"
mira research "Notion alternatives" --depth deep
mira research "invoicing frustrations" --sources reddit,hackernews
mira research "B2B SaaS pricing anxiety" --depth deep --sources reddit
What it does:
POST /api/v1/research— enqueues the job and prints the job ID- Polls
GET /api/v1/research/:jobIdevery 2 seconds (dots printed to show progress) - Prints the full
ResearchResultJSON when the job completes (or exits 1 on failure) - Times out after 5 minutes
Sample session:
$ mira research "indie founders switching from Stripe" --depth quick
Queuing research: "indie founders switching from Stripe" (depth: quick)
Job queued: clxyz123abc
Waiting..........
--- Result ---
{
"query": "indie founders switching from Stripe",
"summary": "Founders cite dispute resolution and webhook reliability as...",
"painPoints": [...],
...
}
By default the CLI talks to http://localhost:3000. Override with:
MIRA_API_URL=https://your-mira-instance.example.com mira research "..."Or export it in your shell profile:
export MIRA_API_URL=https://your-mira-instance.example.com--depth |
What changes |
|---|---|
quick (default) |
25 Reddit posts/subreddit, 20 HN stories |
deep |
50 Reddit posts/subreddit, 40 HN stories |
Comma-separated list of source slugs. Built-in sources: reddit, hackernews, news.
mira research "query" --sources reddit
mira research "query" --sources hackernews,newsThe CLI requires a running MIRA API. Spin one up locally in under 2 minutes:
git clone https://github.com/mira-js/mira-api-core.git
cd mira-core && cp .env.example .env
# set OPENAI_API_KEY in .env
docker compose upThen use the CLI from anywhere.