Skip to main content

AWFL: AI Workflows CLI

Project description

AWFL CLI

License Python Status

AWFL CLI demo

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, logs, deploy).

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

  • Launch
    • From your project directory: awfl
    • On first run you’ll be prompted to sign in with your Google identity (device login flow). Tokens are cached locally.
  • Pick an agent
    • At the awfl prompt, type: workflows (or ls)
    • Use the tree selector to choose a workflow. Codebase‑oriented agents live under the “codebase” menu.
  • Ask for help
    • Type your request in natural language. The selected agent will respond and, when appropriate, issue tool calls (e.g., write files, run commands). The project leader terminal applies these side effects; all terminals display them.

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
    • auth login | whoami | auth logout
      • Start device login, show the authenticated user, and clear cached tokens.
    • dev start | dev status | dev stop | dev logs | dev generate-yamls | dev deploy-workflow
      • Developer helpers for local stack and workflow development. dev start can run the watcher, compose, and ngrok.
  • Configuration

    • API origin
    • Model
      • model gpt-5 sets the LLM model that the CLI injects into workflow payloads.
  • 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.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awfl-0.1.5.tar.gz (58.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

awfl-0.1.5-py3-none-any.whl (73.4 kB view details)

Uploaded Python 3

File details

Details for the file awfl-0.1.5.tar.gz.

File metadata

  • Download URL: awfl-0.1.5.tar.gz
  • Upload date:
  • Size: 58.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for awfl-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d7be857b768d615b4b16a0c9f86114f56984005e18ab2443c482e3851c5c029a
MD5 6a87d635d7432490dce7f486a8db1381
BLAKE2b-256 c6aec1950a8f667e88a5db20701397f022587cd23d3632db07bfe931190b63cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for awfl-0.1.5.tar.gz:

Publisher: python-publish.yml on awfl-us/cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file awfl-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: awfl-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 73.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for awfl-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3951c24582269888e5448fd0ad1f3a75976d8440c6adeb2318ae86c78d2544a7
MD5 b2123d1621c8d9ca31121ccc74cf19f1
BLAKE2b-256 ad054181467ffd8ae25dd295e8ef8749ec7eb1ee63765eed40482a7c7125aa4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for awfl-0.1.5-py3-none-any.whl:

Publisher: python-publish.yml on awfl-us/cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page