How to add a component on a GameObject in Custom Inspector

How can I add a component on a GameObject in a Custom Inspector ?

Is it possible to place it at a defined place in the component hierarchy ? The best thing would be to place it above another known component.

Thanks !

in OnInspectorGUI function:

(target as ScriptiptThatThisCustomInspectorIsFor).AddComponent<AnotherScript>();

I don’t think you can define order of components.