Skip to content
Back

Impossible to create project via CLI?

  • 0
  • Self Hosted
  • Tools
Lars
22 May, 2026, 09:20

Is it possible to create a new project via the appwrite CLI ? I need to create a few projects for something I'm working on and because i don't want to do it manually I'd really want to do it via CLI, but while the login is easily doable the following command seems to fail:

TypeScript
appwrite init project --organization-id "organization-6a046a3c002c5e88804a" --project-id "test_project" --project-name "My New Project"

It always says that i don't have the permission to write projects, but I'm authenticated as the org-owner...

TL;DR
Developers are having trouble creating a new project via the appwrite CLI. The issue seems to be with the Project ID format and organization inclusion. A workaround is to provide a random UID instead of using unique(). Additionally, ensure that the Project ID does not start with a leading underscore and is within 36 characters.
Lars
22 May, 2026, 09:26

Okay i might be stupid af. i guess organization- doesn't need to be included looking at https://github.com/appwrite/sdk-for-cli/blob/540225f9c32bbc681f6bce4ce531cd6083961869/lib/commands/init.ts ...

Lars
22 May, 2026, 09:30

yep seems to no longer give me project.write errors, but now errors for the test_project as project-id ...

Lars
22 May, 2026, 09:34

even when doing it via cli...

TypeScript
? What ID would you like to have for your project? unique()
Warning: The current SDK is built for Appwrite 1.9.4. However, the current Appwrite server version is 1.9.0. Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks
AppwriteException: Invalid `projectId` param: UID must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, and underscore. Can't start with a leading underscore
    at _Client.<anonymous> (/usr/local/share/nvm/versions/node/v24.14.0/lib/node_modules/appwrite-cli/dist/cli.cjs:105343:15)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/share/nvm/versions/node/v24.14.0/lib/node_modules/appwrite-cli/dist/cli.cjs:104531:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
  code: 400,
  type: 'general_argument_invalid',
  response: '{"message":"Invalid `projectId` param: UID must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, and underscore. Can\'t start with a leading underscore","code":400,"type":"general_argument_invalid","version":"1.9.0"}'
}
Lars
22 May, 2026, 09:36

guess unique() doesn't work, but giving it a random uid myself does work

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