revitcli 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global revitcli --version 0.2.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local revitcli --version 0.2.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=revitcli&version=0.2.1
                    
nuke :add-package revitcli --version 0.2.1
                    

APS Revit Automation CLI

platforms .net Design-Automation license

A .NET 10 CLI tool that wraps the Autodesk Platform Services Automation API for Revit. Define a single YAML configuration file describing your inputs and outputs, then run revit run ./job.yaml — the CLI handles AppBundle packaging and upload, Activity creation, WorkItem submission, polling, and output downloads automatically.

Note: This project was built with Claude Code.

thumbnail

https://github.com/user-attachments/assets/28713419-1590-48a3-9a72-a14ef1725430

Commands

revit run <yaml-file>

Executes a complete Revit automation job:

  1. Validates the YAML configuration
  2. Authenticates (2-legged for setup, 3-legged for model access)
  3. Packages and uploads the AppBundle (skips upload if unchanged)
  4. Creates or updates the Activity
  5. Submits and polls the WorkItem
  6. Downloads outputs on success
revit run ./job.yaml

revit update <yaml-file>

Force-uploads the AppBundle and creates or updates the Activity without submitting a WorkItem. Unlike revit run, which skips the upload when the AppBundle hash is unchanged, revit update always uploads — useful for pushing updated plugin code without running a full job. Run revit run afterward to execute the updated bundle.

revit update ./job.yaml

revit validate <yaml-file>

Validates a YAML configuration file without running the job. Checks YAML syntax, required fields, and verifies that app.path exists on disk.

revit validate ./job.yaml

revit auth login

Prompts for your APS clientId and clientSecret, then starts a browser-based 3-legged OAuth login flow. Credentials and tokens are cached in ~/.revit-cli/tokens.json and refreshed automatically on subsequent runs, so they never need to appear in your job.yaml.

revit auth login

revit auth status

Shows the current authentication token status (valid, expired, or missing) and expiry time.

revit auth status

YAML Configuration

Note Credentials are not stored in job.yaml. Authenticate once with revit auth login; your clientId, clientSecret, and tokens are cached in ~/.revit-cli/tokens.json.

See examples/job.yaml for a complete example.

Field Required Description
revit.version Yes Revit version: latest, 2022, 2023, 2024, 2025, 2026, or 2027. latest resolves to 2027.
app.name Yes Unique name for the AppBundle and Activity. Must not contain hyphens (the Design Automation API rejects hyphenated AppBundle ids).
app.description No Optional description
app.path Yes Path to the local AppBundle folder (must contain exactly one .bundle subfolder)
environment No Alias applied to the AppBundle and Activity. Must be dev or prod. Defaults to prod.
inputs.model.type Yes Must be cloudWorksharedModel
inputs.model.folderUrl Yes ACC browser URL to the folder containing the model
inputs.model.modelName Yes Name of the Revit model (without .rvt extension)
inputs.model.save No Whether to save/sync the Revit model after processing. Default: true. Set to false for read-only operations.
inputs.model.openOption No Workset open behavior. One of: OpenAllWorksets (default), CloseAllWorksets, CloseWorksetsWithRevitLinks.
inputs.tool.name No Tool identifier passed to the AppBundle (emitted as toolName in revitmodel.json).
inputs.tool.inputs No Path to a local JSON file delivered to the AppBundle as toolinputs.json. If absent, toolinputs.json receives {}.
outputs.result.type No Output type (e.g., file). Required only if outputs.result.path is set. Omit the entire outputs section to skip output bucket creation and download.
outputs.result.path No Local path where the output file will be downloaded. Required only if outputs.result.type is set.

AppBundle ZIP Structure

The app.path directory must contain exactly one .bundle subfolder. The CLI zips this directory automatically and computes a SHA-256 hash to skip redundant uploads on repeated runs.

my-appbundle/
  MyPlugin.bundle/
    Contents/
      MyPlugin.dll
      MyPlugin.addin
      PackageContents.xml

Development

Prerequisites

Installation

Requires the .NET 10 SDK.

dotnet tool install -g revitcli

Update to the latest version:

dotnet tool update -g revitcli

Uninstall:

dotnet tool uninstall -g revitcli
Option B — self-contained binary (no SDK required)

Download the latest ZIP for your architecture from GitHub Releases:

  • revit-win-x64-v*.zip — Windows x64
  • revit-win-arm64-v*.zip — Windows ARM64

Extract the ZIP and add the folder to your PATH.

Known Limitations

This tool only supports Windows (win-x64 and win-arm64). Linux and macOS are not supported.

Troubleshooting

Please contact us via https://aps.autodesk.com/en/support/get-help.

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for more details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.3.0 159 6/23/2026
0.2.1 127 6/17/2026
0.2.0 114 6/17/2026