Skip to main content

AWFL CLI

License Python Status

Website: https://awfl.us

AWFL CLI quickstart

A developer-friendly command line for working with AI-powered workflows and codebase-aware agents.

AWFL CLI lets you converse with agent workflows from your terminal, apply code changes safely via tool calls, and watch live progress and events. It is designed for day‑to‑day development in AWFL repositories and any project where agents need to read, write, and run within your workspace.

Table of contents

  • Overview
  • Features
  • Installation
  • Quick start
  • Demo
  • Usage
    • Essential commands
    • Configuration
    • Authentication
  • How it works (high level)
  • Troubleshooting
  • Development
  • Contributing
  • License
  • Links

Overview

  • AWFL is a local CLI that connects to an AI workflows service. You select a workflow (agent), chat in natural language, and the agent can execute side effects via tool calls such as writing files or running commands.
  • The CLI streams events using Server‑Sent Events (SSE) and ensures side effects are executed exactly once per project, even if you’ve opened multiple terminals.

Features

  • Talk to codebase‑aware agents from your terminal.
  • Apply tool calls safely: write files, run shell commands, and more.
  • Live event streaming with clear, deduplicated logs.
  • Project‑wide leader election to avoid duplicate side effects across terminals.
  • Flexible execution backends (API mode today; gcloud compatibility in progress).
  • Developer helpers for local workflow development (watcher, deploy, logs).

Installation

  • Prerequisites

    • Python 3.11+
    • Optional but recommended: pipx for isolated CLI installs
    • gcloud CLI if you plan to deploy or use gcloud execution modes
  • Install with pipx (recommended)

    • pipx install awfl
    • Verify: awfl --version
  • Install with pip (user environment)

    • pip install --user awfl
    • Ensure ~/.local/bin (or your platform’s user scripts dir) is on PATH.
  • Install from source (for development)

Quick start

The fastest path from install to first agent response.

    1. Install the CLI
    • pipx install awfl
    1. Launch and sign in
    • awfl
    • On first run you’ll be prompted to complete a Google Device Login. Tokens are cached under ~/.awfl.
    1. Choose an agent and ask for help
    • At the prompt:
      • workflows # open the selector
      • Pick: codebase-ProjectManager
      • Then type a request, for example: "Create a CONTRIBUTING.md and add an install badge to README"

Copy/paste one‑liner (uses default origin):

pipx install awfl && awfl

If your server isn’t at http://localhost:5050, run this once before launching:

awfl set api_origin https://your-server.example.com

Demo

  • Watch: See recording and export options in docs/DEMO.md.
  • Transcript (60 seconds)
    $ awfl
    … connecting to server, session initialized …
    
    awfl> workflows
    … select: codebase-ProjectManager …
    
    awfl> "Add a Demo section to README and a recording script"
    Agent: Planning changes…
    Agent: Applying tool calls
      • UPDATE_FILE: README.md
      • UPDATE_FILE: docs/DEMO.md
      • UPDATE_FILE: scripts/record_demo.sh
      • RUN_COMMAND: chmod +x scripts/record_demo.sh
    Agent: Done. Review changes in git.
    

Usage

  • Essential commands

    • workflows | ls
      • Open the interactive workflow selector and set the active agent for this session.
    • call [args...]
      • Invoke a specific workflow one‑off without changing the active agent.
    • model [name]
      • View or set the LLM model injected into workflow requests.
    • stop | cancel | abort
      • Cancel the currently active workflow execution.
    • status
      • Show execution mode, API origin, active workflow, and other runtime details.
    • set api_origin
      • Set the server origin, e.g., http://localhost:5050. Trailing /api is normalized.
    • auth login | whoami | auth logout
      • Start device login, show the authenticated user, and clear cached tokens.
    • dev start | dev status | dev stop | dev logs
      • Developer helpers for local stack and workflow development. dev start can run the watcher, compose, and ngrok.
    • dev generate-yamls
      • Regenerate workflow YAMLs (project‑specific; requires sbt).
    • dev deploy-workflow <yaml_path>
      • Deploy a single workflow via gcloud.
  • Configuration

    • API origin
      • set api_origin http://localhost:5050 sets the base URL. status shows the current value.
    • Model
      • model gpt-5 sets the LLM model that the CLI injects into workflow payloads.
    • Workspace project override (AWFL_PROJECT_ID)
      • Set AWFL_PROJECT_ID to force the workspace project without relying on git discovery.
      • Useful outside a git repo or when the git origin is missing.
      • Example:
        export AWFL_PROJECT_ID=my-project-id
        export SKIP_AUTH=1  # optional for trusted local development
        awfl
        
      • Expected startup log:
        • "Using AWFL_PROJECT_ID=my-project-id; skipping git discovery"
      • The SSE stream should connect for both project and session scopes. Verify with the status command, which echoes AWFL_PROJECT_ID.
  • Authentication

    • The CLI uses Google Device Login followed by Firebase sign‑in. Tokens are cached under ~/.awfl.
    • You can skip auth in trusted local development with an environment flag (see status).

