### Install ClawFlows via Bash Script Source: https://github.com/nikilster/clawflows/blob/main/README.md This script downloads and installs ClawFlows directly onto your system. It's a straightforward method for getting started quickly. ```bash curl -fsSL https://raw.githubusercontent.com/nikilster/clawflows/main/system/install.sh \ | bash ``` -------------------------------- ### YAML Frontmatter Examples Source: https://github.com/nikilster/clawflows/blob/main/docs/creating-workflows.md Examples of how to define author and description fields in YAML frontmatter for Clawflows. ```yaml author: nikilster # GitHub only author: @nikil # X only author: nikilster @nikil # Both description: Bedtime automation — turns off all lights, thermostats, and music, then turns on the bedroom fan. ``` -------------------------------- ### Install ClawFlows via Agent Source: https://context7.com/nikilster/clawflows/llms.txt Installs ClawFlows by sending a specific Markdown file URL to an OpenClaw agent. This method leverages the agent's capabilities to perform the installation. ```text Install https://raw.githubusercontent.com/nikilster/clawflows/main/system/AGENT.md ``` -------------------------------- ### Bash Scripting for Workflow Configuration Source: https://github.com/nikilster/clawflows/blob/main/docs/creating-workflows.md Example of a configuration file (config.env) and how to source it within a Markdown workflow for dynamic settings. ```bash # config.env EMAIL=user@example.com SLACK_CHANNEL=#general ``` ```markdown ## 1. Load Config Source the config file: ```bash source config.env ``` ``` -------------------------------- ### Install ClawFlows CLI Source: https://context7.com/nikilster/clawflows/llms.txt Installs the ClawFlows CLI tool using a curl script. This process clones the repository, creates a symlink for the CLI, sets up a scheduler cron job, and syncs workflow information. ```bash curl -fsSL https://raw.githubusercontent.com/nikilster/clawflows/main/system/install.sh | bash ``` -------------------------------- ### Markdown Workflow Structure Example Source: https://github.com/nikilster/clawflows/blob/main/docs/creating-workflows.md An example of a Markdown file structure for defining workflow steps, including fetching data and processing results. ```markdown ## 1. Fetch Data Pull recent data: ```bash some-command --flag ``` ## 2. Process Results For each result, do X... ## After Running Report what you found. ``` -------------------------------- ### Clawflows CLI Quick Start Source: https://github.com/nikilster/clawflows/blob/main/CONTRIBUTING.md Basic commands to create, test, and submit a workflow using the Clawflows command-line interface. This is the recommended method for contributing. ```bash clawflows create clawflows run your-workflow-name clawflows submit your-workflow-name ``` -------------------------------- ### YAML Schedule Field Examples Source: https://github.com/nikilster/clawflows/blob/main/docs/creating-workflows.md Examples demonstrating the usage of the schedule field in YAML frontmatter for setting workflow execution times. ```yaml schedule: "7am" # Once daily schedule: "9am, 1pm, 5pm" # Three times daily schedule: "8am, 6pm" # Twice daily ``` -------------------------------- ### POST /external/time/start Source: https://github.com/nikilster/clawflows/blob/main/workflows/custom/track-time/WORKFLOW.md Starts a new timer for a specific activity. This endpoint automatically stops any currently active timer. ```APIDOC ## POST /external/time/start ### Description Starts a new timer for a specific activity. This action will automatically stop any existing active timer. ### Method POST ### Endpoint https://health-visualization.vercel.app/external/time/start ### Parameters #### Request Body - **category** (string) - Required - The category of the activity (Health, Family, Life Goals, Friends, Work, Other) - **title** (string) - Required - The name or description of the activity ### Request Example { "category": "Work", "title": "Coding session" } ### Response #### Success Response (200) - **message** (string) - Confirmation message including start time #### Response Example { "status": "success", "message": "Tracking Coding session starting now (10:00 AM)" } ``` -------------------------------- ### WORKFLOW.md Structure and Example Source: https://github.com/nikilster/clawflows/blob/main/docs/creating-workflows.md Defines the format for a WORKFLOW.md file, which includes YAML frontmatter for metadata like name, emoji, description, and schedule, followed by Markdown content detailing the workflow's purpose and steps. This is the core file for any workflow. ```yaml --- name: send-morning-briefing emoji: "☀️" description: Daily morning briefing — gathers weather, calendar, priorities, and news into one summary. author: nikilster @nikil schedule: "7am" --- # Morning Briefing ## What It Does 1. Check today's calendar 2. Get weather forecast 3. Summarize priorities 4. Deliver briefing ## After Running Send the briefing to the user's preferred channel. ``` -------------------------------- ### Verify OpenClaw Version Source: https://github.com/nikilster/clawflows/blob/main/community-submissions/update-openclaw/WORKFLOW.md Checks the currently installed version of the OpenClaw software. This is the initial step to establish the baseline before checking for updates. ```bash openclaw --version ``` -------------------------------- ### Run BATS Tests in Clawflows Source: https://github.com/nikilster/clawflows/blob/main/CLAUDE.md This snippet shows how to execute tests for the Clawflows project using the BATS testing framework. It includes commands for running all tests and for running a specific test file. Ensure BATS is installed and libraries are vendored. ```bash # Run all tests ./tests/bats/bats-core/bin/bats tests/core/ ``` ```bash # Run a specific test file ./tests/bats/bats-core/bin/bats tests/core/find_openclaw.bats ``` -------------------------------- ### Share and Import Workflows using Clawflows CLI Source: https://context7.com/nikilster/clawflows/llms.txt Commands for generating shareable workflow text, copying to clipboard, and importing workflows from URLs. 'share' creates a text representation, '--copy' adds clipboard functionality, and 'import' allows adding workflows from external sources. ```bash # Generate shareable text for a workflow clawflows share send-morning-briefing ``` ```bash # Copy to clipboard (macOS) clawflows share send-morning-briefing --copy ``` ```bash # Import workflow from URL clawflows import https://gist.github.com/user/abc123 ``` -------------------------------- ### POST /external/time Source: https://github.com/nikilster/clawflows/blob/main/workflows/custom/track-time/WORKFLOW.md Logs a completed time entry with a defined start and end time. ```APIDOC ## POST /external/time ### Description Submits a full time entry record including category, title, and time range. ### Method POST ### Endpoint https://health-visualization.vercel.app/external/time ### Parameters #### Request Body - **category** (string) - Required - Activity category - **title** (string) - Required - Activity name - **start_at** (string) - Required - Start timestamp (YYYY-MM-DDTHH:MM:SS) - **end_at** (string) - Required - End timestamp (YYYY-MM-DDTHH:MM:SS) ### Request Example { "category": "Health", "title": "Gym", "start_at": "2023-10-27T08:00:00", "end_at": "2023-10-27T09:00:00" } ``` -------------------------------- ### GET /external/time/categories and /entries Source: https://github.com/nikilster/clawflows/blob/main/workflows/custom/track-time/WORKFLOW.md Retrieve available activity categories or historical time entries. ```APIDOC ## GET /external/time/categories ### Description Fetch the list of valid activity categories. ## GET /external/time/entries ### Description Fetch time entries for a specific date. ### Parameters #### Query Parameters - **date** (string) - Required - Date in YYYY-MM-DD format ``` -------------------------------- ### Authenticate with 1Password Source: https://github.com/nikilster/clawflows/blob/main/workflows/custom/track-time/WORKFLOW.md Sets up the environment by sourcing the 1Password integration script and retrieving the Health Dashboard API token. ```bash source ~/.openclaw/integrations/1password/1password.sh HEALTH_TOKEN=$(op read "op://Dave The Minion/Health Dashboard API/credential") ``` -------------------------------- ### Log Nutrition Data Source: https://github.com/nikilster/clawflows/blob/main/workflows/available/community/track-nutrition/WORKFLOW.md Examples of storing daily nutrition logs in CSV and Markdown formats for historical tracking. ```csv date,protein_g,calories,notes 2024-03-05,120,1850,good day 2024-03-04,95,2100,missed protein target ``` ```markdown ## 2024-03-05 - Protein: 120g ✅ (target: 100g) - Calories: 1850 ✅ (target: 2000) - Notes: Good day ``` -------------------------------- ### Bash Script Execution in Workflow Source: https://github.com/nikilster/clawflows/blob/main/docs/creating-workflows.md Demonstrates how to reference and execute helper shell scripts from within a workflow's Markdown file. ```markdown ## 2. Fetch Data Run the fetch script: ```bash ./scripts/fetch-data.sh ``` ``` -------------------------------- ### List IAM Users (Bash) Source: https://github.com/nikilster/clawflows/blob/main/workflows/available/community/check-aws-security/WORKFLOW.md Lists all IAM users along with their creation date. This is the first step in reviewing IAM permissions to identify potential issues like unused or overly privileged accounts. ```bash aws iam list-users --query 'Users[*].[UserName,CreateDate]' --output table ``` -------------------------------- ### Start Timer Endpoint Source: https://github.com/nikilster/clawflows/blob/main/workflows/custom/track-time/WORKFLOW.md Initiates a new timer for a specific category and title. This request automatically stops any currently running timer. ```bash curl -s -X POST "https://health-visualization.vercel.app/external/time/start" \ -H "Authorization: Bearer $HEALTH_TOKEN" \ -H "Content-Type: application/json" \ -d '{"category":"","title":""}' ``` -------------------------------- ### Log Full Time Entry Source: https://github.com/nikilster/clawflows/blob/main/workflows/custom/track-time/WORKFLOW.md Submits a complete time entry including category, title, start time, and end time directly to the dashboard. ```bash curl -s -X POST "https://health-visualization.vercel.app/external/time" \ -H "Authorization: Bearer $HEALTH_TOKEN" \ -H "Content-Type: application/json" \ -d '{"category":"<CATEGORY>","title":"<TITLE>","start_at":"<START>","end_at":"<END>"}' ``` -------------------------------- ### Backup and Restore Workflows with Clawflows CLI Source: https://context7.com/nikilster/clawflows/llms.txt Commands for backing up custom workflows and enabled lists, and restoring them from created backups. 'backup' creates a compressed archive, while 'restore' can be interactive or restore the latest backup directly. ```bash # Backup custom workflows and enabled list clawflows backup ``` ```bash # Restore from backup (interactive) clawflows restore ``` ```bash # Restore latest backup directly clawflows restore latest ``` -------------------------------- ### Migrate Workflow Files Source: https://github.com/nikilster/clawflows/blob/main/docs/merging-workflows.md Commands to create a new directory for a community workflow and copy the workflow documentation file from the submission folder to the active community workflows directory. ```bash mkdir -p workflows/available/community/<name> cp community-submissions/<name>/WORKFLOW.md workflows/available/community/<name>/WORKFLOW.md ``` -------------------------------- ### Environment Configuration for Flight Status Source: https://github.com/nikilster/clawflows/blob/main/workflows/available/community/check-flight-status/WORKFLOW.md Example environment variables for configuring the flight status monitoring system, including alert thresholds, check frequency, and proactive rebooking settings. ```env ALERT_THRESHOLD=30 CHECK_FREQUENCY=3x_daily PROACTIVE_REBOOKING_HOURS=2 ``` -------------------------------- ### Implement CLI Command Router Source: https://github.com/nikilster/clawflows/blob/main/CLAUDE.md Demonstrates the pattern for adding new commands to the ClawFlows CLI by defining a handler function and registering it in the main case statement. ```bash cmd_newcommand() { echo "Executing new command..." } case "$1" in newcommand) cmd_newcommand "${2:-}" ;; *) echo "Unknown command" ;; esac ```