[GH-ISSUE #427] Command line options (cli parameters) #3242

Closed
opened 2026-03-13 04:55:37 +03:00 by kerem · 0 comments
Owner

Originally created by @majkinetor on GitHub (May 27, 2023).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/427

Originally assigned to: @majkinetor, @VShawn on GitHub.

1Remote should have several command line options that can be used for installation, startup and connection running.

  1. --(un)install
    Runs all of the (un)install-*** options
  2. --(un)install-desktop-shortcut
    (Un)Install desktop shortcut and exit
  3. --(un)install-startup
    (Un)Install registry startup entry and exit
  4. --start-minimized
    Run app minimized
  5. ULID:<connection-id> or <connection-name> or #<tag-name>
    Run app and imediatelly execute and/or focus connection name or tag. NOTE: we could have just one here if this is problematic (tag or single connection name)

Documentation

TODO (@majkinetor)

Examples

# Install everything - desktop shortcut and startup (over existing ones if found) and exit. Startup uses --miimized option
1remote.exe --install

# Remove desktop shortcut if found and exit
1remote.exe --uninstall-desktop-shortcut

# run tag #foo and connection 'bar'
1remote.exe #foo bar

#run long named connection
1remote.exe "foo bar baz" 

#run two connections by connection id
1remote.exe id:12 id:17

#run in the background
1remote.exe --start-minimized

#run and/or focus
1remote.exe

Details

Future work

After CLI options are done, here are the things that should be done in the subsequent tickets that I will create separatelly:

  1. On connection context menu - add desktop shortcut
  2. On connection bulk selection menu - add desktop shortcut to run selected connections
  3. On tag context menu - add desktop shortcut to run this tag
  4. On options menu - run automatically at OS startup (it will use --minimzed option)
    5. Start minimized should be removed as it is pointless

Install/Uninstall

We could expand this with some more but this is enough for the start IMO and to be able to have installation routine for #402.

I intentionally didn't want to introducd option for "all users", start menu entries and uninstall in "programs and files". The first two are IMO not needed - 1RM is not a kind of program that will be used by multiple users on single machine IMO (and if that is needed, each user could have its own portable copy), and since it doesn't have multiple runable items start menu entery is usless. We could add uninstall entery that will just call 1remote.exe --uninstall but it will leave files on the disk and it doesn't seem important. I think we could just add those in the GUI options, for example System integration tab in options that would enable user to run all those things that we will be able to do via CLI (after these are implemented) via convenient buttons and/or checkboxes.

Run minimized

Startup minimized is implemented the wrong way. 1RM should have an app argument that does that, which will then setup to be used in Windows registry. That way, when one runs 1Remote by hand or shortcut icon, it will show the main window, which is expected behavior.

Originally created by @majkinetor on GitHub (May 27, 2023). Original GitHub issue: https://github.com/1Remote/1Remote/issues/427 Originally assigned to: @majkinetor, @VShawn on GitHub. 1Remote should have several command line options that can be used for installation, startup and connection running. 1. [x] `--(un)install` Runs all of the (un)install-*** options 2. [x] `--(un)install-desktop-shortcut ` (Un)Install desktop shortcut and exit 3. [x] `--(un)install-startup` (Un)Install registry startup entry and exit 4. [x] `--start-minimized` Run app minimized 5. [x] `ULID:<connection-id>` or `<connection-name>` or `#<tag-name>` Run app and imediatelly execute and/or focus connection name or tag. NOTE: we could have just one here if this is problematic (tag or single connection name) ## Documentation TODO (@majkinetor) ## Examples ``` # Install everything - desktop shortcut and startup (over existing ones if found) and exit. Startup uses --miimized option 1remote.exe --install # Remove desktop shortcut if found and exit 1remote.exe --uninstall-desktop-shortcut # run tag #foo and connection 'bar' 1remote.exe #foo bar #run long named connection 1remote.exe "foo bar baz" #run two connections by connection id 1remote.exe id:12 id:17 #run in the background 1remote.exe --start-minimized #run and/or focus 1remote.exe ``` ## Details ## Future work After CLI options are done, here are the things that should be done in the subsequent tickets that I will create separatelly: 1. On connection context menu - add desktop shortcut 2. On connection bulk selection menu - add desktop shortcut to run selected connections 3. On tag context menu - add desktop shortcut to run this tag 4. On options menu - run automatically at OS startup (it will use --minimzed option) 5. Start minimized should be removed as it is pointless ### Install/Uninstall We could expand this with some more but this is enough for the start IMO and to be able to have installation routine for #402. I intentionally didn't want to introducd option for "all users", start menu entries and uninstall in "programs and files". The first two are IMO not needed - 1RM is not a kind of program that will be used by multiple users on single machine IMO (and if that is needed, each user could have its own portable copy), and since it doesn't have multiple runable items start menu entery is usless. We could add uninstall entery that will just call `1remote.exe --uninstall` but it will leave files on the disk and it doesn't seem important. I think we could just add those in the GUI options, for example _System integration_ tab in options that would enable user to run all those things that we will be able to do via CLI (after these are implemented) via convenient buttons and/or checkboxes. ### Run minimized Startup minimized is implemented the wrong way. 1RM should have an app argument that does that, which will then setup to be used in Windows registry. That way, when one runs 1Remote by hand or shortcut icon, it will show the main window, which is expected behavior.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#3242
No description provided.