How it works (high level)

  • Sessions
    • Session identity is resolved in order: ASSISTANT_WORKFLOW env (normalized) > selected active workflow (normalized) > local UUID fallback.
  • Event streaming and side effects
    • Each terminal streams SSE events for its current session. One terminal per project acquires a lightweight project leader lock and applies tool calls (file writes, shell commands). Other terminals only display events, avoiding duplicate side effects.
  • Workflow execution
    • The CLI posts to your server’s /api/workflows/execute, including the active model and session metadata. See AGENT.md for deeper internals.

Troubleshooting

  • Login loop or auth errors
    • Run auth login again and confirm the device flow. Check whoami afterwards.
  • No workflows listed
    • Ensure your server is running and API origin is correct. Use status to verify.
  • Side effects not applying in this terminal
    • Another terminal likely holds the project leader role. That’s expected. Close it if you want this terminal to take over.

Development

  • Repository layout

    • src/awfl: CLI sources (entry point, commands, consumers, response handling, utils)
    • src/awfl/cmds/dev: Developer helpers (watcher, deploy, logs)
  • Local setup

    • python -m venv .venv && source .venv/bin/activate
    • pip install -e .
  • Helpful commands

    • awfl dev status: Show environment, paths, watcher state
    • awfl dev start: Start ngrok/compose/watcher tasks as needed (returns to prompt)
    • awfl dev generate-yamls: Regenerate workflow YAMLs (project‑specific)
    • awfl dev deploy-workflow : Deploy a single workflow via gcloud
  • Notes

    • Prefer installing and running within a project‑local virtualenv to avoid path mismatches.
    • When spawning Python subprocesses, the CLI uses the current interpreter to keep environments consistent.

Contributing

  • Issues and feature requests are welcome: https://github.com/awfl-us/cli/issues
  • Pull requests
    • Fork the repo and create a feature branch.
    • Add or update tests where reasonable.
    • Keep changes focused and small; include a clear description and rationale.
    • Ensure linters/tests pass locally.
  • Code of Conduct
    • Be respectful and constructive. Harassment or discrimination are not tolerated.

License

  • MIT — see LICENSE for details.

Metadata

Release files for awfl 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for awfl 0.1.11
File Size Uploaded Provenance Actions
awfl-0.1.11.tar.gz 72.0 kB With provenance Details for awfl-0.1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for awfl 0.1.11
File Interpreter ABI Platform Actions
awfl-0.1.11-py3-none-any.whl Python 3 none any Details for awfl-0.1.11-py3-none-any.whl

Total release size: 160.4 kB

Release files / awfl-0.1.11.tar.gz

Download URL awfl-0.1.11.tar.gz
Size 72.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e658f877336e6a66ea3e5895a933915dad4e9e82b75b855f9398a57f2b8114a7
BLAKE2b-256 checksum
How to use checksums
b9f37edcd17445763e97b1c85fa42e4c0bb073229b734f7fa07b27bbc2c7c2d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2026.

Transparency log

Release files / awfl-0.1.11-py3-none-any.whl

Download URL awfl-0.1.11-py3-none-any.whl
Size 88.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33bae1aa75b510e6c20f0526de320b3c006344dbe777ee47f2ccf9d2b53db670
BLAKE2b-256 checksum
How to use checksums
60238bc9f49e22993212fcf27e7569dedf992621596e046e701574917a72538b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2026.

Transparency log

Security for awfl 0.1.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for awfl-0.1.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page