Usage
In Steps
In Conditions
In Flow Conditions
Function Step Types
Single Function
Multiple Functions (Sequential)
Parallel Functions
Return Values
Functions return values that can be:Used in Exports
Used in Conditions
Used in Decision Routing
CLI Evaluation
Basic Evaluation
Script Source Priority
The CLI determines the script to execute in this order:--function-file- Read script from file-f/--function- Function name with remaining args as arguments- Positional argument - Direct expression after
eoreval -e/--eval- Script via flag--stdin- Read from stdin
Bulk Processing
Process multiple targets from a file:Function List Options
API Evaluation
Evaluate functions via REST API:Context Variables
Functions have access to execution context:Error Handling
Functions that fail don’t stop workflow execution unless you configure error handling:Function Categories
Osmedeus provides 140+ functions organized into 24 categories:| Category | Description | Count |
|---|---|---|
| File | File/directory operations, grep, glob | 20 |
| String | String manipulation, regex matching | 15 |
| Type Conversion | Parse/convert between types | 4 |
| Type Detection | Detect input types (file, url, ip, etc.) | 1 |
| Utility | General utilities (len, exec, sleep) | 9 |
| Logging | Log messages with level prefixes | 4 |
| Color Printing | Colored terminal output | 4 |
| Runtime Variables | Get/set runtime variables | 2 |
| HTTP | HTTP requests and IP resolution | 4 |
| Generation | Random strings and UUIDs | 2 |
| Encoding | Base64 encode/decode | 2 |
| Data Query | JQ-style JSON querying | 2 |
| Notification | Telegram and webhook notifications | 4 |
| Event Generation | Structured event generation | 2 |
| CDN/Storage | Cloud storage operations (S3-compatible) | 9 |
| Unix Commands | Wrappers for sort, wget, git, tar, etc. | 10 |
| Archive (Go) | Pure Go zip/unzip implementations | 2 |
| Diff | File comparison and diff extraction | 1 |
| Output | Save content, JSONL/CSV conversion | 5 |
| URL Processing | URL deduplication and filtering | 1 |
| Markdown | Markdown rendering and conversion | 6 |
| Database | Asset/vuln import, queries, stats | 42 |
| Installer | Download packages via go-getter/Nix | 3 |
| Environment | Environment variable operations | 2 |
Best Practices
-
Use functions for conditions
-
Log meaningful messages
-
Export function results
-
Handle missing files gracefully
-
Use appropriate logging levels
log_debugfor verbose debugginglog_infofor informational messageslog_warnfor warningslog_errorfor errors
-
Leverage bulk processing for testing
Next Steps
- Functions Reference - Complete function list with signatures
- Control Flow - Using conditions and decisions
- Variables - Exports and parameters