# Both directions
lms log stream --source model --filter input,output
```

### JSON output and stats

Emit JSON:

  ```shell
  lms log stream --source model --filter input,output --json
  ```

Include prediction stats:

  ```shell
  lms log stream --source model --filter output --stats
  ```


## runtime

### `lms runtime`

> Manage LM Studio inference runtimes from the CLI.


Use `lms runtime` to list, download, switch, or remove inference runtimes without opening the app.

### Commands

- `lms runtime ls` — list installed runtimes.
- `lms runtime get` — download a runtime.
- `lms runtime select` — set the active runtime.
- `lms runtime remove` — uninstall a runtime.
- `lms runtime update` — update an installed runtime.

### List installed runtimes

```shell
lms runtime ls
```

### Download a runtime

```shell
lms runtime get
```

### Switch to a runtime

```shell
lms runtime select
```

Follow the interactive prompts to choose the version you want.


## develop-and-publish

### `lms clone`

> Clone an artifact from LM Studio Hub to a local folder (beta).


Use `lms clone` to copy an artifact from LM Studio Hub onto your machine.

### Flags
```lms_params
- name: "<artifact>"
  type: "string"
  optional: false
  description: "Artifact identifier in the form owner/name"
- name: "[path]"
  type: "string"
  optional: true
  description: "Destination folder. Defaults to a new folder named after the artifact."
```

If no path is provided, `lms clone owner/name` creates a folder called `name` in the current directory. The command exits if the target path already exists.

### Clone the latest revision

```shell
lms clone alice/sample-plugin
```

### Clone into a specific directory

```shell
lms clone alice/sample-plugin ./my-folder
```


### `lms push` (Beta)

> Upload the current folder's artifact to LM Studio Hub (beta).


Run `lms push` from inside a [plugin](/docs/typescript/plugins), [preset](/docs/app/presets), or [`model.yaml`](/docs/app/modelyaml) project to publish a new revision. If a `model.yaml` exists, the CLI will generate a `manifest.json` for you before pushing. 

For plugins, the CLI will ask for confirmation unless you pass `-y`.

### Publish the current folder

```shell
lms push
```

### Flags
```lms_params
- name: "--description"
  type: "string"
  optional: true
  description: "Override the artifact description for this push"
- name: "--overrides"
  type: "string"
  optional: true
  description: "JSON string to override manifest fields (parsed with JSON.parse)"
- name: "-y, --yes"
  type: "flag"
  optional: true
  description: "Suppress confirmations and warnings"
- name: "--private"
  type: "flag"
  optional: true
  description: "Mark the artifact as private when first published"
- name: "--write-revision"
  type: "flag"
  optional: true
  description: "Write the returned revision number to manifest.json"
```


### Advanced 

#### Publish quietly and keep the revision in manifest.json

```shell
lms push -y --write-revision
```

#### Override metadata for this upload

```shell
lms push --description "New beta build" --overrides '{"tags": ["beta"]}'
```


### `lms dev` (Beta)

> Start a plugin dev server or install a local plugin (beta).


Use `lms dev` inside a plugin project to run a local dev server that rebuilds and reloads on file changes.

This feature is a part of LM Studio [Plugins](/docs/typescript/plugins), currently in private beta.

### Run the dev plugin server

```shell
lms dev
```

This verifies `manifest.json`, installs dependencies if needed, and starts a watcher that rebuilds the plugin on changes. Supported runners: Node/ECMAScript and Deno.

### Install the plugin instead of running dev

```shell
lms dev --install
```

### Flags
```lms_params
- name: "-i, --install"
  type: "flag"
  optional: true
  description: "Install the plugin into LM Studio instead of running the dev server"
- name: "--no-notify"
  type: "flag"
  optional: true
  description: "Do not show the \"Plugin started\" notification in LM Studio"
```

### `lms login`

> Authenticate with LM Studio Hub (beta).


Use `lms login` to authenticate the CLI with LM Studio Hub.

### Sign in with the browser

```shell
lms login
```

The CLI opens a browser window for authentication. If a browser cannot be opened automatically, copy the printed URL into your browser.

### "CI style" login with pre-authenticated keys

```bash
lms login --with-pre-authenticated-keys \
  --key-id <KEY_ID> \
  --public-key <PUBLIC_KEY> \
  --private-key <PRIVATE_KEY> 
```

### Advanced Flags
```lms_params
- name: "--with-pre-authenticated-keys"
  type: "flag"
  optional: true
  description: "Authenticate using pre-generated keys (CI/CD). Requires --key-id, --public-key, and --private-key."
- name: "--key-id"
  type: "string"
  optional: true
  description: "Key ID to use with --with-pre-authenticated-keys"
- name: "--public-key"
  type: "string"
  optional: true
  description: "Public key to use with --with-pre-authenticated-keys"
- name: "--private-key"
  type: "string"
  optional: true
  description: "Private key to use with --with-pre-authenticated-keys"
```