apcore-cli

Turn apcore modules
into CLI commands.

Run a registered capability from a terminal or script. apcore-cli derives arguments from the module schema and passes the invocation to apcore.

From module schema to command
Extensions directoryRegistered module definitions and input schemas
apcore-cliModule IDs become subcommands and inputs become flags
Terminal or scriptInspect the command, supply inputs, and read its result
  • Discover available commands

    List modules and inspect descriptions, schemas, or annotations through the apcli command group.

  • Pass typed input

    Generate flags from the input schema or supply JSON via stdin for scripts and pipelines.

  • Use the execution pipeline

    Calls enter apcore for validation and use the ACL or approval policy configured for the CLI.

Inspect and run a module

This Python CLI example assumes ./extensions contains the math.add module. If you have a different module, use the ID and arguments from apcli describe.

Open the quickstart guide
  1. Install the CLI

    Install it in the Python environment with access to your modules.

    Shell
    python -m pip install apcore-cli
  2. Find and inspect math.add

    Point the CLI at your extensions directory and inspect the module’s input schema.

    Shell
    export APCORE_EXTENSIONS_ROOT=./extensions
    apcore-cli apcli list
    apcore-cli apcli describe math.add
  3. Run the command

    Pass two numbers as schema-derived flags and check the JSON result.

    Shell
    apcore-cli math add --a 5 --b 10
    Example result
    {"sum":15}

Documentation

Browse all docs

Detailed capabilities and configuration

Choose a topic

Convention-Based Routing

Map module IDs to CLI commands