Skip to content
Flying Animal

APSBot CLI First Release

🕒 Published at:

Introduction

Last week, I released the first version of APSBot CLI. This tool is designed to help you easier to explore Autodesk Platform Services and data with ease. Today, I will share with you how to use APSBot CLI and what you can expect from it. I hope you find it useful.

Why I'm created it ? I know that Autodesk created tool call Forge Command Line Interface long time ago, but I don't use it for any explore, because I can't find the reason to use it, and then this is some point give me have motivation to create APSBot CLI:

  • The APS Cli must be simple and easy to use.

  • The APS Cli must be able to view data by easy way.

  • The APS Cli can able to interact with AI to do some analysis.

  • I want the user can install and use in any platform, so python maybe the best choice.

Features

  • Interactive with data by Command Line Interface(CLI)
  • Snooping Data Around Autodesk Services (Hubs, Projects, Items, Versions, Folders, Buckets, etc.)
  • Analyzing Revit Data
  • Chat With AI Bot (OpenAI) to do data analysis and have fun.

Installation

  • Install python version 3.9 or higher
  • Install python package from pypi
bash
pip install apsbot --upgrade --user

Requirements

Setup environment variables

bash
APS_CLIENT_ID = "your_client_id"
APS_CLIENT_SECRET = "your_client_secret"
OPENAI_API_KEY = "your_openai_api_key"

How it works ?

The image below shows the workflow of APSBot CLI:

  • Authenticate: This step is to authenticate with Autodesk Platform Services, in case not at the first time, the token will be saved in the local file and then use it for the next time, in case the token is expired, the CLI will refresh it automatically.

  • Config : It is part to help rememeber the input data for the next time, meaning that you don't need to input the same data again.

  • Folder Configuration : This is the place to store the configuration data for the CLI, the output data comand just show you nessessary data, but data save at local folder will have more detail and information. Next, the folder will be use for Chat with AI Bot as a data source knowledge base.

Usage

  • Command apsbot in terminal or command prompt to start :
apsbot
apsbot
bash
apsbot [OPTIONS] COMMAND [ARGS]...
  • Without setting path configuration
bash
python -m apsbot [OPTIONS] COMMAND [ARGS]...

Notes : use prefix command python -m when your computer can't find the apsbot command.

Hubs - Projects

Let's start with hubs and projects command to list all hubs in your account.

bash
apsbot hubs
bash
apsbot projects

Bucket

With bucket command, you can epxlore around the commands to interact with bucket in Forge Data Management API. For example:

  • List all buckets in your account - apsbot buckets
  • Create new bucket - apsbot bucket-create
  • Delete bucket - bucket-delete-object
  • Upload file to bucket - bucket-upload-file
  • ...

Revit Data Explorer

Let's try explore data by categories and parameters in Revit Data.

bash
apsbot revit data-revit-by-cats-params

Chat With AI Bot

Let's chat with bot to ask about what is bim, what the hell of data in Revit, etc.

Let's see the detail video to see how we can intergrate with data and ask some question :

Disclaimer

This is project just play for fun with free time weekend. Please use it at your own risk. I am not responsible for any damage caused by this project.

References

Github Repository : APSBot

I saw a new repository from Autodesk aps-cli, may be it will be useful for you.

I have a lot of inspiration from this topic :