Skip to content

fix: switch from appwrite.json to appwrite.config.json #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/SDK/Language/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public function getFiles(): array
],
[
'scope' => 'default',
'destination' => 'scoop/appwrite.json',
'template' => 'cli/scoop/appwrite.json.twig',
'destination' => 'scoop/appwrite.config.json',
'template' => 'cli/scoop/appwrite.config.json.twig',
'minify' => false,
],
[
Expand Down
2 changes: 1 addition & 1 deletion templates/cli/README.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $ iwr -useb {{ sdk.url }}/cli/install.ps1 | iex
```
Via [Scoop](https://scoop.sh)
```powershell
$ scoop install https://raw.githubusercontent.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName | caseDash }}/master/scoop/appwrite.json
$ scoop install https://raw.githubusercontent.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName | caseDash }}/master/scoop/appwrite.config.json
```

Once the installation completes, you can verify your install using
Expand Down
2 changes: 1 addition & 1 deletion templates/cli/lib/commands/init.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const initProject = async ({ organizationId, projectId, projectName } = {}) => {
}
}

success(`Project successfully ${answers.start === 'existing' ? 'linked' : 'created'}. Details are now stored in appwrite.json file.`);
success(`Project successfully ${answers.start === 'existing' ? 'linked' : 'created'}. Details are now stored in appwrite.config.json file.`);

if(answers.start === 'existing') {
answers = await inquirer.prompt(questionsInitProjectAutopull);
Expand Down
10 changes: 5 additions & 5 deletions templates/cli/lib/commands/push.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ const generateChangesObject = (attribute, collection, isAdding) => {
return {
key: `${chalk.yellow(attribute.key)} in ${collection.name} (${collection['$id']})`,
attribute: attribute,
reason: isAdding ? 'Field isn\'t present on the remote server' : 'Field isn\'t present on the appwrite.json file',
reason: isAdding ? 'Field isn\'t present on the remote server' : 'Field isn\'t present on the appwrite.config.json file',
action: isAdding ? chalk.green('adding') : chalk.red('deleting')
};

Expand Down Expand Up @@ -1094,7 +1094,7 @@ const pushSite = async({ siteId, async, code, withVariables } = { returnOnZero:
await Promise.all(sites.map(async (site) => {
let response = {};

const ignore = site.ignore ? 'appwrite.json' : '.gitignore';
const ignore = site.ignore ? 'appwrite.config.json' : '.gitignore';
let siteExists = false;
let deploymentCreated = false;

Expand All @@ -1109,7 +1109,7 @@ const pushSite = async({ siteId, async, code, withVariables } = { returnOnZero:
});
siteExists = true;
if (response.framework !== site.framework) {
updaterRow.fail({ errorMessage: `Framework mismatch! (local=${site.framework},remote=${response.framework}) Please delete remote site or update your appwrite.json` })
updaterRow.fail({ errorMessage: `Framework mismatch! (local=${site.framework},remote=${response.framework}) Please delete remote site or update your appwrite.config.json` })
return;
}

Expand Down Expand Up @@ -1417,7 +1417,7 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur
await Promise.all(functions.map(async (func) => {
let response = {};

const ignore = func.ignore ? 'appwrite.json' : '.gitignore';
const ignore = func.ignore ? 'appwrite.config.json' : '.gitignore';
let functionExists = false;
let deploymentCreated = false;

Expand All @@ -1431,7 +1431,7 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur
});
functionExists = true;
if (response.runtime !== func.runtime) {
updaterRow.fail({ errorMessage: `Runtime mismatch! (local=${func.runtime},remote=${response.runtime}) Please delete remote function or update your appwrite.json` })
updaterRow.fail({ errorMessage: `Runtime mismatch! (local=${func.runtime},remote=${response.runtime}) Please delete remote function or update your appwrite.config.json` })
return;
}

Expand Down
2 changes: 1 addition & 1 deletion templates/cli/lib/commands/run.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const runFunction = async ({ port, functionId, withVariables, reload, userId } =
};

drawTable([settings]);
log("If you wish to change your local settings, update the appwrite.json file and rerun the 'appwrite run' command.");
log("If you wish to change your local settings, update the appwrite.config.json file and rerun the 'appwrite run' command.");
hint("Permissions, events, CRON and timeouts dont apply when running locally.");

await dockerCleanup(func.$id);
Expand Down
2 changes: 1 addition & 1 deletion templates/cli/lib/utils.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function systemHasCommand(command) {

const checkDeployConditions = (localConfig) => {
if (Object.keys(localConfig.data).length === 0) {
throw new Error("No appwrite.json file found in the current directory. Please run this command again in the folder containing your appwrite.json file, or run 'appwrite init project' to link current directory to an Appwrite project.");
throw new Error("No appwrite.config.json file found in the current directory. Please run this command again in the folder containing your appwrite.config.json file, or run 'appwrite init project' to link current directory to an Appwrite project.");
}
}

Expand Down