Skip to content

Commit

Permalink
Add token option.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed May 8, 2024
1 parent 285cc60 commit f337cc7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions comfy_cli/command/custom_nodes/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,11 @@ def deps_in_workflow(

@app.command("publish", help="Publish node to registry")
@tracking.track_command("publish")
def publish():
def publish(
token: Optional[str] = typer.Option(
None, "--token", help="Personal Access Token for publishing", hide_input=True
)
):
"""
Publish a node with optional validation.
"""
Expand All @@ -525,7 +529,8 @@ def publish():
config = extract_node_configuration()

# Prompt for Personal Access Token
token = typer.prompt("Please enter your Personal Access Token", hide_input=True)
if not token:
token = typer.prompt("Please enter your Personal Access Token", hide_input=True)

# Call API to fetch node version with the token in the body
typer.echo("Publishing node version...")
Expand Down

0 comments on commit f337cc7

Please sign in to comment.