Skip to content

fix: default explore/record output to ~/.opencli/ instead of cwd#720

Open
Astro-Han wants to merge 4 commits intojackwener:mainfrom
Astro-Han:worktree-fix-711-default-output-dir
Open

fix: default explore/record output to ~/.opencli/ instead of cwd#720
Astro-Han wants to merge 4 commits intojackwener:mainfrom
Astro-Han:worktree-fix-711-default-output-dir

Conversation

@Astro-Han
Copy link
Copy Markdown
Contributor

Description

explore and record wrote artifacts to .opencli/ relative to cwd, polluting project directories. This PR changes the default output to ~/.opencli/explore/<site>/ and ~/.opencli/record/<site>/, consistent with operate init writing to ~/.opencli/clis/.

Also adds --out <dir> option to explore (already existed on record), updates all documentation references, and improves resolveExploreDir error message for legacy artifact paths.

Related issue: #711

Type of Change

  • 🐛 Bug fix
  • 📝 Documentation

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Changes

File What
src/explore.ts Default outDir → ~/.opencli/explore/<site>/
src/record.ts Default outDir → ~/.opencli/record/<site>/
src/synthesize.ts resolveExploreDir checks ~/.opencli/ first, cwd fallback for legacy; improved error hint
src/cli.ts Add --out <dir> option to explore command
CLI-EXPLORER.md Update artifact path references
README.zh-CN.md Update artifact path references
docs/developer/ai-workflow.md Update artifact path references
skills/opencli-explorer/SKILL.md Update artifact path references
skills/opencli-usage/plugins.md Update artifact path references

Screenshots / Output

$ git diff main..HEAD --stat
 CLI-EXPLORER.md                  |  4 ++--
 README.zh-CN.md                  |  2 +-
 docs/developer/ai-workflow.md    |  2 +-
 skills/opencli-explorer/SKILL.md |  8 ++++----
 skills/opencli-usage/plugins.md  |  2 +-
 src/cli.ts                       |  2 ++
 src/explore.ts                   |  4 +++-
 src/record.ts                    |  4 +++-
 src/synthesize.ts                | 14 +++++++++++---
 9 files changed, 28 insertions(+), 14 deletions(-)

Astro-Han and others added 3 commits April 3, 2026 11:47
…kwener#711)

Previously `explore` and `record` wrote artifacts to `.opencli/` relative
to cwd, polluting project directories. Now they default to
`~/.opencli/explore/<site>/` and `~/.opencli/record/<site>/`, consistent
with `operate init` writing to `~/.opencli/clis/`.

Changes:
- explore: default outDir → ~/.opencli/explore/<site>/
- record: default outDir → ~/.opencli/record/<site>/
- synthesize: resolveExploreDir checks ~/.opencli/ first, cwd fallback
- cli: add --out <dir> option to explore command

Closes jackwener#711
Sync documentation with the new default output directory. Also improve
resolveExploreDir error message with a hint for legacy artifact paths.
@jackwener jackwener force-pushed the worktree-fix-711-default-output-dir branch from 4bffa0e to e0990c4 Compare April 3, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants