Migration update

qmims has been migrated from Amazon Q CLI to Kiro CLI. These docs reflect the current install, authentication, and command workflows.

Edit Command

Modify existing Markdown files using embedded qmims instructions

The edit command updates an existing Markdown file by asking Kiro CLI to read the file, interpret any embedded <!-- qmims: ... --> instructions, and write the revised content back to disk.

Syntax

qmims edit [file] [options]

Arguments

ArgumentDescriptionDefault
filePath to the Markdown file to editREADME.md

Options

OptionAliasDescription
--yes-yAutomatically approve the Kiro tool-permission flow for the edit run
--dry-runShow what would be done without making changes
--verbose-VShow detailed output for debugging

Examples

Edit README.md in the current directory:

qmims edit

Edit a specific Markdown file:

qmims edit docs/README.md

Automatically approve the Kiro run:

qmims edit --yes

Preview the workflow without changing files:

qmims edit --dry-run

Show detailed diagnostics:

qmims edit --verbose

How It Works

When you run qmims edit, the command follows this Kiro-backed flow:

  1. Resolve the target Markdown file, defaulting to README.md
  2. If the requested file does not exist, try discovering a fallback README.md in the same directory
  3. Verify that Kiro CLI is installed and authenticated
  4. Invoke Kiro in documented non-interactive CLI mode
  5. Ask Kiro to read the Markdown file and find embedded qmims instructions
  6. Write the complete updated file back to the resolved target path

Embedded Instruction Format

The edit command is designed to work with HTML comments that begin with the qmims prefix:

# Project Title

<!-- qmims: Generate a concise overview based on the repository's main purpose. -->

## Features

<!-- qmims: List the main user-facing capabilities of this project. -->

## Installation

<!-- qmims: Update installation steps using the detected package manager and runtime requirements. -->

qmims asks Kiro to read the file, interpret all embedded instructions it finds, and update the Markdown accordingly.

Kiro Requirements

Before using edit, make sure Kiro CLI is ready:

kiro-cli whoami
kiro-cli login
kiro-cli doctor

For headless or CI environments, Kiro can also authenticate using KIRO_API_KEY.

# Linux / macOS
export KIRO_API_KEY=your_api_key_here

# Windows PowerShell
$env:KIRO_API_KEY = "your_api_key_here"

Dry Run Output

In dry-run mode, qmims does not invoke Kiro. Instead, it shows the requested file, the resolved edit target, and the actions it would take.

qmims edit --dry-run

When to Use edit

Good for targeted updates

  • Refreshing installation steps
  • Updating a features list
  • Rewriting outdated usage examples
  • Filling in placeholder sections

Less ideal for blank files

  • Creating a brand-new README from nothing
  • Choosing an initial structure for a new project
  • Generating a template-based layout
  • Bootstrapping docs without embedded instructions

For a brand-new README, start with qmims generate. Then use qmims edit for ongoing, instruction-driven maintenance.

For more on instruction syntax and writing effective prompts, see the Embedded Instructions section.