How to install extension from the command line?

I’m diving into Blender’s new extension system that is replacing addons, mostly because I need to use python wheels. Anyhow, I’d like to add a line to my make script that installs the extension after I’ve finished building it. I’m trying to figure out the right syntax to use. According to the docs, I think I need something like

blender --command extension install-file -r REPO --enable extension/kitfox_my_extension-1.0.0-windows_x64.zip

The problem is, I have no idea what the REPO is supposed to be and the documentation doesn’t provide any help. If you leave it out, it refuses to install. This is a just a zip file in a local directory that my script has just built - what should I put for the REPO?

https://docs.blender.org/manual/en/latest/advanced/command_line/extension_arguments.html#command-line-args-extensions

I think you might have better chances for a proper answer on the developer forum.
And yes, the docs often are very sparse when dealing with things like this. :man_shrugging:

1 Like

Yup given the increase in complexity of the extension system I think someone who knows how it works should devote a bit of time to write some documentations. Currently it is very tedious to try and make it work. Cheers

I’ve posted over on https://devtalk.blender.org/t/how-to-install-extension-from-the-command-line/36520. Hopefully they’re respond.

Writing proper documentation isn’t really a thing at the BF I feel.
Often their answer is “You do it, we check and put it online…”

I can understand the limits of time per developer, but shitty and/or incomplete documentation will not help anyone.
Especially the parts of Blender dealing with integration into a studio were abysmal imho. It has become slightly better, but not much…

Edit:
If I understand the docs properly, the repo flag will need an existing repository.
So that means the user_default or the system repository ID (module name) that comes with Blender.
Or a custom one that you created yourself on e.g. a network drive.
So Blender knows where to put the extension during installation.

1 Like

In theory, it should be the repository identifier… as given in blender --command extension repo-list (for example: blender_org).

But I’ve tried it with 4.2.1 and it didn’t worked.

blender_org will probably not work as it is linked back to the website.

It probably works for user_default or system. If not, I’m out of ideas :face_with_diagonal_mouth:

1 Like

user_default seems to work. It’s hard to tell, though, since my console is getting spammed by error messages from every addon I have that does not run in headless mode. There also seems to be no way to uninstall an extension, so I can’t uninstall it to confirm it gets installed when I run the command.

Maybe some more info will come out of your post in the Development forum. Let’s see what they say as well.

Perhaps @nickberckley will know something on this.

Isn’t remove uninstall command in this context?

I suppose so. I was trying to do it from the Preferences screen and couldn’t find anything there.