Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ cf push [OPTIONS]
**Options:**
- `--project-root`: Specify project directory
- `--force-overwrite`: Overwrite existing files on SFTP (SFTP mode only)
- `--submit`: Submit the project for review after upload
- `--submit`: Submit the project for review after upload (shortcut for `cf push` + `cf submit`)
- `--dry-run`: Preview what would be uploaded
- `--sftp-username`: Override configured username (SFTP mode only)
- `--sftp-key`: Override configured key path (SFTP mode only)
Expand Down Expand Up @@ -633,6 +633,15 @@ What happens:
4. Staged S3 objects are deleted on success; any leftovers are expired by the bucket lifecycle after 7 days.
5. `--submit` submits for review on success.

### Submit a Project for Review (No Re-upload)

```bash
cf submit [--project-root PATH]
```

Use this when your latest `cf push` already uploaded the files you want reviewed.
`cf submit` moves the platform project into review without requiring another upload.

> [!TIP]
> Try modes in this order: `cf push` → `cf push --remote` → `cf push --https`.
> The SFTP mode is fastest when unrestricted, `--remote` is the best HTTPS
Expand Down
39 changes: 39 additions & 0 deletions chipfoundry_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2860,6 +2860,45 @@ def view_tapeout_report(project_name, report_path):
console.print(f"[red]Failed to open tapeout report in browser: {e}[/red]")
raise click.Abort()

@main.command("submit")
@click.option(
"--project-root",
required=False,
type=click.Path(exists=True, file_okay=False),
help="Path to the local ChipFoundry project directory (defaults to current directory if .cf/project.json exists).",
)
def submit(project_root):
"""Submit a project for admin review without uploading files again."""
cwd_root, _ = get_project_json_from_cwd()
if not project_root and cwd_root:
project_root = cwd_root
if not project_root:
console.print(
"[red]No project root specified and no .cf/project.json found in current directory.[/red]"
)
console.print("Provide --project-root or run from a linked project.")
raise click.Abort()

project_root = str(Path(project_root).resolve())
platform_id = _load_project_platform_id(project_root)
if not platform_id:
console.print("[red]Project is not linked to the platform.[/red]")
console.print(
"Run [bold]cf link[/bold] to connect this project, or [bold]cf init[/bold] to create a new one."
)
raise click.Abort()

config = load_user_config()
if not config.get("api_key"):
console.print("[red]Not logged in.[/red] Run [bold]cf login[/bold] before submitting.")
raise click.Abort()

try:
_api_post(f"/projects/{platform_id}/submit", {})
console.print("[green]✓ Project submitted for review[/green]")
except SystemExit:
raise click.Abort()

@main.command('confirm')
@click.option('--project-root', required=False, type=click.Path(exists=True, file_okay=False), help='Path to the local ChipFoundry project directory (defaults to current directory if .cf/project.json exists).')
@click.option('--sftp-host', default=DEFAULT_SFTP_HOST, show_default=True, help='SFTP server hostname.')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "chipfoundry-cli"
version = "2.4.9"
version = "2.4.10"
description = "CLI tool to automate ChipFoundry project submission to SFTP server"
authors = ["ChipFoundry <marwan.abbas@chipfoundry.io>"]
readme = "README.md"
Expand Down
Loading