# Commandline options clash

**URL:** <https://alloytools.discourse.group/t/commandline-options-clash/214>\
**Category:** Alloy 6\
**Created:** [December 25, 2021, 6:35pm UTC](https://alloytools.discourse.group/t/commandline-options-clash/214 "2021-12-25T18:35:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter.kriens](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/peter.kriens/32/3_2.png) [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Post date:** [December 25, 2021, 6:35pm UTC](https://alloytools.discourse.group/t/commandline-options-clash/214/1 "2021-12-25T18:35:59Z")

</div>

We have a [submission](https://github.com/AlloyTools/org.alloytools.alloy/pull/162) of a Language Server Protocol for Alloy. There is also a draft for a [shell version](https://github.com/AlloyTools/org.alloytools.alloy/pull/151) of alloy. And the current code has a SimpleCLI, SimpleGUI, and the WorkerEngine already. All these classes want to interpret the command line.

I want to propose a standard for the command line interface so that we can easily and consistently dispatch to the proper subsystem.

The basic structure would become:

```
    alloy [base-option]+ <sub> [sub-option]+

```

The base-option would be able to set all the current preferences like solver, fonts, sizes, debug, logging, etc. The sub options would be specific for any of the sub modules.

For example,

```
  alloy -d gui # start the GUI in debug mode
  alloy --fontsize 16 lsp # start the language server with 16pixel font
  alloy worker # start the worker
  alloy version # show the version
  alloy --solver minisat shell 

```

This will be _slightly_ different from the old command lines. Does anybody think this will be a problem?

---

<div class="post-metadata">

**Author:** ![stevesiegel](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/stevesiegel/32/98_2.png) [@stevesiegel](https://alloytools.discourse.group/u/stevesiegel)\
**Post date:** [December 26, 2021, 2:41pm UTC](https://alloytools.discourse.group/t/commandline-options-clash/214/2 "2021-12-26T14:41:25Z")

</div>

I didn’t know there was an old command line. Can someone tell me how to access it?  
Would the CLI allow you to issue commands like “alloy run p for 10” and “alloy check a for 5 X” — as you would from within an Alloy model? That would be very useful.

---

<div class="post-metadata">

**Author:** ![peter.kriens](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/peter.kriens/32/3_2.png) [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Post date:** [December 27, 2021, 10:19am UTC](https://alloytools.discourse.group/t/commandline-options-clash/214/3 "2021-12-27T10:19:37Z")

</div>

Well, if you did not find it so far you can wait until we get a chance to clean it up 🙂

---

<div class="post-metadata">

**Author:** ![hwayne](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/hwayne/32/67_2.png) [@hwayne](https://alloytools.discourse.group/u/hwayne)\
**Post date:** [January 26, 2022, 6:05am UTC](https://alloytools.discourse.group/t/commandline-options-clash/214/4 "2022-01-26T06:05:46Z")

</div>

I didn’t even know we **had** a command line.
