Copyright | (c) Fuzz Leonard 2025 |
---|---|
License | MIT |
Maintainer | cyborg@bionicfuzz.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Clod.Output
Description
This module provides functions for user interaction and output formatting. It handles terminal output with consistent styling, user prompts, and guidance for next steps after file processing.
The module uses ANSI color codes to provide a clear, color-coded interface:
- Green for success messages
- Red for error messages
- Yellow for warnings and headers
It also provides interactive prompts for users to make decisions and displays next steps for using the processed files with Claude AI.
Synopsis
- printHeader :: String -> ClodM ()
- printSuccess :: String -> ClodM ()
- printError :: String -> ClodM ()
- printWarning :: String -> ClodM ()
- promptUser :: String -> String -> ClodM String
- promptYesNo :: String -> Bool -> ClodM Bool
- showNextSteps :: ClodConfig -> FilePath -> ClodM ()
Terminal output
printHeader :: String -> ClodM () Source #
Print a header message in yellow
printSuccess :: String -> ClodM () Source #
Print a success message in green
printError :: String -> ClodM () Source #
Print an error message in red
printWarning :: String -> ClodM () Source #
Print a warning message in yellow
User interaction
Arguments
:: String | The prompt to display |
-> String | Default value to use if user input is empty |
-> ClodM String | The user's input or default value |
Prompt the user for input with a default value
This function displays a prompt with a default value in brackets. If the user presses Enter without typing anything, the default value is used.
-- Prompt for staging directory with default stagingDir <- promptUser "Staging directory" "homeuser/Claude"
Next steps
Arguments
:: ClodConfig | Program configuration |
-> FilePath | Path to the staging directory |
-> ClodM () |
Show next steps for using the processed files with Claude AI
This function displays guidance on how to use the processed files with Claude AI's Project Knowledge feature. It's shown after successful file processing, unless in test mode.
The instructions cover:
- Navigating to Project Knowledge in Claude
- Uploading files from the staging folder
- Using the path manifest to understand file origins
- Adding project instructions
- Managing file versions
-- Show next steps after processing files showNextSteps config stagingDir