{"id":15059767,"url":"https://github.com/petrbroz/forge-cli-utils","last_synced_at":"2025-04-10T05:42:22.473Z","repository":{"id":34908208,"uuid":"181969307","full_name":"petrbroz/forge-cli-utils","owner":"petrbroz","description":"Command line tools for Autodesk Forge services.","archived":false,"fork":false,"pushed_at":"2023-03-04T03:45:18.000Z","size":1653,"stargazers_count":18,"open_issues_count":6,"forks_count":7,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-24T06:54:40.061Z","etag":null,"topics":["autodesk","cli","forge","nodejs"],"latest_commit_sha":null,"homepage":"https://petrbroz.github.io/forge-cli-utils","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petrbroz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-17T21:14:44.000Z","updated_at":"2024-07-24T05:24:15.000Z","dependencies_parsed_at":"2024-06-21T14:07:14.313Z","dependency_job_id":"e8553a67-c710-48c3-a658-462ef3f61353","html_url":"https://github.com/petrbroz/forge-cli-utils","commit_stats":{"total_commits":132,"total_committers":5,"mean_commits":26.4,"dds":0.4015151515151515,"last_synced_commit":"a61098e6781c3025a745fd95c778a08f30bb125a"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrbroz%2Fforge-cli-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrbroz%2Fforge-cli-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrbroz%2Fforge-cli-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrbroz%2Fforge-cli-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petrbroz","download_url":"https://codeload.github.com/petrbroz/forge-cli-utils/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248102003,"owners_count":21048083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autodesk","cli","forge","nodejs"],"created_at":"2024-09-24T22:47:31.463Z","updated_at":"2025-04-10T05:42:22.449Z","avatar_url":"https://github.com/petrbroz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# forge-cli-utils\n\n[![build status](https://travis-ci.com/petrbroz/forge-cli-utils.svg?branch=master)](https://travis-ci.com/petrbroz/forge-cli-utils)\n[![npm version](https://badge.fury.io/js/forge-cli-utils.svg)](https://badge.fury.io/js/forge-cli-utils)\n![node](https://img.shields.io/node/v/forge-cli-utils.svg)\n![npm downloads](https://img.shields.io/npm/dw/forge-cli-utils.svg)\n![platforms](https://img.shields.io/badge/platform-windows%20%7C%20osx%20%7C%20linux-lightgray.svg)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\nCommand line tools for Autodesk Forge services.\n\n[![asciicast](https://asciinema.org/a/244057.svg)](https://asciinema.org/a/244057)\n\n## Installation\n\n### Using npm\n\nInstall the `forge-cli-utils` library, either in your own npm project\n(`npm install --save forge-cli-utils`), or globally (`npm install --global forge-cli-utils`).\n\n### Self-contained binaries\n\nScripts in this library are also packaged into self-contained binaries for various platforms\nusing the [pkg](https://www.npmjs.com/package/pkg) module. You can download the binaries from\n[release](https://github.com/petrbroz/forge-cli-utils/releases) pages.\n\n## Usage\n\n### Providing Forge credentials\n\nThe CLI tools require Forge app credentials to be provided as env. variables.\n\n\u003e If you don't have a Forge app yet, check out this tutorial: https://forge.autodesk.com/en/docs/oauth/v2/tutorials/create-app/.\n\nOn macOS and linux:\n```bash\nexport FORGE_CLIENT_ID=\u003cyour client id\u003e\nexport FORGE_CLIENT_SECRET=\u003cyour client secret\u003e\n```\n\nOn Windows, using _cmd.exe_:\n```\nset FORGE_CLIENT_ID=\u003cyour client id\u003e\nset FORGE_CLIENT_SECRET=\u003cyour client secret\u003e\n```\n\nOn Windows, using PowerShell:\n```powershell\n$env:FORGE_CLIENT_ID = \"\u003cyour client id\u003e\"\n$env:FORGE_CLIENT_SECRET = \"\u003cyour client secret\u003e\"\n```\n\n### Scripts\n\nUse the following scripts for different Forge services:\n  - `forge-dm` - [Forge Data Management](https://forge.autodesk.com/en/docs/data/v2) service\n  - `forge-md` - [Forge Model Derivative](https://forge.autodesk.com/en/docs/model-derivative/v2) service\n  - `forge-da` - [Forge Design Automation](https://forge.autodesk.com/en/docs/design-automation/v3) service\n\nEach script expects a _subcommand_ similar to `git`. To get a list of all available commands,\nrun the script with `-h` or `--help`.\n\n\u003e When using bash, use the _tools/autocomplete-bash.sh_ script to setup a simple auto-completion\n\u003e for the basic commands of each script: `source tools/autocomplete-bash.sh`.\n\nMost commands output raw JSON output from Forge services by default, but in many cases\nyou can use `-s` or `--short` flag to output a more concise version of the results.\nThe raw JSON output can also be combined with tools like [jq](https://stedolan.github.io/jq)\nto extract just the pieces of information that you need:\n\n```bash\n# Listing buckets as full JSON\nforge-dm list-buckets\n\n# Listing bucket keys\nforge-dm list-buckets --short\n\n# List creation dates of all buckets\nforge-dm list-buckets | jq '.[] | .createdDate'\n```\n\n### Examples\n\n#### Data Management\n\n```bash\n# Listing buckets as full JSON\nforge-dm list-buckets\n\n# Listing object IDs of specific bucket\nforge-dm list-objects my-test-bucket --short\n\n# Listing object IDs without specifying a bucket (will show an interactive prompt with list of buckets to choose from)\nforge-dm list-objects --short\n\n# Getting an URN of an object\nforge-dm object-urn my-bucket-key my-object-key\n```\n\n#### Design Automation\n\n```bash\n# Creating a new app bundle\nforge-da create-appbundle BundleName path/to/bundle/zipfile Autodesk.Inventor+23 \"Bundle description here.\"\n\n# Updating existing activity\nforge-da update-activity ActivityName BundleName BundleAlias Autodesk.Inventor+23 --input PartFile --output Thumbnail --output-local-name thumbnail.bmp\n\n# Creating work item\nforge-da create-workitem ActivityName ActivityAlias --input PartFile --input-url https://some.url --output Thumbnail --output-url https://another.url --short\n```\n\n\u003e When specifying inputs and outputs for an activity or work item, `--input-*` and `--output-*` arguments\n\u003e are always applied to the last input/output ID. For example, consider the following sequence of arguments:\n\u003e `--input InputA --input-local-name house.rvt --input InputB --input InputC --input-url https://foobar.com`.\n\u003e Such a sequence will define three inputs: _InputA_ with local name _house.rvt_, _InputB_ (with no additional\n\u003e properties), and _InputC_ with URL _https://foobar.com_.\n\u003e For more details, see https://github.com/petrbroz/forge-cli-utils/wiki/Design-Automation-Inputs-and-Outputs\n\n#### Model Derivative\n\n```bash\n# Translating a model based on its URN\nforge-md translate dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cG9jLWJvdXlndWVzLWltbW9iaWxpZXIvaW5wdXQucnZ0\n\n# Showing an interactive prompt with all viewables in an URN, and then getting properties of the selected viewable\nforge-md get-viewable-props dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cG9jLWJvdXlndWVzLWltbW9iaWxpZXIvaW5wdXQucnZ0\n\n# Download the derivatives once translation is completed, -u --guid \u003cGUIDs of derivatives to download, optional, separated by comma\u003e, -c --directory \u003cpath to save derivatives, optional\u003e\nforge-md download-derivatives dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cG9jLWJvdXlndWVzLWltbW9iaWxpZXIvaW5wdXQucnZ0 -c '/path/to/output/optional' -u 'cdcf63c6-6a67-ffd2-2a8e-1e31397052f7'\n```\n\n\u003e For additional examples, check out the _examples_ subfolder.\n\n## Additional Resources\n\n- blog post on auto-deploying Design Automation plugins from Visual Studio: https://forge.autodesk.com/blog/deploying-design-automation-visual-studio","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrbroz%2Fforge-cli-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetrbroz%2Fforge-cli-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrbroz%2Fforge-cli-utils/lists"}