Using the CLI with the Agent

Install the Forvibe CLI, connect it to an Agent session with a one-time code, and let it analyze your project locally.

Updated 2026-04-21
5 min read

The Forvibe CLI is a small npm package that reads metadata from your local app project and uploads an analysis report to the web dashboard. Your source code is analyzed on your own machine using an AI API key you provide - it never leaves your computer.

Overview

  • Package: @forvibe/cli (run via npx, no install required)
  • Supported stacks: Swift, Flutter, React Native, Expo, Kotlin, Capacitor, .NET MAUI
  • Analyzes locally: tech stack, bundle ID, SDKs, branding, fonts, screenshots, source code summary
  • Requires one of: ANTHROPIC_API_KEY, OPENAI_API_KEY, or GEMINI_API_KEY in your environment
  • Uploads only the analysis report and declared assets - your source code is never uploaded

You need Node 18 or later and a valid AI API key exported in your shell. Anthropic is the recommended provider. Get a key at console.anthropic.com/settings/keys.

Step-by-step

1

Start an Agent session on the web

Go to the new project wizard and choose Agent mode, pick the stores you want to target (App Store, Play Store, or both), provide your store credentials, and click Generate Connection Code. The web UI shows a 6-character OTC (e.g. A7KXQ2) that is valid for 15 minutes.

2

Export an AI API key in your terminal

bash
# Pick one (Anthropic recommended)
export ANTHROPIC_API_KEY=sk-ant-...
# or
export OPENAI_API_KEY=sk-...
# or
export GEMINI_API_KEY=...
3

Run the CLI in your project root

bash
cd path/to/your-app
npx @forvibe/cli

The CLI detects your tech stack, then prompts: Enter your Forvibe connection code. Paste the OTC from the web UI.

4

Answer a few on-screen prompts

The CLI auto-detects most things and only asks about items it cannot infer: whether your app requires sign-in (for Apple Review test accounts), target audience, ads, financial features, health features. Press Enter to skip optional prompts.

5

Return to the web to drive phases

When the report is sent, the CLI prints Continue setup at: https://forvibe.app/console/agent/<sessionId>. Open that URL. The CLI is done - close the terminal if you want. From here the web UI drives every phase.

Session states

  • pending_cli - OTC generated, waiting for the CLI to connect
  • connected - CLI validated the OTC
  • report_received - analysis report uploaded, ready to start Phase 1
  • in_progress - a phase is currently running from the web UI
  • completed - all selected phases succeeded
  • failed - a phase errored; check the error message and retry from the web
  • expired - OTC was not redeemed within 15 minutes

What the CLI scans

  • Swift / iOS: Info.plist, entitlements, asset catalog icons, localized Strings
  • Kotlin / Android: AndroidManifest.xml, res/values/strings.xml, mipmap icons
  • React Native / Expo: app.json, app.config, native project files
  • Flutter: pubspec.yaml, ios and android subprojects
  • Capacitor: capacitor.config, native ios/android subprojects
  • Screenshots and feature graphics in common locations: fastlane/metadata, ios/screenshots, android/fastlane/metadata

Tips

  • Anthropic is the recommended provider - quality of the analysis report is best with Claude. OpenAI and Gemini work too.
  • Your API key is only used to analyze your own source code locally. The CLI does not send your code to Forvibe or anywhere else.
  • If you have multiple keys exported, the CLI asks which provider to use.
  • The CLI exits after submitting the report. You do not need to keep the terminal open while running phases.

Troubleshooting

  • No AI API key found - export ANTHROPIC_API_KEY (or OPENAI_API_KEY / GEMINI_API_KEY) in your shell before running the CLI.
  • Invalid code - OTCs expire after 15 minutes. Generate a new one from the new project wizard (Agent mode).
  • No supported project found - the CLI did not detect a supported stack in the current directory. Make sure you are in the project root (where Info.plist, build.gradle, package.json, pubspec.yaml, or .csproj lives).
  • Asset upload failed - check your internet connection and retry. Failed uploads do not charge credits.