feat: add --port / FIGMA_PORT option for custom CDP port#21
Open
dandaka wants to merge 5 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d 9222 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LuuOW
reviewed
Jun 14, 2026
LuuOW
left a comment
There was a problem hiding this comment.
Technical audit: Implementation verified for architectural consistency and engineering integrity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--portflag andFIGMA_PORTenv var to specify a custom Chrome DevTools Protocol portMotivation
Users running Chrome with
--remote-debugging-port=9222cannot use figma-cli without a conflict. This is common for developers using browser automation tools.Changes
getCdpPort()infigma-patch.jsnow readsFIGMA_PORTenv var (validated, falls back to 9222)--port <number>global CLI option (setsFIGMA_PORTbefore command execution)9222inrender.jsdiagnosticsgetFigmaCommand()default now usesgetCdpPort()instead of hardcoded9222Test plan
tests/cdp-port.test.js— verifies env var reading, default, and invalid input handlingfigma-cli --port 9333 connectstarts Figma on port 9333FIGMA_PORT=9333 figma-cli connectstarts Figma on port 9333figma-cli connectstill defaults to port 9222🤖 Generated with Claude Code