### Install Forge CLI Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Installs the Forge command-line interface. This is the initial step to get Forge running on your system. ```bash curl -fsSL https://forgecode.dev/cli | sh ``` -------------------------------- ### Session Flow Example Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Shows a typical session flow, starting with a general topic, asking specific questions, referencing files, and then starting a new conversation. ```bash : I'm working on a Rust web API : What are the best practices for error handling? : Show me an example with @[src/errors.rs] :info :new : New conversation starts here ``` -------------------------------- ### PDF Processing Quick Start Example Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_repo/src/skills/create-skill/SKILL.md Demonstrates how to extract text from a PDF using the pdfplumber library. This is a basic example for getting started. ```markdown # PDF Processing ## Quick start Extract text with pdfplumber: [code example] ``` -------------------------------- ### Documentation Query Test Case Example Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/evals/semantic_search_quality/README.md Example of a test case for finding documentation, specifying expected and to-be-avoided file types. ```yaml - task: "Find documentation on how to configure semantic search" intent: "documentation" expected_file_types: "markdown,txt" should_avoid: "rust,typescript,javascript" ``` -------------------------------- ### Forge YAML Configuration Example Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Example Forge YAML configuration snippets for different AI models. ```yaml # forge.yaml model: meta-llama/Llama-3.3-70B-Instruct ``` ```yaml # forge.yaml model: o3-mini-high ``` ```yaml # forge.yaml model: claude-3.7-sonnet ``` ```yaml # forge.yaml model: google/gemini-2.5-pro ``` ```yaml # forge.yaml model: ``` -------------------------------- ### Implementation Query Test Case Example Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/evals/semantic_search_quality/README.md Example of a test case for finding implementation code, specifying expected and to-be-avoided file types. ```yaml - task: "Find the retry mechanism with exponential backoff implementation" intent: "implementation" expected_file_types: "rust,typescript,javascript" should_avoid: "markdown,txt,documentation" ``` -------------------------------- ### Google Vertex AI Setup and Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for Google Vertex AI. This method is deprecated; use `forge provider login` instead. Requires project ID, location, and an auth token. ```bash # .env PROJECT_ID= LOCATION= VERTEX_AI_AUTH_TOKEN= ``` -------------------------------- ### Basic Command Examples Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Illustrates basic usage of the Forge shell plugin for various tasks like asking questions, explaining concepts, and planning projects. ```bash : What's the weather like? :sage Explain the MVC pattern :planner Help me structure this project ``` -------------------------------- ### Install fd - Fast File Finder Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Installs the 'fd' command-line tool, a prerequisite for the Forge ZSH plugin, on Ubuntu/Debian systems. ```bash # Ubuntu/Debian sudo apt install fd-find ``` -------------------------------- ### Start Forge Application Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Launches the Forge application after provider credentials have been configured. Forge will then be ready to assist with development tasks. ```bash forge ``` -------------------------------- ### Install fd - Fast File Finder Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Installs the 'fd' command-line tool, a prerequisite for the Forge ZSH plugin, on macOS using Homebrew. ```bash # macOS (using Homebrew) brew install fd ``` -------------------------------- ### Task Configuration Example Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/evals/semantic_search_quality/README.md Example of how to define a new task for semantic search evaluation in task.yml. Specify the task description, intent, expected file types, and file types to avoid. ```yaml task: "Your task description" intent: "implementation|flow_understanding|tests|documentation|debugging|modification|architecture|configuration" expected_file_types: "comma,separated,extensions" should_avoid: "comma,separated,extensions" ``` -------------------------------- ### Test Data Example (CSV) Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md Create a CSV file with columns matching your template variables for test cases. ```csv prompt,expected_output "Create a backup script","backup.sh" "Generate API client","api_client.py" ``` -------------------------------- ### Install Forge CLI Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Commands for installing the Forge CLI using curl or package managers. ```bash # YOLO curl -fsSL https://forgecode.dev/cli | sh ``` ```bash # Package managers nix run github:tailcallhq/forgecode # for latest dev branch ``` -------------------------------- ### Flow Understanding Query Test Case Example Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/evals/semantic_search_quality/README.md Example of a test case for understanding system flows, detailing expected and to-be-avoided file types. ```yaml - task: "How does the authentication flow work from request to response?" intent: "flow_understanding" expected_file_types: "rust,typescript" should_avoid: "test,markdown" ``` -------------------------------- ### Install fd - Fast File Finder Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Installs the 'fd' command-line tool, a prerequisite for the Forge ZSH plugin, on Arch Linux. ```bash # Arch Linux sudo pacman -S fd ``` -------------------------------- ### Command Examples with File Tagging Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Demonstrates how to use file tagging with the '@[filename]' syntax to reference specific files in your commands. This is useful for code review, debugging, and configuration tasks. ```bash : Review this implementation @[src/auth.rs] : Debug the issue in @[logs/error.log] @[config/app.yml] ``` -------------------------------- ### Rust User Struct Initialization Examples Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_domain/src/snapshots/forge_domain__conversation_html__tests__conversation.snap.html Illustrates preferred methods for initializing Rust structs using default, new, and custom test constructors, contrasting them with less idiomatic approaches. ```rust User::default().age(12).is_happy(true).name("John") User::new("Job").age(12).is_happy() User::test() // Special test constructor ``` ```rust User {name: "John".to_string(), is_happy: true, age: 12} User::with_name("Job") // Bad name, should stick to User::new() or User::test() ``` -------------------------------- ### Task Definition Example Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md Defines how to run an evaluation, including pre-run commands, the command to execute, parallelism, timeout, and validations. ```yaml # Optional: Commands to run before evaluation starts before_run: - cargo build - npm install # Required: Command(s) to execute for each test case # Single command run: forgee -p '{{prompt}}' # Or multiple commands (executed sequentially) run: - echo "Step 1: {{task}}" - forgee -p '{{prompt}}' - echo "Step 2: Complete" # Execution configuration parallelism: 10 # Number of tasks to run in parallel (default: 1) timeout: 60 # Timeout in seconds (optional) early_exit: true # Stop execution when validations pass (optional) # Optional: Validations to run on output validations: - name: "Check success message" type: regex regex: "\[[0-9:]*\] Skill create-skill" # Required: Data sources for test cases sources: - csv: my_tasks.csv ``` -------------------------------- ### Start Interactive Forge Session with Specific Agent Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Start an interactive Forge session with a specific agent pre-selected. ```bash forge --agent ``` -------------------------------- ### Start Forge Session in Specific Directory Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Initiate a Forge session, specifying the project directory to work within. ```bash forge -C /path/to/project ``` -------------------------------- ### Rust Test Structure with Pretty Assertions Source: https://github.com/tailcallhq/forgecode/blob/main/AGENTS.md Illustrates the standard three-step process for writing Rust tests: setup, execution, and assertion. Always use `pretty_assertions` for enhanced error reporting. ```rust use pretty_assertions::assert_eq; // Always use pretty assertions fn test_foo() { let setup = ...; // Instantiate a fixture or setup for the test let actual = ...; // Execute the fixture to create an output let expected = ...; // Define a hand written expected result assert_eq!(actual, expected); // Assert that the actual result matches the expected result } ``` -------------------------------- ### Groq API Key and URL Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for Groq. This method is deprecated; use `forge provider login` instead. Uses OpenAI compatible keys and a specific URL. ```bash # .env OPENAI_API_KEY= OPENAI_URL=https://api.groq.com/openai/v1 ``` -------------------------------- ### Setting Initial Parallelism Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md Advises starting with a low `parallelism` value (e.g., 1) in Forge for testing and gradually increasing it. This helps in debugging and performance tuning. ```yaml parallelism: 1 # Start here ``` -------------------------------- ### Agent Context Compaction Configuration Example Source: https://github.com/tailcallhq/forgecode/blob/main/plans/agent-context-compaction-2025-03-24-concise.md Example of how to configure agent context compaction in the forge.yaml file. This configuration sets a maximum token limit and defines triggers for compaction based on token count, turn count, and message count. ```yaml # Example in forge.yaml agents: myAgent: id: myAgent model: gpt-4-turbo system_prompt: "You are a helpful assistant." compact: max_tokens: 4000 token_threshold: 6000 turn_threshold: 10 message_threshold: 30 ``` -------------------------------- ### Sample Error Response for Binary File Detection Source: https://github.com/tailcallhq/forgecode/blob/main/plans/2025-04-27-large-file-read-range-support-v4.md Example JSON response when a binary file is detected and not supported. ```json { "error": "Binary files are not supported. File detected as image/png. Please use another tool or method to process this file." } ``` -------------------------------- ### Simple Sequential Execution Example Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md A basic Forge task that sequentially executes a command for each item in a CSV source. Use this for straightforward, step-by-step processing. ```yaml run: echo "Processing {{name}}" sources: - csv: names.csv ``` ```csv name Alice Bob Charlie ``` -------------------------------- ### Anti-pattern: Cumbersome Usage Example Source: https://github.com/tailcallhq/forgecode/blob/main/AGENTS.md Demonstrates the cumbersome usage that results from services with too many generic parameters and explicit type bounds in the constructor. ```rust // BAD: Usage becomes cumbersome let service = BadUserService::::new(...); ``` -------------------------------- ### Amazon Bedrock Setup with Forge Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Configure Forge to use Amazon Bedrock models via the Bedrock Access Gateway. Requires setting up the gateway and providing its API base URL. ```bash forge provider login # Select OpenAI-compatible provider and enter your Bedrock Gateway details ``` ```dotenv # .env OPENAI_API_KEY= OPENAI_URL= ``` -------------------------------- ### OpenAI-Compatible Providers Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for OpenAI-compatible providers. This method is deprecated; use `forge provider login` instead. Requires API key and URL. ```bash # .env OPENAI_API_KEY= OPENAI_URL= ``` -------------------------------- ### x-ai API Key Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for x-ai. This method is deprecated; use `forge provider login` instead. Ensure the API key is correctly formatted. ```bash # .env XAI_API_KEY= ``` -------------------------------- ### OpenAI API Key Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for OpenAI. This method is deprecated; use `forge provider login` instead. Ensure the API key is correctly formatted. ```bash # .env OPENAI_API_KEY= ``` -------------------------------- ### Requesty API Key Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for Requesty. This method is deprecated; use `forge provider login` instead. Ensure the API key is correctly formatted. ```bash # .env REQUESTY_API_KEY= ``` -------------------------------- ### IO Intelligence API Key Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for IO Intelligence. This method is deprecated; use `forge provider login` instead. Ensure the API key is correctly formatted. ```bash # .env IO_INTELLIGENCE_API_KEY= ``` -------------------------------- ### ZSH Plugin Mode Commands Source: https://github.com/tailcallhq/forgecode/blob/main/README.md After `forge setup`, use the `:` prefix for direct shell integration. This mode allows sending prompts, committing, suggesting commands, and managing conversations without leaving your shell. ```zsh : refactor the auth module :commit :suggest "find large log files" :conversation ``` -------------------------------- ### z.ai API Key Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for z.ai. This method is deprecated; use `forge provider login` instead. Supports both general and coding plan API keys. ```bash # .env ZAI_API_KEY= # Or for coding plan subscription ZAI_CODING_API_KEY= ``` -------------------------------- ### OpenRouter API Key Configuration (Deprecated) Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Legacy environment variable setup for OpenRouter. This method is deprecated; use `forge provider login` instead. Ensure the API key is correctly formatted. ```bash # .env OPENROUTER_API_KEY= ``` -------------------------------- ### Initialize Project-Local Skill Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_repo/src/skills/create-skill/SKILL.md Creates a new skill in the project-local directory, including necessary subdirectories and the SKILL.md file with basic YAML frontmatter and markdown body. Also creates a sample script file and makes it executable. ```bash mkdir -p {{local_skills_path}}/edit-pdf/{scripts,references,assets} cat > {{local_skills_path}}/edit-pdf/SKILL.md << 'EOF' --- name: edit-pdf description: TODO - Describe what this skill does and when to use it --- # Edit PDF TODO - Add skill instructions here EOF cat > {{local_skills_path}}/edit-pdf/scripts/rotate.sh << 'EOF' #!/bin/bash # Rotate PDF using pdftk pdftk "$1" cat 1-endright output "$2" EOF chmod +x {{local_skills_path}}/edit-pdf/scripts/rotate.sh ``` -------------------------------- ### Run Environment Diagnostics Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Execute comprehensive environment diagnostics with the :doctor command to check your Forge setup. This verifies ZSH, Forge installation, plugin status, dependencies, and more. ```bash :doctor ``` -------------------------------- ### Git Operations Prompt Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Use this prompt to get help with Git operations, like resolving merge conflicts. Forge guides you through conflict resolution and explains differences. ```plaintext > I need to merge branch 'feature/user-profile' into main but there are conflicts ``` -------------------------------- ### Unix/Linux/macOS Environment Variable Examples Source: https://github.com/tailcallhq/forgecode/blob/main/plans/2025-09-13-forge-history-file-env-var-v2.md Examples of setting the FORGE_HISTORY_FILE environment variable on Unix-like systems. These paths can be relative or absolute. ```bash # Unix/Linux/macOS examples FORGE_HISTORY_FILE=./project-history FORGE_HISTORY_FILE=../shared/team-history FORGE_HISTORY_FILE=/home/user/forge-histories/project1 ``` -------------------------------- ### Initialize Global Skill Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_repo/src/skills/create-skill/SKILL.md Creates a new skill in the global directory, including necessary subdirectories and the SKILL.md file with basic YAML frontmatter and markdown body. Also creates a sample script file and makes it executable. ```bash mkdir -p {{global_skills_path}}/edit-pdf/{scripts,references,assets} cat > {{global_skills_path}}/edit-pdf/SKILL.md << 'EOF' --- name: edit-pdf description: TODO - Describe what this skill does and when to use it --- # Edit PDF TODO - Add skill instructions here EOF cat > {{global_skills_path}}/edit-pdf/scripts/rotate.sh << 'EOF' #!/bin/bash # Rotate PDF using pdftk pdftk "$1" cat 1-endright output "$2" EOF chmod +x {{global_skills_path}}/edit-pdf/scripts/rotate.sh ``` -------------------------------- ### Start Forge Session in Isolated Sandbox Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Create an isolated Git worktree and branch for experimentation before starting a Forge session. ```bash forge --sandbox experiment-name ``` -------------------------------- ### Learning New Technologies Prompt Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Use this prompt to learn how to integrate new technologies, like GraphQL with Express. Forge provides tailored tutorials based on your project structure. ```plaintext > I want to integrate GraphQL into this Express application. Can you explain how to get started? ``` -------------------------------- ### Start a New Session Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Clears the current conversation context and starts a fresh session. This resets the session state and displays helpful information. ```bash :new # or use the alias :n ``` -------------------------------- ### Windows Environment Variable Examples Source: https://github.com/tailcallhq/forgecode/blob/main/plans/2025-09-13-forge-history-file-env-var-v2.md Examples of setting the FORGE_HISTORY_FILE environment variable on Windows. Supports drive letters, UNC paths, and relative paths. ```bash # Windows examples FORGE_HISTORY_FILE=.\project-history FORGE_HISTORY_FILE=..\shared\team-history FORGE_HISTORY_FILE=C:\Users\Name\ForgeHistories\project1 FORGE_HISTORY_FILE=\\server\share\team-histories\project1 ``` -------------------------------- ### Feature Addition PR Description Example Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_repo/src/skills/github-pr-description/SKILL.md Example of a comprehensive PR description for a new feature, including summary, context, changes, implementation details, use cases, testing, and links. ```markdown ## Summary Add semantic code search to enable searching codebase by concepts and behavior rather than exact string matching. ## Context Currently, users can only search using exact string matching, which makes it difficult to find code based on functionality or behavior. This has been a recurring request in issues #123 and #456. ## Changes - Implemented semantic search using vector embeddings - Integrated with existing search interface - Added support for multiple concurrent queries with result aggregation - Configurable search scope (entire codebase or specific directories) ### Key Implementation Details Uses OpenAI embeddings for code representation and cosine similarity for matching. Index is built incrementally to support large codebases. Search results are reranked based on code context and usage patterns. ## Use Cases - Find authentication flow without knowing exact function names - Locate retry logic across the codebase - Search for "database connection" patterns ## Testing ```bash # Run the search service npm run search:dev # Test semantic queries curl -X POST http://localhost:3000/search \ -H "Content-Type: application/json" \ -d '{"query": "user authentication"}' ``` ## Links - Related issues: #123, #456 - Documentation: /docs/semantic-search.md ``` -------------------------------- ### Using before_run for Build Steps Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md Shows how to use the `before_run` directive in Forge to execute commands, such as building binaries, before the main task execution. This ensures dependencies are met. ```yaml before_run: - cargo build ``` -------------------------------- ### Start a New Conversation Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Initiates a new conversation with the default Forge agent by prefixing a prompt with a colon. ```bash : Get the current time ``` -------------------------------- ### Good Claude Tool Description Example (JSON) Source: https://github.com/tailcallhq/forgecode/blob/main/docs/tool-guidelines.md This JSON object demonstrates a well-formed tool description for Claude. It includes a detailed explanation of the tool's function, usage scenarios, limitations, and input schema, ensuring Claude can accurately interpret and use the tool. ```json { "name": "get_stock_price", "description": "Retrieves the current stock price for a given ticker symbol. The ticker symbol must be a valid symbol for a publicly traded company on a major US stock exchange like NYSE or NASDAQ. The tool will return the latest trade price in USD. It should be used when the user asks about the current or most recent price of a specific stock. It will not provide any other information about the stock or company.", "input_schema": { "type": "object", "properties": { "ticker": { "type": "string", "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." } }, "required": ["ticker"] } } ``` -------------------------------- ### Sample Error Response for Invalid Range Source: https://github.com/tailcallhq/forgecode/blob/main/plans/2025-04-27-large-file-read-range-support-v4.md Example JSON response indicating an invalid byte range was specified. ```json { "error": "Invalid range specified: start_byte (5000) is greater than end_byte (4000)." } ``` -------------------------------- ### Write PR Description to File Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_repo/src/skills/github-pr-description/SKILL.md Use the `write` tool to create the `.forge/FORGE_PR_DESCRIPTION.md` file with the generated description content. ```bash Use the `write` tool to create `.forge/FORGE_PR_DESCRIPTION.md` with the generated description content. ``` -------------------------------- ### CSV Data for Template Variables Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md Example CSV data providing values for template variables used in commands. ```csv input_file,format data1.txt,json data2.txt,yaml ``` -------------------------------- ### Skill File Structure Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_repo/src/skills/create-skill/SKILL.md Illustrates the required and optional components of a skill package, highlighting the SKILL.md file and its frontmatter. ```markdown skill-name/ ├── SKILL.md (required) │ ├── YAML frontmatter metadata (required) │ │ ├── name: (required) │ │ └── description: (required) │ └── Markdown instructions (required) └── Bundled Resources (optional) ├── scripts/ - Executable code (Python/Bash/etc.) ├── references/ - Documentation intended to be loaded into context as needed └── assets/ - Files used in output (templates, icons, fonts, etc.) ``` -------------------------------- ### Poor Claude Tool Description Example (JSON) Source: https://github.com/tailcallhq/forgecode/blob/main/docs/tool-guidelines.md This JSON object illustrates a poorly written tool description for Claude. Its brevity lacks crucial details about the tool's functionality, usage, and parameter constraints, leading to potential misinterpretations by Claude. ```json { "name": "get_stock_price", "description": "Gets the stock price for a ticker.", "input_schema": { "type": "object", "properties": { "ticker": { "type": "string" } }, "required": ["ticker"] } } ``` -------------------------------- ### Create Evaluation Directory Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md Create a new directory for your evaluation definitions. ```bash mkdir -p evals/my_eval ``` -------------------------------- ### Other Forge CLI Commands Source: https://github.com/tailcallhq/forgecode/blob/main/README.md Miscellaneous Forge CLI commands for information, tool listing, diagnostics, updates, and setup. ```bash forge info ``` ```bash forge list tool --agent ``` ```bash forge doctor ``` ```bash forge update ``` ```bash forge setup ``` -------------------------------- ### Rust Hello World Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_display/src/fixtures/code-02.md A basic 'Hello, world!' program in Rust. ```rust fn main() { println!("Hello, world!"); } ``` -------------------------------- ### Use Specific Forge Agents Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Starts a conversation with a specific Forge agent by naming it after the colon. Tab completion is available for agent names. ```bash :sage How does caching work in this system? :muse Create a deployment strategy for my app ``` -------------------------------- ### Regex Validation Example Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md Utilize regex validations in Forge to verify task outputs against regular expressions. This is ideal for pattern matching in command output. ```yaml run: cargo test {{test_name}} validations: - name: "All tests passed" type: regex regex: test result:\s+ok sources: - csv: tests.csv ``` -------------------------------- ### Multiple Commands Execution Example Source: https://github.com/tailcallhq/forgecode/blob/main/benchmarks/README.md Define a Forge task that executes a sequence of commands. This allows for more complex workflows within a single task definition. ```yaml run: - echo "Starting task {{id}}" - ./process --input {{file}} - echo "Task {{id}} complete" parallelism: 3 timeout: 120 sources: - csv: tasks.csv ``` -------------------------------- ### Text Input with ForgeSelect Source: https://github.com/tailcallhq/forgecode/blob/main/crates/forge_select/README.md Use this snippet to get text input from the user. You can specify whether empty input is allowed and provide a default value. ```rust use forge_select::ForgeSelect; let name = ForgeSelect::input("Enter your name:") .allow_empty(false) .with_default("John") .prompt()?; ``` -------------------------------- ### Sample Success Response for fs_read Tool Source: https://github.com/tailcallhq/forgecode/blob/main/plans/2025-04-27-large-file-read-range-support-v4.md Illustrates the JSON structure for a successful file read operation, including content and detailed metadata. ```json { "content": "This is the file content within the requested range...", "metadata": { "file_size": 1024000, "requested_range": { "start_byte": 500, "end_byte": 1500 }, "actual_range": { "start_byte": 498, "end_byte": 1503 }, "boundary_adjustments": { "start_adjusted": true, "start_adjustment_reason": "UTF-8 character boundary alignment", "end_adjusted": true, "end_adjustment_reason": "UTF-8 character boundary alignment" }, "is_partial": true, "percent_of_file": 0.1 } } ``` -------------------------------- ### Rust Service Constructor with Single Dependency Source: https://github.com/tailcallhq/forgecode/blob/main/AGENTS.md Example of a simple service implementation using a tuple struct pattern for a single infrastructure dependency, stored as `Arc`. ```rust struct Service(Arc); ``` -------------------------------- ### View System Information Source: https://github.com/tailcallhq/forgecode/blob/main/shell-plugin/README.md Displays system and project information, including system details, project details, and current configuration. Aliases :i are available. ```bash :info # or use the alias :i ```