| Crates.io | rsp-cli |
| lib.rs | rsp-cli |
| version | 0.1.0 |
| created_at | 2025-07-27 08:55:54.561234+00 |
| updated_at | 2025-07-27 08:55:54.561234+00 |
| description | A Rust CLI tool that converts escaped strings embedded in YAML ConfigMaps into properly formatted multi-line strings. |
| homepage | |
| repository | https://github.com/pomcho555/rsp |
| max_upload_size | |
| id | 1769836 |
| size | 53,696 |
A Rust CLI tool that converts escaped strings embedded in YAML ConfigMaps into properly formatted multi-line strings using YAML's pipe (|) syntax.
git clone <repository-url>
cd rsp
# Install from source
cargo install --path .
target/release/rspProcess a YAML ConfigMap file and output to stdout:
rsp peel input.yaml
Process a file and save to output file:
rsp peel input.yaml -o output.yaml
Process a file from pipe:
cat input.yaml |rsp peel
RSP transforms hard-to-read escaped strings in Kubernetes ConfigMaps into human-readable format:
Before:
apiVersion: v1
kind: ConfigMap
metadata:
name: example-config
data:
config.json: "{\"hello\":\"test\",\n \"foo\":\"bar\"\n}"
After:
apiVersion: v1
kind: ConfigMap
metadata:
name: example-config
data:
config.json: |
{"hello":"test",
"foo":"bar"
}
RSP automatically processes string values for keys ending with:
.yaml or .yml.json.tomlRun the comprehensive test suite:
# Run all tests
cargo test
# Run specific test categories
cargo test --test peeler_tests # Core functionality
cargo test --test cli_tests # CLI integration
cargo test --test edge_cases_tests # Edge cases and error handling
The project uses GitHub Actions for continuous integration:
This project is open source. Please check the repository for license information.
We welcome contributions! Please follow these guidelines:
Testing: Run the full test suite before submitting changes:
cargo test --all --verbose
Code Quality: Ensure your code passes all checks:
cargo check
cargo clippy
Documentation: Update documentation for any new features or changes
Commit Messages: Use clear, descriptive commit messages
Pull Requests:
src/main.rs - Main CLI entry pointsrc/cli.rs - Command-line interfacesrc/peeler.rs - Core YAML processing logicsrc/error.rs - Error handlingtests/ - Comprehensive test suitespecs/README.md - Detailed specificationsFor more detailed development information, see CLAUDE.md in the project root.