How to Make a Neural Network Test Mobile Apps for You
Every time I open someone else's pull request in a React Native project, I catch myself thinking: manually checking layouts on iOS and Android is a chore that makes you want to howl. You need to pull the branch, build the bundle, launch the emulator, click through the scenario, take screenshots, and write to the author that the button went off-screen.
The team at Callstack released the second version of the cali tool. It's a command-line utility that handles mobile testing, performance audits, and code reviews using LLM agents.
What's the project about
Web agents don't surprise anyone anymore: Playwright and Puppeteer have long been integrated with language models. With mobile, things have always been more complicated. Emulators are finicky, the React Native debugger lives in its own world, and hooking up a model without breaking the environment takes some doing.
Cali solves the problem through role separation. The utility doesn't try to be a universal chatbot that does everything. Instead, it has strict operating modes where each agent gets only the necessary tool pack:
cali qaruns test scenarios on a real simulator or emulator via theagent-deviceutility.cali perf-reviewfinds unnecessary re-renders and slowdowns by connecting directly toagent-react-devtools.cali reviewreads the repository and checks diffs in pull requests.cali devattempts to make code changes on its own under the supervision of tests and the type checker.
The review, perf-review, and dev commands are still marked as experimental, but the basic qa scenario is ready for use.
How to run testing on your local machine
You'll need Node.js and the globally installed agent-device package to get started. If the agent lacks necessary skills, Cali will pull them in via npx skills into the ~/.cali/skills directory.
You can control the launch with a single line:
cali qa \
--local ios \
--artifact ./artifacts/MyApp.app \
--prompt "проверь текст на экране онбординга и нажми кнопку далее"
If you have only one iOS simulator or Android emulator running, the utility will pick it up automatically. When launching on Android, Cali can even parse AndroidManifest.xml directly from .apk to extract the applicationId without extra flags.
Important detail: for debug builds, you need to start and stop the Metro server separately. Cali is only responsible for interacting with the app's interface.
Profiling and finding unnecessary re-renders
Perhaps the most interesting mode is perf-review. We all know how easy it is to tank performance in React Native by accidentally passing an unstable callback to a heavy list.
Cali connects an agent to React DevTools and runs the target screen:
cali perf-review \
--context ./cali-context.json \
--platform android \
--artifact ./artifacts/app.apk \
--prompt "проверь экран оформления заказа на подвисания"
The agent analyzes interactions, captures metrics, and generates a structured report. Results go into the artifacts/perf-review folder, which contains screenshots, a manifest, and a text summary with the main issues.
Shared context and working in CI
Instead of long chains of terminal arguments, Cali uses a configuration file cali-context.json. It describes the repository, build, acceptance criteria, and constraints for the agent:
{
"workspaceRoot": ".",
"repository": {
"provider": "github.com",
"owner": "my-team",
"name": "shop-app",
"defaultBranch": "main",
"currentBranch": "feature/checkout-redesign"
},
"mobile": {
"platform": "android",
"artifactPath": "./artifacts/app.apk"
},
"qa": {
"acceptanceCriteria": [
"На экране оплаты отображается итоговая сумма",
"Кнопка подтверждения остаётся кликабельной"
]
},
"dev": {
"allowedValidations": ["bun test", "bunx tsc --noEmit"],
"writePolicy": "workspace",
"pushPolicy": "disabled"
}
}
Command-line flags always take priority over the file. This is handy when you need to substitute a path to a fresh artifact in a pipeline.
In GitHub Actions and Expo Application Services (EAS), the utility detects the environment on its own. An additional helper cali export-ci generates a markdown report with screenshots that you can immediately post as a comment on an open pull request via GitHub CLI:
name: Запуск мобильного QA
env:
AI_GATEWAY_API_KEY: ${{ secrets.AI_GATEWAY_API_KEY }}
CALI_PLATFORM: android
CALI_ARTIFACT_PATH: ./builds/app.apk
run: npx cali qa --quiet
name: Подготовка отчёта
run: npx cali export-ci --report ./artifacts/qa/report.json
name: Публикация комментария в PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr comment "${{ github.event.pull_request.number }}" --body-file ./artifacts/qa/ci-comment.md
Connecting models and security
By default, Cali is configured to work with openai/gpt-5.4-mini through AI Gateway. If you have a direct Anthropic key, you can switch to Sonnet via environment variables:
ANTHROPIC_API_KEY=your-anthropic-api-key
QA_MODEL=anthropic/claude-sonnet-4.6
It's nice that the authors thought about security: the utility scrubs tokens and secrets from repository URLs when loading context, and the final report.json only saves safe fields.
Is it worth trying
The tool looks solid and solves a specific pain point for teams writing on Expo and React Native. The main advantage here is the strict input contract and predictable JSON output. The agent doesn't wander around in an abstract terminal but is limited to a clear set of utilities.
The project is still gaining traction (around a thousand stars on GitHub), but the role architecture already allows you to implement automated checking of critical user paths at the CI stage. If you're tired of manually running basic smoke tests before each release, it's worth cloning the repository and running through a couple of screens on a local simulator.
Powiązane projekty