Skip to content

feat: add --output flag to ez doc command #1572

@SchoolyB

Description

@SchoolyB

Summary

The `ez doc` command always writes to `DOCS.md` in the current directory (hard-coded in `cmd/ez/doc.go`). There is no `--output` / `-o` flag to specify a different output path. This is inconsistent with `ez build` which accepts `-o`.

Implementation guidance

  1. Open `cmd/ez/doc.go`
  2. Add an `-o` / `--output` string flag to the cobra command, defaulting to `"DOCS.md"`
  3. Pass the flag value into `generateDocs()` instead of the hard-coded path
  4. Follow the same pattern used by `buildCmd`'s `-o` flag in `commands.go`

Example usage

```bash
ez doc # writes to DOCS.md (default, unchanged)
ez doc -o api-reference.md # writes to custom path
ez doc --output docs/API.md # same, long form
```

Files to modify

  • `cmd/ez/doc.go`

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestezcEZC compiler tool (EZ → C → native binary)good first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions