-
Notifications
You must be signed in to change notification settings - Fork 92
Add daemon docs, link docs #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| title: Using LM Link | ||
| sidebar_title: Using with LM Link | ||
| description: Use a remote device's model via the REST API with LM Link | ||
| index: 3 | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| With [LM Link](/docs/lmlink), you can use a model loaded on a remote device as if it were loaded locally — from any machine on the same link. This naturally extends to the REST API and SDK: your laptop can make requests to `localhost` and have them served by a powerful remote machine on your network. | ||
|
|
||
| Requests to `localhost` still work as normal. LM Studio internally uses the model on the remote device as if it were loaded locally. For models present on multiple devices, the REST API will use the model on the preferred device. | ||
|
|
||
| <img src="/assets/docs/rest-link-diagram.png" data-caption="Sequence diagram: REST API request routed through LM Link to a remote device" /> | ||
|
|
||
| The preferred device setting is per-machine. Each device on the link independently controls which remote machine it prefers. See [how to set a preferred device](/docs/lmlink/basics/preferred-device) for more details. | ||
|
|
||
| ## Use the REST API as normal | ||
|
|
||
| Use the REST API exactly as you would locally. See the [REST API docs](/docs/developer/rest) for usage details. | ||
|
|
||
| If you're running into trouble, hop onto our [Discord](https://discord.gg/lmstudio) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| title: "`lms daemon down`" | ||
| sidebar_title: "`lms daemon down`" | ||
| description: Stop llmster from the CLI. | ||
| index: 2 | ||
| --- | ||
|
|
||
| The `lms daemon down` command stops the running llmster. | ||
|
|
||
| ```shell | ||
| lms daemon down | ||
| ``` | ||
|
|
||
| ```lms_info | ||
| `lms daemon down` only works if llmster is running. It will not stop LM Studio if it is running as a GUI app. | ||
| ``` | ||
|
|
||
| ### Learn more | ||
|
|
||
| To find out more about llmster, see [Headless Mode](/docs/developer/core/headless). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| title: "`lms daemon status`" | ||
| sidebar_title: "`lms daemon status`" | ||
| description: Check whether llmster is running. | ||
| index: 3 | ||
| --- | ||
|
|
||
| The `lms daemon status` command reports whether llmster is currently running. | ||
|
|
||
| ### Flags | ||
|
|
||
| ```lms_params | ||
| - name: "--json" | ||
| type: "flag" | ||
| optional: true | ||
| description: "Output the status in JSON format" | ||
| ``` | ||
|
|
||
| ## Check daemon status | ||
|
|
||
| ```shell | ||
| lms daemon status | ||
| ``` | ||
|
|
||
| ### JSON output | ||
|
|
||
| For scripting or automation: | ||
|
|
||
| ```shell | ||
| lms daemon status --json | ||
| ``` | ||
|
|
||
| Example output when running: | ||
| ```json | ||
| {"status":"running","pid":12345,"isDaemon":true} | ||
| ``` | ||
|
|
||
| Example output when not running: | ||
| ```json | ||
| {"status":"not-running"} | ||
| ``` | ||
|
|
||
| ### Start or stop the daemon | ||
|
|
||
| - [`lms daemon up`](/docs/cli/daemon/daemon-up) — start the daemon. | ||
| - [`lms daemon down`](/docs/cli/daemon/daemon-down) — stop the daemon. | ||
|
|
||
| To find out more about llmster, see [Headless Mode](/docs/developer/core/headless). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| title: "`lms daemon up`" | ||
| sidebar_title: "`lms daemon up`" | ||
| description: Start llmster from the CLI. | ||
| index: 1 | ||
| --- | ||
|
|
||
| The `lms daemon up` command starts llmster | ||
|
|
||
| ### Flags | ||
|
|
||
| ```lms_params | ||
| - name: "--json" | ||
| type: "flag" | ||
| optional: true | ||
| description: "Output the result in JSON format" | ||
| ``` | ||
|
|
||
| ## Start the daemon | ||
|
|
||
| ```shell | ||
| lms daemon up | ||
| ``` | ||
|
|
||
| If the daemon is not already running, this starts it and prints the PID. If it is already running, it reports the current status. | ||
|
|
||
| ### JSON output | ||
|
|
||
| For scripting or automation: | ||
|
|
||
| ```shell | ||
| lms daemon up --json | ||
| ``` | ||
|
|
||
| Example output: | ||
| ```json | ||
| {"status":"running","pid":26754,"isDaemon":true,"version":"0.4.4+1"} | ||
| ``` | ||
|
|
||
| ### Check the daemon status | ||
|
|
||
| See [`lms daemon status`](/docs/cli/daemon/daemon-status) to check whether the daemon is running. | ||
|
|
||
| ### Learn more | ||
|
|
||
| To find out more about llmster, see [Headless Mode](/docs/developer/core/headless). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| --- | ||
| title: "`lms daemon update`" | ||
| sidebar_title: "`lms daemon update`" | ||
| description: Update llmster to the latest version. | ||
| index: 4 | ||
| --- | ||
|
|
||
| The `lms daemon update` command fetches and installs the latest version of llmster. | ||
|
|
||
| ### Flags | ||
|
|
||
| ```lms_params | ||
| - name: "--beta" | ||
| type: "flag" | ||
| optional: true | ||
| description: "Update to the latest beta release" | ||
| ``` | ||
|
|
||
| ## Update the daemon | ||
|
|
||
| Stop the daemon first: | ||
|
|
||
| ```shell | ||
| lms daemon down | ||
| ``` | ||
|
|
||
| Then run the update: | ||
|
|
||
| ```shell | ||
| lms daemon update | ||
| ``` | ||
|
|
||
| Fetches the latest stable release and installs it. | ||
|
|
||
| ### Update to the beta channel | ||
|
|
||
| ```shell | ||
| lms daemon update --beta | ||
| ``` | ||
|
|
||
| ### After updating | ||
|
|
||
| Start the daemon again to use the new version: | ||
|
|
||
| ```shell | ||
| lms daemon up | ||
| ``` | ||
|
|
||
| To find out more about llmster, see [Headless Mode](/docs/developer/core/headless). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| title: "`lms link disable`" | ||
| sidebar_title: "`lms link disable`" | ||
| description: Disable LM Link on this device from the CLI. | ||
| index: 2 | ||
| --- | ||
|
|
||
| The `lms link disable` command disables LM Link on this device. The device will no longer connect to or be visible to other devices on the link. | ||
|
|
||
| ## Disable LM Link | ||
|
|
||
| ```shell | ||
| lms link disable | ||
| ``` | ||
|
|
||
| You can re-enable LM Link at any time with [`lms link enable`](/docs/cli/link/link-enable). | ||
|
|
||
| ### Learn more | ||
|
|
||
| See the [LM Link documentation](/docs/lmlink) for a full overview of LM Link. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| title: "`lms link enable`" | ||
| sidebar_title: "`lms link enable`" | ||
| description: Enable LM Link on this device from the CLI. | ||
| index: 1 | ||
| --- | ||
|
|
||
| The `lms link enable` command enables LM Link on this device, allowing it to connect with other devices on the same link. | ||
|
|
||
| ```lms_info | ||
| LM Link requires an LM Studio account. Run `lms login` first if you haven't already. | ||
| ``` | ||
|
|
||
| ## Enable LM Link | ||
|
|
||
| ```shell | ||
| lms link enable | ||
| ``` | ||
|
|
||
| After enabling, the CLI waits for a connection to be established. If there are issues, the relevant next step is printed. | ||
|
|
||
| ### Check the connection status | ||
|
|
||
| See [`lms link status`](/docs/cli/link/link-status) to verify the connection and see connected peers. | ||
|
|
||
| ### Disable LM Link | ||
|
|
||
| See [`lms link disable`](/docs/cli/link/link-disable) to turn LM Link off. | ||
|
|
||
| ### Learn more | ||
|
|
||
| See the [LM Link documentation](/docs/lmlink) for a full overview of LM Link. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| title: "`lms link set-device-name`" | ||
| sidebar_title: "`lms link set-device-name`" | ||
| description: Rename this device on LM Link from the CLI. | ||
| index: 4 | ||
| --- | ||
|
|
||
| The `lms link set-device-name` command sets a display name for this device, visible to other devices on the link. | ||
|
|
||
| ## Rename this device | ||
|
|
||
| ```shell | ||
| lms link set-device-name "My Mac Studio" | ||
| ``` | ||
|
|
||
| The new name takes effect immediately and is visible to connected peers via [`lms link status`](/docs/cli/link/link-status). | ||
|
|
||
| ### Learn more | ||
|
|
||
| See the [LM Link documentation](/docs/lmlink) for a full overview of LM Link. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