chipfoundry-cli


Namechipfoundry-cli JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://chipfoundry.io
SummaryCLI tool to automate ChipFoundry project submission to SFTP server
upload_time2025-07-16 20:30:27
maintainerNone
docs_urlNone
authorChipFoundry
requires_python>=3.8.0
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ChipFoundry CLI (`cf-cli`)

A command-line tool to automate the submission of ChipFoundry projects to the SFTP server.

---

## Overview

`cf-cli` is a user-friendly command-line tool for securely submitting your ChipFoundry project files to the official SFTP server. It automatically collects the required files, generates or updates your project configuration, and uploads everything to the correct location on the server.

---

## Installation

Install from PyPI:

```bash
pip install chipfoundry-cli
chipfoundry --help
```

---

## Project Structure Requirements

Your project directory **must** contain:

- `gds/` directory with **one** of the following:
  - `user_project_wrapper.gds` (for digital projects)
  - `user_analog_project_wrapper.gds` (for analog projects)
  - `openframe_project_wrapper.gds` (for openframe projects)
- `verilog/rtl/user_defines.v` (required for digital/analog)
- `.cf/project.json` (optional; will be created/updated automatically)

**Example:**
```
my_project/
├── gds/
│   └── user_project_wrapper.gds
├── verilog/
│   └── rtl/
│       └── user_defines.v
└── .cf/
    └── project.json
```

---

## Authentication

- By default, the tool will look for an SSH key at `~/.ssh/id_rsa`.
- You can specify a different key with `--sftp-key`.
- If no key is found, you will be prompted to enter a key path or your SFTP password.
- Your SFTP username is required (provided by ChipFoundry).

---

## SFTP Server

- The default SFTP server is `sftp.chipfoundry.io` (no need to specify unless you want to override).

---

## Usage

### Configure User Credentials

```bash
chipfoundry config
```
- Prompts for your SFTP username and key path. Only needs to be run once per user/machine.

### Initialize a New Project

```bash
chipfoundry init
```
- Prompts for project name, type (auto-detected from GDS file if present), and version.
- Creates `.cf/project.json` in the current directory.
- **Note:** The GDS hash is NOT generated at this step (see below).

### Push a Project (Upload)

```bash
chipfoundry push
```
- Run from your project directory (with `.cf/project.json`).
- Collects files, updates the GDS hash, and uploads to SFTP.

### Pull Results

```bash
chipfoundry pull
```
- Downloads results for the current project to a local directory.

### Check Status

```bash
chipfoundry status
```
- Shows all your projects and their input/output status on the SFTP server.

---

## How the GDS Hash Works

- The `user_project_wrapper_hash` in `.cf/project.json` is **automatically generated and updated during `push`**.
- The hash is calculated from the actual GDS file being uploaded.
- This ensures the hash always matches the file you are submitting.
- **You do not need to manage or update the hash manually.**
- The hash is NOT generated during `init` because the GDS file may not exist or may change before submission.

---

## What Happens When You Run `chipfoundry push`?

1. **File Collection:**
   - The tool checks for the required GDS and Verilog files.
   - It auto-detects your project type (digital, analog, openframe) based on the GDS file name.
2. **Configuration:**
   - If `.cf/project.json` does not exist, it is created.
   - The tool updates the GDS hash and any fields you override via CLI.
3. **SFTP Upload:**
   - Connects to the SFTP server as your user.
   - Ensures the directory `incoming/projects/<project_name>` exists.
   - Uploads `.cf/project.json`, the GDS file, and `verilog/rtl/user_defines.v` (if present).
   - Shows a progress bar for each file upload.
4. **Success:**
   - You’ll see a green success message when all files are uploaded.

---

## Troubleshooting

- **Missing files:**
  - The tool will error out if required files are missing or if more than one GDS type is present.
- **Authentication errors:**
  - Make sure your SSH key is valid and registered with ChipFoundry, or use your password.
- **SFTP errors:**
  - Check your network connection and credentials.
- **Project type detection:**
  - Only one of the recognized GDS files should be present in your `gds/` directory.
