Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,45 @@ Here are some frequently used commands:
- `lms ps --json` - To list all loaded models available for inferencing in machine-readable JSON format.
- `lms load` - To load a model
- `lms load <model path> -y` - To load a model with maximum GPU acceleration without confirmation
- `lms import <file path>` - To import a local model file into LM Studio.
- `lms unload <model identifier>` - To unload a model
- `lms unload --all` - To unload all models
- `lms create` - To create a new project with LM Studio SDK
- `lms log stream` - To stream logs from LM Studio

## Import a model file

Use `lms import` when you already have a local model file, such as a `.gguf` file, and want LM Studio to manage it from the models folder.

```shell
lms import ~/Downloads/mistral-7b-instruct.Q4_K_M.gguf
```

By default, the command moves the file into LM Studio's models folder. Use one of the file-handling options when you want to keep the original file in place:

```shell
# Copy the file instead of moving it
lms import ~/Downloads/model.gguf --copy

# Create a hard link instead of moving or copying it
lms import ~/Downloads/model.gguf --hard-link

# Create a symbolic link instead of moving or copying it
lms import ~/Downloads/model.gguf --symbolic-link
```

If the file name does not include enough information to categorize the model, provide the repository manually:

```shell
lms import ~/Downloads/model.gguf --user-repo user/repo
```

For unattended usage, add `--yes` to approve prompts automatically. To preview the target action without changing files, use `--dry-run`:

```shell
lms import ~/Downloads/model.gguf --yes --dry-run
Comment on lines +77 to +80

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid documenting --yes --dry-run as unattended

For a fresh profile using the default move mode, this documented unattended preview can still block and change local state: importCmd.action calls warnAboutMove(logger, yes, ...) before the dry-run branch, and warnAboutMove still calls confirm(...) even when yes is true; resolveModelsFolderPath also creates the models folder before --dry-run is checked. Users following this README example in CI or scripts can hang on the first-run move warning instead of getting a non-interactive preview, so the docs need to avoid this claim/example unless the implementation is changed.

Useful? React with 👍 / 👎.

```

# Contributing

The CLI is part of the [lmstudio.js monorepo](https://github.com/lmstudio-ai/lmstudio.js) and cannot be built standalone.
Expand Down
Loading