Skip to content

Commit

Permalink
docs for clis
Browse files Browse the repository at this point in the history
  • Loading branch information
moqsien committed Sep 27, 2024
1 parent e6119e7 commit b4a7fb2
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 5 deletions.
14 changes: 11 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,19 @@ export default defineConfig({
},
items:[
{
label:"Documents",
label:"TUIDocs",
link:"/guides/tutorial/",
translations:{
"zh-CN":"文档",
"en":"Documents",
"zh-CN":"TUI文档",
"en":"Docs For TUI",
},
},
{
label:"CLIDocs",
link:"/guides/cli/",
translations:{
"zh-CN":"CLI文档",
"en":"Docs For CLI",
},
},
{
Expand Down
59 changes: 59 additions & 0 deletions src/content/docs/guides/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: Docs For CLI
description: How to use VMR in CLI Mode.
---


## Show help info.

```bash
vmr -h
```

## Show available SDK list.

```bash
vmr show
```

## Show available version list for an SDK.

```bash
vmr search <sdk-name>
```

## Show local installed versions for an SDK.

```bash
vmr local <sdk-name>
```

## Install and switch to the specific version of an SDK globally.

```bash
vmr use <sdk-name@version>
```

## Temporarily switch to specific version of an SDK in current termianl session.

```bash
vmr use -s <sdk-name@version>
```

## Lock the SDK version for current project.

```bash
vmr use -l <sdk-name@version>
```

## Uninstall the specific version of an SDK. (But not the one currently in use.)

```bash
vmr uninstall <sdk-name@version>
```

## Uninstall all local installed versions for an SDK. (Including the one currently in use.)

```bash
vmr uninstall <sdk-name@all>
```
2 changes: 1 addition & 1 deletion src/content/docs/guides/tutorial.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Documents
title: Docs For TUI
description: How to use VMR.
---

Expand Down
58 changes: 58 additions & 0 deletions src/content/docs/zh-cn/guides/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: CLI教程
description: 在命令行模式下使用VMR.
---

## 显示帮助信息

```bash
vmr -h
```

## 显示可以安装的SDK列表

```bash
vmr show
```

## 搜索某个SDK在当前系统环境下的可安装版本

```bash
vmr search <sdk-name>
```

## 搜索某个SDK的已安装版本

```bash
vmr local <sdk-name>
```

## 全局安装或者切换到某个SDK的某个版本

```bash
vmr use <sdk-name@version>
```

## 在session模式(临时)安装或切换到某个SDK的某个版本

```bash
vmr use -s <sdk-name@version>
```

## 对当前项目锁定SDK版本

```bash
vmr use -l <sdk-name@version>
```

## 卸载某个SDK的某个版本(不包含正在使用的当前版本)

```bash
vmr uninstall <sdk-name@version>
```

## 卸载某个SDK的所有版本(包含正在使用的当前版本)

```bash
vmr uninstall <sdk-name@all>
```
2 changes: 1 addition & 1 deletion src/content/docs/zh-cn/guides/tutorial.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 教程
title: TUI教程
description: 如何使用VMR.
---

Expand Down

0 comments on commit b4a7fb2

Please sign in to comment.