Skip to content

Conversation

@jsklan
Copy link
Contributor

@jsklan jsklan commented Jan 9, 2026

Description

Refs: Request from user
Link to Devin run: https://app.devin.ai/sessions/c1bdd2db348e49cd91bed142537ee757
Requested by: @jsklan

Adds a new --preview-output-dir CLI option to the fern generate command that allows users to specify a custom output directory for preview generation when using the --preview flag for SDK generation.

Changes Made

  • Added --preview-output-dir string option to the generate command in cli.ts
  • Added validation to ensure the option is only used with --preview flag and not with --docs
  • Updated generateAPIWorkspaces function to accept and use the custom preview output directory
  • When --preview-output-dir is provided, uses that path instead of the default .preview directory
  • Added version 3.38.0 entry in versions.yml

Testing

  • Unit tests added/updated
  • Manual testing completed (lint checks pass)

Human Review Checklist

  • Path handling: The implementation uses AbsoluteFilePath.of(previewOutputDir) directly. Verify this is the desired behavior - if a user provides a relative path, it may not resolve correctly. Compare with how --lfs-override handles paths using resolve(cwd(), path) in generateAPIWorkspace.ts.

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants