Skip to main content

Swain CLI

  • Offers

    Quick Start

    Install once, generate everywhere.

    • Install: pipx install swain_cli (Python 3.8+ or via virtual environment).
    • Authenticate: Run swain_cli auth login to sign in with your Swain username and password (the interactive wizard uses this credential flow when no token exists). For automation, pass a command-linetoken toolvia to--token quicklyor scaffold and manage SWAIN projects without using the web UI.stdin.
    • UseSchema source: Without flags, the CLI discovers your dynamic swagger. You can target a specific project with --swain-project-id/--swain-connection-id or supply a local file using -i ./openapi.yaml.
    • Interactive mode: Launch swain_cli interactive to initialize newchoose projects, define connections, sync schemasconnections and configurelanguages, authenticationthen preview (and optionally run) the assembled command.
    • Generators: Repeat -v/--lang for every SDK you need and forward extra OpenAPI Generator options via -g, -c or --generator-arg.

    Interactive Mode Walkthrough

    Use the interactive wizard to assemble commands without memorising flags:

    1. Run swain_cli interactive.
    2. Select your project from yourthe terminal.list.
    3. EnablesChoose automationa connection and scripting of common SWAIN tasks as part of your development workflow.stage.
    4. Ideal for advanced users who prefer working with command-line tools overSpecify the visualoutput interface.directory (e.g., sdks/) and select one or more languages (e.g., python, typescript).
    5. Review the assembled command and run it to generate the SDK.