chipfoundry-cli 1.4.2__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chipfoundry_cli-1.4.2 → chipfoundry_cli-2.1.0}/PKG-INFO +166 -78
- {chipfoundry_cli-1.4.2 → chipfoundry_cli-2.1.0}/README.md +165 -77
- {chipfoundry_cli-1.4.2 → chipfoundry_cli-2.1.0}/chipfoundry_cli/main.py +661 -27
- {chipfoundry_cli-1.4.2 → chipfoundry_cli-2.1.0}/pyproject.toml +1 -1
- {chipfoundry_cli-1.4.2 → chipfoundry_cli-2.1.0}/LICENSE +0 -0
- {chipfoundry_cli-1.4.2 → chipfoundry_cli-2.1.0}/chipfoundry_cli/__init__.py +0 -0
- {chipfoundry_cli-1.4.2 → chipfoundry_cli-2.1.0}/chipfoundry_cli/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: chipfoundry-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: CLI tool to automate ChipFoundry project submission to SFTP server
|
|
5
5
|
Home-page: https://chipfoundry.io
|
|
6
6
|
License: Apache-2.0
|
|
@@ -29,13 +29,13 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
[](https://badge.fury.io/py/chipfoundry-cli)
|
|
30
30
|
[](https://pypi.org/project/chipfoundry-cli/)
|
|
31
31
|
|
|
32
|
-
A command-line tool
|
|
32
|
+
A command-line tool for managing ChipFoundry ASIC projects — from authentication and project setup to SFTP submission and platform sync.
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
36
|
## Overview
|
|
37
37
|
|
|
38
|
-
`cf-cli` is a
|
|
38
|
+
`cf-cli` is a command-line tool that integrates with the ChipFoundry platform for end-to-end project management. It handles browser-based authentication, project registration, SFTP file transfers, and platform synchronization. When you push or pull, the CLI uploads your files via SFTP and syncs project metadata (GDS hash, version, project ID, slot number) with the platform.
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
@@ -52,96 +52,88 @@ cf --help
|
|
|
52
52
|
|
|
53
53
|
## Quick Start
|
|
54
54
|
|
|
55
|
-
### For New Projects
|
|
55
|
+
### For New Projects
|
|
56
56
|
|
|
57
|
-
1. **
|
|
57
|
+
1. **Log in to the platform**:
|
|
58
|
+
```bash
|
|
59
|
+
cf login
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
2. **Clone the template** (or create new directory):
|
|
58
63
|
```bash
|
|
59
64
|
git clone https://github.com/chipfoundry/caravel_user_project my_project
|
|
60
65
|
cd my_project
|
|
61
66
|
```
|
|
62
67
|
|
|
63
|
-
|
|
68
|
+
3. **Initialize your project** (registers on platform and selects shuttle):
|
|
64
69
|
```bash
|
|
65
70
|
cf init
|
|
66
71
|
```
|
|
67
|
-
This creates `.cf/project.json` with project metadata. **Must be run before any other commands.**
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
4. **Set up the project** (replaces `make setup`):
|
|
70
74
|
```bash
|
|
71
75
|
cf setup
|
|
72
76
|
```
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
5. **Generate SSH Key** (if you don't have one):
|
|
75
79
|
```bash
|
|
76
80
|
cf keygen
|
|
77
81
|
```
|
|
78
82
|
|
|
79
|
-
|
|
83
|
+
6. **Register your key** at [https://platform.chipfoundry.io/ssh-key](https://platform.chipfoundry.io/ssh-key)
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
7. **Configure SFTP credentials**:
|
|
82
86
|
```bash
|
|
83
87
|
cf config
|
|
84
88
|
```
|
|
85
89
|
|
|
86
|
-
|
|
90
|
+
8. **Upload your project** (SFTP + platform sync):
|
|
87
91
|
```bash
|
|
88
92
|
cf push
|
|
89
93
|
```
|
|
90
94
|
|
|
91
|
-
|
|
95
|
+
9. **Download results** (when available):
|
|
92
96
|
```bash
|
|
93
97
|
cf pull
|
|
94
98
|
```
|
|
95
99
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
10. **View tapeout report**:
|
|
101
|
+
```bash
|
|
102
|
+
cf view-tapeout-report
|
|
103
|
+
```
|
|
100
104
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
11. **Confirm final tapeout** (when ready to send GDS to foundry):
|
|
106
|
+
```bash
|
|
107
|
+
cf confirm
|
|
108
|
+
```
|
|
105
109
|
|
|
106
110
|
### For Existing Projects
|
|
107
111
|
|
|
108
|
-
If you already have a project with
|
|
112
|
+
If you already have a project directory with GDS files:
|
|
109
113
|
|
|
110
|
-
1. **
|
|
114
|
+
1. **Log in and set up SFTP**:
|
|
111
115
|
```bash
|
|
112
|
-
cf
|
|
116
|
+
cf login
|
|
117
|
+
cf keygen # if you don't have an SSH key
|
|
118
|
+
cf config # set SFTP username and key path
|
|
113
119
|
```
|
|
120
|
+
Register your key at [https://platform.chipfoundry.io/ssh-key](https://platform.chipfoundry.io/ssh-key)
|
|
114
121
|
|
|
115
|
-
2. **
|
|
116
|
-
|
|
117
|
-
3. **Configure your credentials**:
|
|
122
|
+
2. **Initialize and link to the platform**:
|
|
118
123
|
```bash
|
|
119
|
-
cf
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
4. **Initialize your project**:
|
|
123
|
-
```bash
|
|
124
|
-
cf init
|
|
124
|
+
cf init # creates .cf/project.json and registers on platform
|
|
125
125
|
```
|
|
126
|
-
|
|
127
|
-
5. **Upload your project**:
|
|
126
|
+
Or, if the project already exists on the platform:
|
|
128
127
|
```bash
|
|
129
|
-
cf
|
|
128
|
+
cf init # creates .cf/project.json locally
|
|
129
|
+
cf link # links to existing platform project
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
3. **Upload, download, and confirm**:
|
|
133
133
|
```bash
|
|
134
|
-
cf
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
7. **View tapeout report**:
|
|
138
|
-
```bash
|
|
139
|
-
cf view-tapeout-report
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
8. **Confirm final tapeout** (when ready to send GDS to foundry):
|
|
143
|
-
```bash
|
|
144
|
-
cf confirm
|
|
134
|
+
cf push # upload files + sync with platform
|
|
135
|
+
cf pull # download results + view review notes
|
|
136
|
+
cf confirm # confirm final tapeout
|
|
145
137
|
```
|
|
146
138
|
|
|
147
139
|
---
|
|
@@ -175,7 +167,21 @@ my_project/
|
|
|
175
167
|
|
|
176
168
|
## Authentication
|
|
177
169
|
|
|
178
|
-
|
|
170
|
+
### Platform Authentication
|
|
171
|
+
|
|
172
|
+
The CLI uses browser-based login for platform access:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
cf login # opens browser to authenticate, stores API key
|
|
176
|
+
cf whoami # show current user
|
|
177
|
+
cf logout # clear stored credentials
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Credentials are stored in `~/.chipfoundry-cli/config.toml`.
|
|
181
|
+
|
|
182
|
+
### SFTP Authentication
|
|
183
|
+
|
|
184
|
+
SFTP file transfers use SSH key authentication:
|
|
179
185
|
|
|
180
186
|
- **Default key location**: `~/.ssh/chipfoundry-key` (generated by `cf keygen`)
|
|
181
187
|
- **Alternative key**: Specify with `--sftp-key` option
|
|
@@ -201,7 +207,7 @@ cf keygen [--overwrite]
|
|
|
201
207
|
- Generates a new RSA SSH key at `~/.ssh/chipfoundry-key`
|
|
202
208
|
- Displays the public key for registration
|
|
203
209
|
- Use `--overwrite` to regenerate an existing key
|
|
204
|
-
- **Next step**: Submit the public key to [https://chipfoundry.io/
|
|
210
|
+
- **Next step**: Submit the public key to [https://platform.chipfoundry.io/ssh-key](https://platform.chipfoundry.io/ssh-key)
|
|
205
211
|
|
|
206
212
|
### View SSH Key
|
|
207
213
|
|
|
@@ -213,7 +219,7 @@ cf keyview
|
|
|
213
219
|
- Useful for viewing your key without generating a new one
|
|
214
220
|
- Shows the same registration instructions as `cf keygen`
|
|
215
221
|
|
|
216
|
-
### Configure
|
|
222
|
+
### Configure SFTP Credentials
|
|
217
223
|
|
|
218
224
|
```bash
|
|
219
225
|
cf config
|
|
@@ -221,8 +227,35 @@ cf config
|
|
|
221
227
|
|
|
222
228
|
- Prompts for your SFTP username and key path
|
|
223
229
|
- Defaults to `~/.ssh/chipfoundry-key`
|
|
230
|
+
- Credentials are saved to `~/.chipfoundry-cli/config.toml`
|
|
224
231
|
- Only needs to be run once per user/machine
|
|
225
232
|
|
|
233
|
+
### Platform Login
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
cf login
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
- Opens your default browser to the platform login page
|
|
240
|
+
- After authenticating, the CLI automatically receives your API key
|
|
241
|
+
- Required before `cf init`, `cf link`, `cf push`, `cf pull`, `cf confirm`
|
|
242
|
+
|
|
243
|
+
### Check Current User
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
cf whoami
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
- Displays the currently authenticated user (name and email)
|
|
250
|
+
|
|
251
|
+
### Logout
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
cf logout
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
- Removes your stored API key from the local config
|
|
258
|
+
|
|
226
259
|
### Initialize a New Project
|
|
227
260
|
|
|
228
261
|
```bash
|
|
@@ -242,11 +275,33 @@ cf init [--project-root DIRECTORY]
|
|
|
242
275
|
**What it does:**
|
|
243
276
|
- **Smart defaults**: Auto-detects project name from directory and project type from GDS files
|
|
244
277
|
- **Interactive prompts**: Shows detected values in prompts for easy acceptance
|
|
278
|
+
- **Shuttle selection**: Prompts to select an available shuttle (sorted by nearest deadline)
|
|
279
|
+
- **Platform registration**: Creates the project on the platform and links it automatically
|
|
245
280
|
- Creates `.cf/project.json` with project metadata
|
|
246
281
|
|
|
247
282
|
> [!NOTE]
|
|
248
283
|
> GDS hash is generated during `push`, not `init`
|
|
249
284
|
|
|
285
|
+
### Link an Existing Project
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
cf link
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
- Lists your platform projects and prompts you to select one
|
|
292
|
+
- Stores the `platform_project_id` in `.cf/project.json`
|
|
293
|
+
- Required for `cf push` and `cf pull` to sync with the platform
|
|
294
|
+
- Use this when you have a local project and an existing platform project to connect them
|
|
295
|
+
|
|
296
|
+
### Unlink a Project
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
cf unlink
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
- Removes the platform link from the current project
|
|
303
|
+
- The project remains on the platform but push/pull will no longer sync
|
|
304
|
+
|
|
250
305
|
### Setup a ChipFoundry Project
|
|
251
306
|
|
|
252
307
|
```bash
|
|
@@ -535,19 +590,24 @@ cf verify counter_la --dry-run
|
|
|
535
590
|
cf push [OPTIONS]
|
|
536
591
|
```
|
|
537
592
|
|
|
593
|
+
**Prerequisites:** `cf login`, `cf link` (or `cf init`), `cf config`
|
|
594
|
+
|
|
538
595
|
**Options:**
|
|
539
596
|
- `--project-root`: Specify project directory
|
|
540
597
|
- `--force-overwrite`: Overwrite existing files on SFTP
|
|
598
|
+
- `--submit`: Submit the project for review after upload
|
|
541
599
|
- `--dry-run`: Preview what would be uploaded
|
|
542
600
|
- `--sftp-username`: Override configured username
|
|
543
601
|
- `--sftp-key`: Override configured key path
|
|
544
602
|
|
|
545
603
|
**What happens:**
|
|
546
|
-
1.
|
|
547
|
-
2.
|
|
548
|
-
3.
|
|
549
|
-
4.
|
|
550
|
-
5.
|
|
604
|
+
1. Verifies the project is linked to the platform and you are logged in
|
|
605
|
+
2. Collects required project files
|
|
606
|
+
3. Auto-detects project type from GDS file
|
|
607
|
+
4. Updates project configuration and GDS hash
|
|
608
|
+
5. Uploads files to SFTP with progress bars
|
|
609
|
+
6. Syncs `project.json` data to the platform (GDS hash, version, project ID, slot number)
|
|
610
|
+
7. If `--submit` is used, submits the project for admin review
|
|
551
611
|
|
|
552
612
|
**GDS File Handling:**
|
|
553
613
|
- **Both compressed (`.gz`) and uncompressed (`.gds`) files are supported**
|
|
@@ -562,9 +622,12 @@ cf push [OPTIONS]
|
|
|
562
622
|
cf pull [--project-name NAME]
|
|
563
623
|
```
|
|
564
624
|
|
|
625
|
+
**Prerequisites:** `cf login`, `cf link` (or `cf init`), `cf config`
|
|
626
|
+
|
|
565
627
|
- Downloads project results from SFTP server
|
|
566
628
|
- Saves to `sftp-output/<project_name>/`
|
|
567
|
-
- **Automatically updates** your local `.cf/project.json` with the pulled version
|
|
629
|
+
- **Automatically updates** your local `.cf/project.json` with the pulled version (preserving the platform link)
|
|
630
|
+
- **Syncs with the platform** and displays admin review notes if your project has been reviewed
|
|
568
631
|
- Creates the expected directory structure:
|
|
569
632
|
```
|
|
570
633
|
sftp-output/
|
|
@@ -581,8 +644,10 @@ cf pull [--project-name NAME]
|
|
|
581
644
|
cf confirm [OPTIONS]
|
|
582
645
|
```
|
|
583
646
|
|
|
647
|
+
**Prerequisites:** `cf login`, `cf link` (or `cf init`), `cf config`
|
|
648
|
+
|
|
584
649
|
- **Confirms your final tapeout** by setting `submission_state` to "Final"
|
|
585
|
-
- **Uploads
|
|
650
|
+
- **Uploads the project.json** to the SFTP server and **confirms on the platform**
|
|
586
651
|
- **Use this when you're ready to send your current GDS file to the foundry** for tapeout processing
|
|
587
652
|
- **Options:**
|
|
588
653
|
- `--project-root`: Specify project directory
|
|
@@ -612,8 +677,8 @@ cf view-tapeout-report [--project-name NAME] [--report-path PATH]
|
|
|
612
677
|
cf status
|
|
613
678
|
```
|
|
614
679
|
|
|
615
|
-
-
|
|
616
|
-
-
|
|
680
|
+
- Shows project status from the platform, including shuttle details and deadlines
|
|
681
|
+
- Lists projects on the SFTP server with input/output status
|
|
617
682
|
- Displays project status in a clean table format
|
|
618
683
|
|
|
619
684
|
### Repository Management
|
|
@@ -691,23 +756,30 @@ The CLI tracks your project submission state through the `submission_state` fiel
|
|
|
691
756
|
|
|
692
757
|
### Recommended Workflow
|
|
693
758
|
|
|
694
|
-
1. **
|
|
759
|
+
1. **Setup Phase:**
|
|
760
|
+
```bash
|
|
761
|
+
cf login # Authenticate with the platform
|
|
762
|
+
cf keygen # Generate SSH key (if needed)
|
|
763
|
+
cf config # Set SFTP credentials
|
|
764
|
+
cf init # Initialize project, register on platform, select shuttle
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
2. **Development Phase:**
|
|
695
768
|
```bash
|
|
696
|
-
cf
|
|
697
|
-
cf push # Upload project files (state remains "Draft")
|
|
769
|
+
cf push # Upload files + sync with platform (state remains "Draft")
|
|
698
770
|
# ... make changes to your project ...
|
|
699
|
-
cf push
|
|
771
|
+
cf push --force-overwrite # Upload updated files
|
|
700
772
|
```
|
|
701
773
|
|
|
702
|
-
|
|
774
|
+
3. **Review Phase:**
|
|
703
775
|
```bash
|
|
704
|
-
cf pull # Download results
|
|
776
|
+
cf pull # Download results + view admin review notes
|
|
705
777
|
cf view-tapeout-report # Review the tapeout report (if available)
|
|
706
778
|
```
|
|
707
779
|
|
|
708
|
-
|
|
780
|
+
4. **Final Tapeout Confirmation:**
|
|
709
781
|
```bash
|
|
710
|
-
cf confirm # Confirm
|
|
782
|
+
cf confirm # Confirm on platform, send GDS to foundry
|
|
711
783
|
```
|
|
712
784
|
|
|
713
785
|
> [!IMPORTANT]
|
|
@@ -740,10 +812,14 @@ The CLI tracks your project submission state through the `submission_state` fiel
|
|
|
740
812
|
- Connects to the SFTP server securely
|
|
741
813
|
- Creates project directory structure
|
|
742
814
|
- Uploads files with progress indicators
|
|
743
|
-
- Shows clean, minimal output
|
|
744
815
|
|
|
745
|
-
4. **
|
|
746
|
-
-
|
|
816
|
+
4. **Platform Sync:**
|
|
817
|
+
- Sends the full `project.json` to the platform
|
|
818
|
+
- Updates GDS hash, project version, project ID, and slot number
|
|
819
|
+
- Records the push timestamp on the platform
|
|
820
|
+
|
|
821
|
+
5. **Success:**
|
|
822
|
+
- Displays confirmation with project location and sync status
|
|
747
823
|
|
|
748
824
|
---
|
|
749
825
|
|
|
@@ -759,11 +835,15 @@ The CLI tracks your project submission state through the `submission_state` fiel
|
|
|
759
835
|
- Saves to `sftp-output/<project_name>/`
|
|
760
836
|
|
|
761
837
|
3. **Config Update:**
|
|
762
|
-
- **Automatically
|
|
763
|
-
|
|
838
|
+
- **Automatically merges** the pulled `project.json` with your local version (preserving the platform link)
|
|
839
|
+
|
|
840
|
+
4. **Platform Sync:**
|
|
841
|
+
- Sends the updated `project.json` to the platform
|
|
842
|
+
- Records the pull timestamp on the platform
|
|
843
|
+
- Fetches and displays any admin review notes
|
|
764
844
|
|
|
765
|
-
|
|
766
|
-
- Shows confirmation of downloaded files and
|
|
845
|
+
5. **Success:**
|
|
846
|
+
- Shows confirmation of downloaded files, sync status, and review notes
|
|
767
847
|
|
|
768
848
|
---
|
|
769
849
|
|
|
@@ -774,7 +854,7 @@ The CLI tracks your project submission state through the `submission_state` fiel
|
|
|
774
854
|
```bash
|
|
775
855
|
# Generate SSH key and register it
|
|
776
856
|
cf keygen
|
|
777
|
-
# Copy the displayed key to https://chipfoundry.io/
|
|
857
|
+
# Copy the displayed key to https://platform.chipfoundry.io/ssh-key
|
|
778
858
|
|
|
779
859
|
# Configure your account
|
|
780
860
|
cf config
|
|
@@ -860,11 +940,19 @@ gds/user_project_wrapper.gds.gz # ← Remove this one
|
|
|
860
940
|
- **Missing files:**
|
|
861
941
|
- The tool will error out if required files are missing or if more than one GDS type is present
|
|
862
942
|
|
|
863
|
-
- **
|
|
943
|
+
- **Platform authentication errors:**
|
|
944
|
+
- Run `cf login` to re-authenticate
|
|
945
|
+
- Run `cf whoami` to verify your login status
|
|
946
|
+
|
|
947
|
+
- **SFTP authentication errors:**
|
|
864
948
|
- Run `cf keygen` to generate a new key
|
|
865
|
-
- Ensure your key is registered at [https://chipfoundry.io/
|
|
949
|
+
- Ensure your key is registered at [https://platform.chipfoundry.io/ssh-key](https://platform.chipfoundry.io/ssh-key)
|
|
866
950
|
- Check your username with `cf config`
|
|
867
951
|
|
|
952
|
+
- **"Project is not linked to the platform":**
|
|
953
|
+
- Run `cf link` to connect this project to a platform project
|
|
954
|
+
- Or run `cf init` to create a new platform project
|
|
955
|
+
|
|
868
956
|
- **SFTP errors:**
|
|
869
957
|
- Check your network connection
|
|
870
958
|
- Verify your credentials with `cf config`
|