Back

Is there an appwrite init functions command to sync functions with appwrite.json?

  • 0
  • Tools
Binyamin
29 Sep, 2023, 17:52

Not at the moment. The recommended approach is to git the whole folder and process

TL;DR
There is no specific "appwrite init functions" command to sync functions with appwrite.json. The "appwrite init collections" command initializes the Appwrite.json for collections, not functions. It seems that there is no way to sync functions with appwrite.json using a single command. The recommended approach is to git the whole folder and process.
ZachHandley
29 Sep, 2023, 17:55

wow that's

ZachHandley
29 Sep, 2023, 17:55

but

ZachHandley
29 Sep, 2023, 17:55

couldn't you just do a list functions -> set them up in Appwrite.json?

Drake
29 Sep, 2023, 17:55

the code itself was the problem. you couldn't fetch the code

ZachHandley
29 Sep, 2023, 17:56

yeah I don't want the code

ZachHandley
29 Sep, 2023, 17:56

I have the code

Binyamin
29 Sep, 2023, 17:56

Then yes you can recreate that file

ZachHandley
29 Sep, 2023, 17:56

what's the command?

Binyamin
29 Sep, 2023, 17:56

Appwritr init function

ZachHandley
29 Sep, 2023, 17:56

I honestly deleted my previous one because I was on appwrite cli 2.0.2 lol

ZachHandley
29 Sep, 2023, 17:56

oh that doesn't recreate the function?

Binyamin
29 Sep, 2023, 17:57

It will let you choose exciting

Binyamin
29 Sep, 2023, 17:57

As long as I remember

ZachHandley
29 Sep, 2023, 17:57
ZachHandley
29 Sep, 2023, 17:57

that function exists so idk

ZachHandley
29 Sep, 2023, 17:57

yeah no

ZachHandley
29 Sep, 2023, 17:57

it doesn't

ZachHandley
29 Sep, 2023, 17:57

which is actually not in line with what init does for the others, IMO init and appwrite create function should be switched

Drake
29 Sep, 2023, 17:57

it only created new functions

Binyamin
29 Sep, 2023, 17:58

I stand corrected

ZachHandley
29 Sep, 2023, 17:58

appwrite init collections initializes the Appwrite.json for your collections

ZachHandley
29 Sep, 2023, 17:58

imo appwrite init functions should just sync whatever is in the project folder with the server (so if it exists on server and it exists under functions/that_function_name then)

Binyamin
29 Sep, 2023, 17:59

Or should add another command like

TypeScript
appwrite sync functions 
ZachHandley
29 Sep, 2023, 17:59

yeah

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more