- **ModuleNotFoundError: No module named 'toml':**
  - This means your environment is missing the `toml` dependency. Upgrade `chipfoundry-cli` with `pip install --upgrade chipfoundry-cli`, or install `toml` manually with `pip install 'toml>=0.10,<1.0'`.

---

## Support

- For help, contact info@chipfoundry.io or visit [chipfoundry.io](https://chipfoundry.io)
- For bug reports or feature requests, open an issue on [GitHub](https://github.com/chipfoundry/cf-cli)


            

Raw data

            {
    "_id": null,
    "home_page": "https://chipfoundry.io",
    "name": "chipfoundry-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8.0",
    "maintainer_email": null,
    "keywords": null,
    "author": "ChipFoundry",
    "author_email": "marwan.abbas@chipfoundry.io",
    "download_url": "https://files.pythonhosted.org/packages/e6/a7/678f1f36053eb46f2be120d34c70ead2524f7caf3497cfdf1ad550f01923/chipfoundry_cli-0.1.3.tar.gz",
    "platform": null,
    "description": "# ChipFoundry CLI (`cf-cli`)\n\nA command-line tool to automate the submission of ChipFoundry projects to the SFTP server.\n\n---\n\n## Overview\n\n`cf-cli` is a user-friendly command-line tool for securely submitting your ChipFoundry project files to the official SFTP server. It automatically collects the required files, generates or updates your project configuration, and uploads everything to the correct location on the server.\n\n---\n\n## Installation\n\nInstall from PyPI:\n\n```bash\npip install chipfoundry-cli\nchipfoundry --help\n```\n\n---\n\n## Project Structure Requirements\n\nYour project directory **must** contain:\n\n- `gds/` directory with **one** of the following:\n  - `user_project_wrapper.gds` (for digital projects)\n  - `user_analog_project_wrapper.gds` (for analog projects)\n  - `openframe_project_wrapper.gds` (for openframe projects)\n- `verilog/rtl/user_defines.v` (required for digital/analog)\n- `.cf/project.json` (optional; will be created/updated automatically)\n\n**Example:**\n```\nmy_project/\n\u251c\u2500\u2500 gds/\n\u2502   \u2514\u2500\u2500 user_project_wrapper.gds\n\u251c\u2500\u2500 verilog/\n\u2502   \u2514\u2500\u2500 rtl/\n\u2502       \u2514\u2500\u2500 user_defines.v\n\u2514\u2500\u2500 .cf/\n    \u2514\u2500\u2500 project.json\n```\n\n---\n\n## Authentication\n\n- By default, the tool will look for an SSH key at `~/.ssh/id_rsa`.\n- You can specify a different key with `--sftp-key`.\n- If no key is found, you will be prompted to enter a key path or your SFTP password.\n- Your SFTP username is required (provided by ChipFoundry).\n\n---\n\n## SFTP Server\n\n- The default SFTP server is `sftp.chipfoundry.io` (no need to specify unless you want to override).\n\n---\n\n## Usage\n\n### Configure User Credentials\n\n```bash\nchipfoundry config\n```\n- Prompts for your SFTP username and key path. Only needs to be run once per user/machine.\n\n### Initialize a New Project\n\n```bash\nchipfoundry init\n```\n- Prompts for project name, type (auto-detected from GDS file if present), and version.\n- Creates `.cf/project.json` in the current directory.\n- **Note:** The GDS hash is NOT generated at this step (see below).\n\n### Push a Project (Upload)\n\n```bash\nchipfoundry push\n```\n- Run from your project directory (with `.cf/project.json`).\n- Collects files, updates the GDS hash, and uploads to SFTP.\n\n### Pull Results\n\n```bash\nchipfoundry pull\n```\n- Downloads results for the current project to a local directory.\n\n### Check Status\n\n```bash\nchipfoundry status\n```\n- Shows all your projects and their input/output status on the SFTP server.\n\n---\n\n## How the GDS Hash Works\n\n- The `user_project_wrapper_hash` in `.cf/project.json` is **automatically generated and updated during `push`**.\n- The hash is calculated from the actual GDS file being uploaded.\n- This ensures the hash always matches the file you are submitting.\n- **You do not need to manage or update the hash manually.**\n- The hash is NOT generated during `init` because the GDS file may not exist or may change before submission.\n\n---\n\n## What Happens When You Run `chipfoundry push`?\n\n1. **File Collection:**\n   - The tool checks for the required GDS and Verilog files.\n   - It auto-detects your project type (digital, analog, openframe) based on the GDS file name.\n2. **Configuration:**\n   - If `.cf/project.json` does not exist, it is created.\n   - The tool updates the GDS hash and any fields you override via CLI.\n3. **SFTP Upload:**\n   - Connects to the SFTP server as your user.\n   - Ensures the directory `incoming/projects/<project_name>` exists.\n   - Uploads `.cf/project.json`, the GDS file, and `verilog/rtl/user_defines.v` (if present).\n   - Shows a progress bar for each file upload.\n4. **Success:**\n   - You\u2019ll see a green success message when all files are uploaded.\n\n---\n\n## Troubleshooting\n\n- **Missing files:**\n  - The tool will error out if required files are missing or if more than one GDS type is present.\n- **Authentication errors:**\n  - Make sure your SSH key is valid and registered with ChipFoundry, or use your password.\n- **SFTP errors:**\n  - Check your network connection and credentials.\n- **Project type detection:**\n  - Only one of the recognized GDS files should be present in your `gds/` directory.\n- **ModuleNotFoundError: No module named 'toml':**\n  - This means your environment is missing the `toml` dependency. Upgrade `chipfoundry-cli` with `pip install --upgrade chipfoundry-cli`, or install `toml` manually with `pip install 'toml>=0.10,<1.0'`.\n\n---\n\n## Support\n\n- For help, contact info@chipfoundry.io or visit [chipfoundry.io](https://chipfoundry.io)\n- For bug reports or feature requests, open an issue on [GitHub](https://github.com/chipfoundry/cf-cli)\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "CLI tool to automate ChipFoundry project submission to SFTP server",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://chipfoundry.io",
        "Repository": "https://github.com/chipfoundry/cf-cli"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3c53e5765e509354b0d846672937fd538cb14ae1f17ef5f75cb1ca2e09092c2d",
                "md5": "8f9953e3661ae6ba389c3f1d4e61ede2",
                "sha256": "6b41a54df65b04e65eca31751c4384462a88919c6cce4aa6762397bade7c2d61"
            },
            "downloads": -1,
            "filename": "chipfoundry_cli-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8f9953e3661ae6ba389c3f1d4e61ede2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0",
            "size": 14833,
            "upload_time": "2025-07-16T20:30:26",
            "upload_time_iso_8601": "2025-07-16T20:30:26.920020Z",
            "url": "https://files.pythonhosted.org/packages/3c/53/e5765e509354b0d846672937fd538cb14ae1f17ef5f75cb1ca2e09092c2d/chipfoundry_cli-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e6a7678f1f36053eb46f2be120d34c70ead2524f7caf3497cfdf1ad550f01923",
                "md5": "945c57fb557bc094c65c90a12c232226",
                "sha256": "8ce53531b0f775a22695d0cb18690651d9f7289e1eb449ba920cc3902f14d7f8"
            },
            "downloads": -1,
            "filename": "chipfoundry_cli-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "945c57fb557bc094c65c90a12c232226",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0",
            "size": 14461,
            "upload_time": "2025-07-16T20:30:27",
            "upload_time_iso_8601": "2025-07-16T20:30:27.783403Z",
            "url": "https://files.pythonhosted.org/packages/e6/a7/678f1f36053eb46f2be120d34c70ead2524f7caf3497cfdf1ad550f01923/chipfoundry_cli-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-16 20:30:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chipfoundry",
    "github_project": "cf-cli",
    "github_not_found": true,
    "lcname": "chipfoundry-cli"
}
        
Elapsed time: 0.90551s