chipsenkbeil / distant

🚧 (Alpha stage software) Library and tooling that supports remote filesystem and process operations. 🚧
https://distant.dev
579 stars 12 forks source link

Build interface to extend CLI #225

Open chipsenkbeil opened 1 year ago

chipsenkbeil commented 1 year ago

Similar to the idea of creating an API (part of distant-core) to integrate with the distant server, it would be handy to have an interface for extending and executing the CLI.

Reasons for this:

  1. We can add something like distant server job <...> for use by distant-local. This way, it could fork a search process or (on windows) create a new process to do the searching. This avoids the need to run it internally.
  2. We could move the launch logic for ssh back into ssh (maybe) by having a programmatic way to spawn a distant server without needing to provide the raw string. A builder that we can guarantee matches the CLI would be preferred.