Publishly

Command line

How to use Publishly from the command line and CI

The command line runs the same engine as the website — in your terminal, a CI job, or an AI agent through the Model Context Protocol: Play checks on a build, every store image from a design file with fresh screenshots swapped in, and promo videos. It needs Node.js 20 or newer.

Step by step

  1. Run it

    npx @publishly/cli --help lists every command. Install it once with npm i -g @publishly/cli and the command is simply publishly. It exits 0 when all is well, 1 on an error or a blocker, 2 on a bad command.

  2. Check a build

    npx @publishly/cli check app-release.aab runs the Play checks. --out check.md writes Markdown, --sarif check.sarif writes SARIF for findings on pull requests, --fail-on blocker|warning|none sets what fails the job, and --versions looks library versions up on Google's Maven.

  3. Render the store images

    In the editor, File → Download project file saves the design as one .publishly file. npx @publishly/cli render MyApp.publishly --layout fastlane --screens app/build/outputs/roborazzi then draws every store image, with your screenshot tests' fresh screens swapped in.

  4. Make a video

    npx @publishly/cli video ./screenshots --template marquee makes a promo video from a folder of screenshots; --list shows the templates and --plan plan.json builds a video of several shots.

  5. Use it from an AI agent

    npx @publishly/cli mcp serves the tools over the Model Context Protocol — check_app, render_project, render_video and more. claude mcp add publishly -- npx @publishly/cli mcp adds it to Claude Code.

  6. Use it in Android Studio

    Gemini in Android Studio's agent mode only connects to MCP servers at a URL, so run npx @publishly/cli mcp --http. It prints a block to paste into Settings → Tools → AI → MCP Servers (turn on Enable MCP Servers) and keeps running; type /mcp in the Gemini chat to see the tools, then ask it to check your bundle or render your design. Android Studio connects only when it starts, so rather than keep a terminal open, run npx @publishly/cli mcp --install once in your project's folder: the server then starts at login and keeps running (macOS and Linux).

In GitHub Actions

One step: uses: Trilokia/publishly@v1, with file: set to your build and upload-sarif: true, puts the report in the job summary and the findings on the pull request.

Your emulators from the website

npx @publishly/cli connect lets the hosted website use this computer's emulators and phones for recording and the design review.

Questions

Is it the same as the website?

Yes: the same checks and the same renderer. render and video open the site's renderer in Chrome on your computer, so the images match the editor's.

Does it upload my build?

No. check reads the build on your machine; only --versions looks library names up on Google's Maven.

What do I need installed?

Node.js 20 or newer; render and video also need Chrome or Chromium (or --browser with its path).

Android Studio says “Connection refused”

The server wasn't running when Android Studio started, and Studio doesn't try again. Start it with npx @publishly/cli mcp --http, or npx @publishly/cli mcp --install to have it start at login from now on, then untick and tick Enable MCP Servers in Settings → Tools → AI → MCP Servers once.

Can anything else reach the Android Studio server?

It listens on 127.0.0.1 only and refuses requests from other websites' pages. --token s3cret makes every request carry a secret too; the printed block includes it.

Other guides

Last checked against the app on 2026-10-20.