Giter Site home page Giter Site logo

easychen / fxd Goto Github PK

View Code? Open in Web Editor NEW
90.0 2.0 4.0 3.47 MB

Flow eXtension Define,它是一个被设计用于工作流(尤其是AI和自动化工作流)扩展的规范。"Flow eXtension Define" is a specification designed for extending workflows, especially AI and automation workflows.

Home Page: https://ft07.com/fxd/

License: Other

JavaScript 99.98% Batchfile 0.02%

fxd's Introduction

What is Fxd

[ 中文 | English ]

Fxd stands for Flow eXtension Define, a specification designed for extending workflows, especially AI and automation workflows.

FXD Official Manual

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:

  • RSS Monitoring App
  • GPTChat App
  • DALL-E App
  • X Posting App

Each of these is an independent NPM package, and each app can be called via the command line using Fxd-Cli. This way, we only need to use Shell or other scripts to combine these Fxd Apps, flexibly achieving various functions. For example, if you want to post to Weibo instead of X, you only need to replace the last app.

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.

FlowDeer

Development Environment

Command Line Debugging

This repo uses Yarn workspaces to manage multiple packages. Run in the root directory:

yarn install
Solution for Windows error "cannot load file **Roaming\npm\yarn.ps1" This error is caused by policy restrictions. Please follow these steps to resolve it:
  1. Search for PowerShell, right-click to run as administrator
  2. Enter Set-ExecutionPolicy RemoteSigned and choose Y
  3. Close PowerShell and rerun the yarn command

Then 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

FXD App Code Generation

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 key
  • DEFAULT_AI_CHAT_BASEURL: https://api.openai.com or https://oa.api2d.net
  • DEFAULT_AI_CHAT_MODEL: model, default to gpt-4o

In the fxd-cli directory, run:

./fxd codegen
fxd-cli-codegen3.mov

Follow the prompts to complete the process.

Debugging in FlowDeer

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.

License

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:

  1. If you create fxd-app-demo and license it under the MIT license, you can handle the fxd-app-demo code as you wish.
  2. If you guide users to install and use fxd-app-demo via fxd-cli, you do not need to comply with this project's license.
  3. If you bundle fxd-cli and fxd-sdk code as a product for distribution, then you must comply with this project's license.

fxd's People

Contributors

easychen avatar

Stargazers

 avatar  avatar aben avatar guoyucn avatar mrcat avatar  avatar Cuz avatar  avatar  avatar  avatar hanhotfox avatar Randy avatar  avatar Hada avatar  avatar  avatar  avatar Wilson avatar Harry Wong avatar  avatar JohnTitor avatar  avatar Brooke avatar Jerry Zhou avatar  avatar Damon Road avatar Penn York avatar jerryleooo avatar Shengyong Xie avatar Plaid avatar  avatar 柳 avatar Min Wang avatar yibie avatar  avatar  avatar 贇 avatar  avatar SherlockKudou avatar blackcat-love avatar Foolgry avatar 是夕流芳 avatar 爱摸鱼的阿恒 avatar Liang Cai avatar ChangJo avatar nedtang avatar Alpinee avatar xuan avatar 2kpurple avatar  avatar NoChesky avatar Liqun avatar Sunlight avatar wsadczh avatar Wu Jiawei avatar  avatar spartacus avatar 沉冰浮水 avatar  avatar str130 avatar L0serj3rry avatar 刘志聪 avatar ImFantuan avatar Leon Zou avatar Lin Wang avatar  avatar  avatar Leyteris avatar LEO avatar qunincey avatar  avatar LuChao avatar  avatar CaoMeiYouRen avatar wickcy avatar  avatar lpilp avatar YuanFeng avatar 斓曦未央丶 avatar Ren Siu avatar Dandi Wong avatar Zhazha_JiaYiZhen avatar  avatar  avatar Joker_ avatar  avatar monkeytao avatar l6031l avatar XiaoXiaoLively avatar Jcy avatar

Watchers

 avatar wsadczh avatar

fxd's Issues

建议将项目中的 Server酱 链接换成推荐链接

您好,我是 Server酱的作者 Easy 。注意到您的项目中对接了 Server酱,非常感谢对我们的支持。

这里有一个小建议。Server酱最近推出了「推荐返现计划」,您可以在项目中Server酱的官网链接后边加上推荐参数,这样在用户从这里进入Server酱并订阅会员后,您的项目将获得2元/单的佣金。

只需要用微信登录fx.ftqq.com ,然后开通计划就可以获得您的推荐链接,佣金会实时地转入开通账号的微信零钱中。

希望这个计划能让您的开源项目更好。


Hello, I am Easy, the author of ServerChan. I noticed that your project has integrated with ServerChan, and I am very grateful for that.

I have a small suggestion. ServerChan has recently launched a "Referral Cashback Program". You can add a referral parameter to the link to ServerChan's official website in your project. This way, when users enter ServerChan through your link and subscribe to a membership, your project will earn a commission of 2 RMB per subscription.

You just need to log in to fx.ftqq.com with WeChat, activate the program, and you will get your referral link. The commission will be instantly transferred to the WeChat Wallet of the account that activated the program.

Even though the earnings might not be substantial, I hope this program can provide some additional support for your open-source project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.