Skip to content

Feature: configurable output directory #4

@guillempuche

Description

@guillempuche

First off, thanks for creating this tool! It's exactly what's needed for giving AI agents deeper context beyond types. The lockfile version matching is particularly clever. 🙏

Problem

The output directory is hardcoded as opensrc/. In monorepos that already organize library references in a different location (e.g., docs/ for git subtrees), having a separate opensrc/ folder creates fragmentation.

Use case

Our monorepo uses docs/ for library source references:

docs/
├── effect/          # git subtree
├── tamagui/         # git subtree
└── better-auth/     # git subtree

We'd like opensrc-fetched sources to live alongside:

docs/
├── effect/          # git subtree
├── tamagui/         # git subtree
├── better-auth/     # git subtree
└── opensrc/         # or directly: expo-router/, @effect--platform/, etc.

Proposal

Add a --output flag or config option in settings.json:

yarn opensrc effect --output docs/opensrc

Or in opensrc/settings.json:

{
  "outputDir": "docs/opensrc"
}

The tool would need to update the paths it writes to .gitignore, tsconfig.json, and AGENTS.md accordingly.

Workaround

Currently using a symlink (ln -s docs/opensrc opensrc), but native support would be cleaner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions