Skip to content

explore/record should write to ~/.opencli/ instead of cwd #711

@heresyrj

Description

@heresyrj

Problem

explore and record write output to .opencli/ relative to cwd, while operate init correctly writes to ~/.opencli/clis/. This inconsistency pollutes project directories with opencli artifacts.

Current behavior

Command Output path Correct?
operate init ~/.opencli/clis/<site>/
explore cwd/.opencli/explore/<site>/
record cwd/.opencli/record/<site>/

Source references:

  • explore.js:329: path.join('.opencli', 'explore', siteName) — relative path
  • record.js:625: path.join('.opencli', 'record', site) — relative path
  • record has --out <dir> as workaround, but explore doesn't expose outDir in CLI args (only in code)

Expected behavior

Default output for all commands should go to ~/.opencli/:

  • ~/.opencli/explore/<site>/
  • ~/.opencli/record/<site>/

This is consistent with operate init writing to ~/.opencli/clis/ and keeps project directories clean.

Workaround

  • record: opencli record <url> --out ~/.opencli/record/<site>
  • explore: no workaround (need to cd ~/.opencli first)

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