diff --git a/README.md b/README.md index 635e62ba..10f25402 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ - [Helper Apps](#helper-apps) - [`to_pdf`](#to_pdf) - [`to_pdf` Installation](#to_pdf-installation) - - [`fabric_code`](#fabric_code) + - [`code_helper`](#code_helper) - [pbpaste](#pbpaste) - [Web Interface](#web-interface) - [Installing](#installing) @@ -600,9 +600,9 @@ go install github.com/danielmiessler/fabric/plugins/tools/to_pdf@latest Make sure you have a LaTeX distribution (like TeX Live or MiKTeX) installed on your system, as `to_pdf` requires `pdflatex` to be available in your system's PATH. -### `fabric_code` +### `code_helper` -`fabric_code` is used in conjunction with the `create_coding_feature` pattern. +`code_helper` is used in conjunction with the `create_coding_feature` pattern. It generates a `json` representation of a directory of code that can be fed into an AI model with instructions to create a new feature or edit the code in a specified way. @@ -611,7 +611,7 @@ See [the Create Coding Feature Pattern README](./patterns/create_coding_feature/ Install it first using: ```bash -go install github.com/danielmiessler/fabric/plugins/tools/fabric_code@latest +go install github.com/danielmiessler/fabric/plugins/tools/code_helper@latest ``` ## pbpaste diff --git a/patterns/create_coding_feature/README.md b/patterns/create_coding_feature/README.md index 6ccbed1b..8126f642 100644 --- a/patterns/create_coding_feature/README.md +++ b/patterns/create_coding_feature/README.md @@ -4,10 +4,10 @@ Generate code changes to an existing coding project using AI. ## Installation -After installing the `fabric_code` binary: +After installing the `code_helper` binary: ```bash -go install github.com/danielmiessler/fabric/plugins/tools/fabric_code@latest +go install github.com/danielmiessler/fabric/plugins/tools/code_helper@latest ``` ## Usage @@ -15,18 +15,18 @@ go install github.com/danielmiessler/fabric/plugins/tools/fabric_code@latest The create_coding_feature allows you to apply AI-suggested code changes directly to your project files. Use it like this: ```bash -fabric_code [project_directory] "[instructions for code changes]" | fabric --pattern create_coding_feature +code_helper [project_directory] "[instructions for code changes]" | fabric --pattern create_coding_feature ``` For example: ```bash -fabric_code . "Create a simple Hello World C program in file main.c" | fabric --pattern create_coding_feature +code_helper . "Create a simple Hello World C program in file main.c" | fabric --pattern create_coding_feature ``` ## How It Works -1. `fabric_code` scans your project directory and creates a JSON representation +1. `code_helper` scans your project directory and creates a JSON representation 2. The AI model analyzes your project structure and instructions 3. AI generates file changes in a standard format 4. Fabric parses these changes and prompts you to confirm @@ -36,7 +36,7 @@ fabric_code . "Create a simple Hello World C program in file main.c" | fabric -- ```bash # Request AI to create a Hello World program -fabric_code . "Create a simple Hello World C program in file main.c" | fabric --pattern create_coding_feature +code_helper . "Create a simple Hello World C program in file main.c" | fabric --pattern create_coding_feature # Review the changes made to your project git diff @@ -52,7 +52,7 @@ git commit -s -m "Add Hello World program" ### Security Enhancement Example ```bash -fabric_code . "Ensure that all user input is validated and sanitized before being used in the program." | fabric --pattern create_coding_feature +code_helper . "Ensure that all user input is validated and sanitized before being used in the program." | fabric --pattern create_coding_feature git diff make check git add diff --git a/plugins/tools/fabric_code/code.go b/plugins/tools/code_helper/code.go similarity index 100% rename from plugins/tools/fabric_code/code.go rename to plugins/tools/code_helper/code.go diff --git a/plugins/tools/fabric_code/main.go b/plugins/tools/code_helper/main.go similarity index 86% rename from plugins/tools/fabric_code/main.go rename to plugins/tools/code_helper/main.go index 3050b173..bcb39f89 100644 --- a/plugins/tools/fabric_code/main.go +++ b/plugins/tools/code_helper/main.go @@ -67,20 +67,20 @@ func ParseIgnorePatterns(patterns string) []string { } func printUsage() { - fmt.Println(`fabric_code - Code project scanner for use with Fabric AI + fmt.Println(`code_helper - Code project scanner for use with Fabric AI Usage: - fabric_code [options] [instructions] + code_helper [options] [instructions] Examples: # Scan current directory with instructions - fabric_code . "Add input validation to all user inputs" + code_helper . "Add input validation to all user inputs" # Scan specific directory with depth limit - fabric_code -depth 4 ./my-project "Implement error handling" + code_helper -depth 4 ./my-project "Implement error handling" # Output to file instead of stdout - fabric_code -out project.json ./src "Fix security issues" + code_helper -out project.json ./src "Fix security issues" Options:`) flag.PrintDefaults()