Skip to content

Command Line Interface

Phil Beauvoir edited this page Jun 17, 2025 · 24 revisions

Archi Command Line Interface (ACLI) support

Important

coArchi2 supports some ACLI options. These are experimental and are likely to change.

For general information about the ACLI please read this.

Options (experimental)

Core options:

Option Description
--modelrepository2.cloneModel <url> Clone a model from the remote <url> to folder <path> as set in option --modelrepository2.modelFolder
--modelrepository2.commitModel <message> Commit changes with the <message> to the repository found at as set in option --modelrepository2.modelFolder
--modelrepository2.loadModel Load a model from the local repository found at <path> as set in option --modelrepository2.modelFolder
--modelrepository2.pushModel Push a model from the local repository found at <path> as set in option --modelrepository2.modelFolder to the remote repository
--modelrepository2.switchBranch <branch> Switch to <branch> in the repository found at <path> as set in option --modelrepository2.modelFolder

Auxiliary options:

Option Description
--modelrepository2.identityFile <identity_file> Path to SSH identity file. Used with SSH protocol.
--modelrepository2.modelFolder <path> Set the model repository folder at <path>
--modelrepository2.passFile <password_file> Path to a file containing the HTTP login password or the password to the SSH identity file
--modelrepository2.userName <user_name> Online repository login user name. Used with HTTP protocol.

Note

A plain text file is used to store the password for HTTP login or the SSH identity file so that the password is not used on the command line and could be retrieved from its history. Ensure that the password or PAT is limited to this one use.

Examples (should all be on one line):

Clone an online coArchi2 repository

HTTPS

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository2.cloneModel "https://github.com/somewhere/somerepo.git"
--modelrepository2.modelFolder "pathTo/repoFolder"
--modelrepository2.userName "MyName"
--modelrepository2.passFile "pathTo/password.txt"

SSH

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository2.cloneModel "[email protected]:somewhere/somerepo.git"
--modelrepository2.modelFolder "pathTo/repoFolder"
--modelrepository2.passFile "pathTo/password.txt"
--modelrepository2.identityFile "/Users/Username/.ssh/id_ed25519"

Load a local coArchi2 repository and set the model to the Current Model

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository2.loadModel
--modelrepository2.modelFolder "pathTo/repoFolder"

Commit model changes to a local coArchi2 repository

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository2.commitModel "Commit Message\n\nMessage Body"
--modelrepository2.modelFolder "pathTo/repoFolder"

Switch branch in a local coArchi2 repository

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository2.switchBranch "branch_name"
--modelrepository2.modelFolder "pathTo/repoFolder"

Push a local coArchi2 repository to its remote repository

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository2.pushModel
--modelrepository2.modelFolder "pathTo/repoFolder"
--modelrepository2.userName "MyName"
--modelrepository2.passFile "pathTo/password.txt"

Combine two options - clone and load

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository2.cloneModel "https://github.com/somewhere/somerepo.git"
--modelrepository2.loadModel
--modelrepository2.modelFolder "pathTo/repoFolder"
--modelrepository2.userName "MyName"
--modelrepository2.passFile "pathTo/password.txt"

Clone this wiki locally