AppVA CLI Guide

This document describes the AppVA command-line interface (CLI) and how it orchestrates the end-to-end workflow from raw test classes to runtime-ready artifacts for the AppVA server.

The CLI lives in cli/main.py and is exposed as the appva command when you install the package.


Installation

From the project root:

pip install .
# or
pipx install .

Once installed:

appva --help

Configuration

AppVA reads configuration from environment variables (optionally via a .env file). Copy .env.example to .env and fill in your values:

The CLI option --workspace-root always takes precedence over AVA_GEN_WORKSPACE_ROOT.


Overview

High-level pipeline (per app):

Step Command Purpose Key outputs
1 appva prepare <app_id> ... Copy raw test classes / app intro into the workspace. workspace/<app_id>/input/
2 appva extract <app_id> Parse Espresso tests into per-test Java methods. workspace/<app_id>/extracted_tests/
3 appva generate-va <app_id> Convert extracted tests into VA methods. workspace/<app_id>/va_methods/
4 appva build-skills <app_id> Build skill/context descriptions from VA methods. workspace/skills_description/<app_id>_skills_description.json
5 appva build-intents Aggregate intents and intent→method mapping (all apps). workspace/intent/intent_list_full.json, workspace/intent/intent_method_map.json
6 appva actionplan <app_id> Build ActionPlans from VA methods for the given app. workspace/actionplan/<app_id>_actionplan.json
7 appva pipeline <app_id> Convenience command that runs steps 2–6 for one app. All of the above for <app_id>

The VA runtime server is started separately, for example:

uvicorn runtime.api.server:app --reload

All commands accept an optional --workspace-root argument (default: workspace).


Global options

appva <command> [options]
appva --workspace-root <PATH> <command> [options]

Important

--workspace-root is a global option. It must appear before the subcommand name (prepare, extract, pipeline, etc.), not after the app_id.


1. prepare – copy files into workspace input

Prepare the workspace for a specific app by copying a single file into the app's input/ folder. You can call this multiple times (for test classes and an optional app introduction text).

Usage

appva prepare <app_id> path/to/file

Behavior

Call this once for your test class, e.g.:

appva prepare com.example.myapp path/to/MyAppTest.java

And optionally once for your app introduction:

appva prepare com.example.myapp path/to/app_introduction.txt

Example output

[AppVA] Preparing workspace for app_id=hu.vmiklos.plees_tracker
[AppVA] ➕ Copying file: tests/PleesTrackerTests.java → workspace/hu.vmiklos.plees_tracker/input/PleesTrackerTests.java
[AppVA] Workspace input updated

2. extract – extract test methods

Run the Espresso test parser and populate extracted_tests/ for the app.

Usage

appva extract <app_id>

Behavior

Example output

[AppVA] Parsing test scripts for app_id=hu.vmiklos.plees_tracker...
[AppVA] ✓ 12 test methods extracted → workspace/hu.vmiklos.plees_tracker/extracted_tests/

Note

Internally, process_app_workspace also populates va_methods/, but this command focuses on reporting the extracted tests.


3. generate-va – generate VA methods

Generate VA methods from the extracted tests for a specific app.

Usage

appva generate-va <app_id>

Behavior

Example output

[AppVA] Generating VA methods for app_id=hu.vmiklos.plees_tracker...
[AppVA] ✓ 5 VA methods created → workspace/hu.vmiklos.plees_tracker/va_methods/

4. build-skills – build skills_description JSON

Build skill/context descriptions for a specific app using the skill interpreter.

Usage

appva build-skills <app_id>

Behavior

workspace/skills_description/<app_id>_skills_description.json

Example output

[AppVA] Building JSON skill descriptions for app_id=hu.vmiklos.plees_tracker...
[AppVA] ✓ workspace/skills_description/hu.vmiklos.plees_tracker_skills_description.json written

5. build-intents – build global intent artifacts

Build the global intent list and intent→method map used by the runtime intent validator.

Usage

appva build-intents

Behavior

Example output

[AppVA] Building global intent list and intent→method map...
[AppVA] ✓ workspace/intent/intent_list_full.json written
[AppVA] ✓ workspace/intent/intent_method_map.json written

6. actionplan – build ActionPlans for one app

Build ActionPlans for a specific app based on its generated VA methods.

Usage

appva actionplan <app_id>

Behavior

Example output

[AppVA] Building ActionPlans for app_id=hu.vmiklos.plees_tracker...
[AppVA] Action plans written to: workspace/actionplan/hu.vmiklos.plees_tracker_actionplan.json

7. pipeline – run the full chain for one app

Run the main pipeline steps (2–6) for a single app in one command.

Usage

appva pipeline <app_id> [--skip-intents]

Behavior

Example output

[AppVA] Running full pipeline for app_id=hu.vmiklos.plees_tracker
[AppVA] Parsing test scripts...
[AppVA] 12 test methods extracted

[AppVA] Generating VA methods...
[AppVA] 5 VA methods created

[AppVA] Building JSON skill descriptions...
[AppVA] workspace/skills_description/hu.vmiklos.plees_tracker_skills_description.json written

[AppVA] Building global intent artifacts...
[AppVA] workspace/intent/intent_list_full.json written
[AppVA] workspace/intent/intent_method_map.json written

[AppVA] Building ActionPlans...
[AppVA] Action plans written to: workspace/actionplan/hu.vmiklos.plees_tracker_actionplan.json

[AppVA] All artifacts ready for runtime
[AppVA] Next step: start the VA runtime server
[AppVA]     uvicorn runtime.api.server:app --reload

If --skip-intents is used:

[AppVA] Building global intent artifacts... (skipped)

7. Starting the runtime server

After running the CLI pipeline (either via individual commands or pipeline), the VA-Gen runtime server can be started separately:

uvicorn runtime.api.server:app --reload

The server will then use:

You can interact with the server using tools like Postman or your Android client.