Flow eXtension Define,它是一个被设计用于工作流(尤其是AI和自动化工作流)扩展的规范。"Flow eXtension Define" is a specification designed for extending workflows, especially AI and automation workflows.
https://github.com/easychen/fxd.git
Fxd stands for Flow eXtension Define, a specification designed for extending workflows, especially AI and automation workflows.
For example, if you need to monitor the latest articles from an RSS feed, translate them into Chinese, add images, and post them to your X platform, this task is not difficult for AI. However, due to the many steps involved, few tools can automate the entire process.
Using Fxd, we would first encapsulate the following Fxd Apps:
An example of posting to Weibo:
fxd weiboLive auth # Initial posting requires logging in through the browser, no need to manually log in each time
fxd weiboPublish --content="Hello there" --self_only="true" --format="json" --headless="false"
It can also be used directly in clients that comply with the FXD specification, such as the FlowDeer client.
This repo uses Yarn workspaces to manage multiple packages. Run in the root directory:
yarn install
Set-ExecutionPolicy RemoteSigned and choose YThen navigate to the command line directory
cd packages/fxd-cli
On Unix-like systems, use ./fxd in the directory as the command line tool:
# View help
./fxd core help
# View Demo app help
./fxd demo help
On Windows, manually add the node command prefix
# View help
node fxd core help
# View Demo app help
node fxd demo help
You can create a copy of the fxd-app-demo for modification and debugging. Once completed, publish it using npm publish fxd-app-your-app to make it available on all software supporting the FXD specification.
Starting from May 21, 2024, code generation for initializing an FXD app is introduced. The usage is as follows:
Configure environment variables:
DEFAULT_AI_CHAT_KEY: openai/api2d keyDEFAULT_AI_CHAT_BASEURL: https://api.openai.com or https://oa.api2d.netDEFAULT_AI_CHAT_MODEL: model, default to gpt-4o fxd-cli directory, run:
./fxd codegen
https://github.com/easychen/fxd/assets/1294760/c6f995f8-b5ae-4db4-9265-8d6ebb4b781c
Follow the prompts to complete the process.
By default, FlowDeer installs packages from the NPM site directly; however, we may need to debug before publishing. Here is a solution:
Since FlowDeer prioritizes local directories, we can run npm install <package-path> in the corresponding FlowDeer directory via the command line for local installation.
Specifically, for Mac systems:
cd /Applications/FlowDeer.app/Contents/Resources/app.asar.unpacked/src/local-api
npm install path/to/your/package
If you haven't installed FlowDeer in the Applications directory, please adjust the /Applications/FlowDeer.app part of the path accordingly.
For Windows systems:
cd <FlowDeer-directory>/resources/app.asar.unpacked/src/local-api
npm install path/to/your/package
After installation, simply add the package name in the FlowDeer interface.
The SDK, command line tools, and core packages of FXD are by default licensed under the PolyForm Noncommercial License. If the packages directory contains different licenses, the latter prevails.
Any code contributed to this project is considered authorized for commercial use by the project authors and their affiliated companies and distributed under this project's license (PolyForm Noncommercial License).
The PolyForm Noncommercial License allows you to modify this project and distribute it for any non-commercial purposes. During distribution, you must ensure that the recipients receive a copy of the license and are aware that the copyright belongs to "Sugar Balloons". For more detailed instructions, please read the license document.
Applications based on FXD (similar to fxd-app-demo) can be licensed as you see fit, but distribution must still comply with the agreement. For example: