Skip to content

feat(sheets): add --parent flag to sheets create #417

@mjfork

Description

@mjfork

Summary

Add --parent flag to gog sheets create to specify the destination folder, matching the behavior of docs create and slides create.

Current behavior

# docs and slides support --parent
gog docs create "My Doc" --parent=<folderId>
gog slides create "My Deck" --parent=<folderId>

# sheets does not
gog sheets create "My Sheet"  # always creates in Drive root
gog sheets create "My Sheet" --parent=<folderId>  # error: unknown flag --parent

Requested behavior

gog sheets create "My Sheet" --parent=<folderId>

Use case

Building safety wrappers that restrict LLM agents to only create/modify files in a specific folder. Currently sheets create can't be restricted because there's no way to specify the destination folder.

Notes

The Google Sheets API spreadsheets.create doesn't directly support setting a parent folder, but this could be implemented by:

  1. Creating the spreadsheet
  2. Moving it to the target folder via Drive API (files.update with addParents)

This is the same pattern that would be needed for any API that creates files without folder support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions