Skip to content

Cron-Routine-Orchestrator-Webapp/CROW-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Logo

Ask DeepWiki GitHub Issues or Pull Requests GitHub Issues or Pull Requests GitHub License GitHub Release

CROW-Client

CROW (Cron-Routine-Orchestrator-Webapp) is a distributed task execution and orchestration system. This repository contains the CROW-Client, a lightweight WebSocket-based agent that runs on client machines to execute tasks dispatched by the CROW-Server.

🎯 Overview

CROW-Client is a Python-based task execution agent that:

  • Runs as a WebSocket server on the client machine
  • Receives task execution requests from the CROW-Server
  • Executes tasks with proper error handling and status reporting
  • Provides real-time bidirectional communication via WebSockets
  • Handles concurrent task requests asynchronously

✨ Features

  • Async WebSocket Communication: Non-blocking WebSocket server for reliable task delivery
  • Task Execution: Flexible task parsing and execution framework
  • Error Handling: Comprehensive error handling with detailed status codes and messages
  • Lightweight: Minimal dependencies - only requires asyncio, pydantic, and websockets
  • Production-Ready: Type-safe request/response validation using Pydantic
  • Easy Integration: Simple CLI startup and configuration

πŸš€ Installation (Linux, macOS, Windows)

CROW Client can be installed with a single command on all major operating systems. The installer scripts are fetched directly from this repository and executed locally.

⚠️ Security Note

This executes a remote script from this repository. Only run it if you trust the source.


Linux / macOS (bash)

Linux

curl -fsSL https://raw.githubusercontent.com/Cron-Routine-Orchestrator-Webapp/CROW-Client/main/installer/install_linux.sh | bash

macOS:

curl -fsSL https://raw.githubusercontent.com/Cron-Routine-Orchestrator-Webapp/CROW-Client/main/installer/install_macos.sh | bash

Windows (PowerShell)

Run in PowerShell:

iwr https://raw.githubusercontent.com/Cron-Routine-Orchestrator-Webapp/CROW-Client/main/installer/install_windows.ps1 -UseBasicParsing | iex

What this does

Each installer will:

  • Fetch the latest release from GitHub
  • Download the correct platform ZIP asset
  • Extract the crow-client executable
  • Install it into a user-local directory
  • Register it for auto-start:
    • Linux: systemd --user
    • macOS: launchd
    • Windows: Startup folder shortcut
  • The client will start and listen on 0.0.0.0:1237 for incoming task requests from the CROW-Server.

File locations after install

  • Linux: ~/.local/share/crow-client
  • macOS: ~/Library/Application Support/crow-client
  • Windows: %APPDATA%\crow-client

Updating

Re-run the same command to update to the latest version. The installer will replace the existing installation with the newest release automatically.

πŸ—οΈ Architecture

CROW-Client Architecture:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      WebSocket Server (Port 5000)   β”‚
β”‚       Listens for task requests     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Request Parser & Validator     β”‚
β”‚    (Using Pydantic Models)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Task Executor                  β”‚
β”‚   Parses and executes commands      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Response Builder & Sender         β”‚
β”‚   Returns status + execution output β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‹ Requirements

  • Python: 3.10 or higher
  • Dependencies:
    • asyncio >= 4.0.0 - Asynchronous I/O support
    • pydantic >= 2.13.4 - Data validation and serialization
    • websockets >= 16.0 - WebSocket protocol implementation

πŸ“‚ Project Structure

src/client/
β”œβ”€β”€ __init__.py              # Package initialization
β”œβ”€β”€ __main__.py              # Entry point - starts WebSocket server
β”œβ”€β”€ communication/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── web_sockets.py       # WebSocket server implementation
β”œβ”€β”€ exec_handling/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── executor.py          # Task execution logic
└── helper/
    β”œβ”€β”€ __init__.py
    └── types.py             # Pydantic models (Request, Response)

πŸ”Œ Communication Protocol

Request Format

The client expects requests in JSON format matching the Request model:

  • PID: Process ID for tracking
  • ACTION_TYPE: Type of action to execute
  • [other fields]: Action-specific parameters

Response Format

Responses are sent back in JSON format with:

  • STATUS: "success" or "error"
  • CODE: HTTP-style status code (200, 500, etc.)
  • PID: Process ID from the request
  • ACTION_TYPE: The action that was executed
  • OUTPUT: Execution result or error message

πŸ“š Documentation

For detailed documentation and API reference, visit:

πŸ”— Related Projects

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details on:

  • How to submit issues
  • How to create pull requests
  • Code standards and best practices

πŸ“œ Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct.

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

πŸ“ž Support

If you encounter any issues or have questions:

  • Open an issue on GitHub
  • Check the documentation
  • Review existing discussions in the repository

About

This repository contains the CROW-Client, a lightweight WebSocket-based agent that runs on client machines to execute tasks dispatched by the CROW-Server.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors