Edit Command
Modify existing README.md files using embedded instructions
Syntax
qmims edit [file] [options]
Arguments
Argument | Description | Default |
---|---|---|
file | Path to the Markdown file to edit | README.md |
Options
Option | Alias | Description |
---|---|---|
--yes | -y | Automatically approve all permission requests |
--dry-run | Show what would be done without making changes | |
--verbose | -V | Show detailed output for debugging |
Examples
Edit README.md in current directory:
qmims edit
Edit a specific file:
qmims edit path/to/README.md
Edit with automatic approval of changes:
qmims edit --yes
Preview edits without making changes:
qmims edit --dry-run
How It Works
The edit
command processes embedded instructions in your Markdown files. These instructions are HTML comments that tell Amazon Q what content to generate or modify.
# Project Title <!-- qmims: Generate a concise project overview based on the codebase --> ## Features <!-- qmims: List the main features of the project based on the code structure -->
When you run qmims edit
, it will:
- Scan the file for embedded instructions
- Process each instruction using Amazon Q
- Replace the instructions with generated content
- Save the updated file (unless using --dry-run)
Tip
You can use the
edit
command to update specific sections of your README without regenerating the entire file. This is useful for keeping your documentation up-to-date as your project evolves.For more information on embedded instructions, see the Embedded Instructions section.