All Products
Search
Document Center

Cloud Shell:Write a tutorial

Last Updated:Jun 10, 2026

Create and publish interactive tutorials in Cloud Shell to help users get started with your project.

Click to open Cloud Shell tutorial mode to see a live example. In tutorial mode, click any command in the documentation to run it directly in Cloud Shell.

Step 1: Create a tutorial file

  1. In Cloud Shell, create a directory for your tutorial documents.

    Example

    mkdir tutorials
  2. In the new directory, create a Markdown file, such as tutorial.md.

    touch tutorial.md

Step 2: Write the tutorial

Write your tutorial using Markdown syntax and follow these conventions:

  • Use an H1 heading (#) for the tutorial title. Each tutorial document can have only one H1 heading.

  • Use an H2 heading (##) for each step title.

  • Add code snippets using Markdown's code syntax. Cloud Shell renders them as code blocks with a copy button—clicking it pastes the command directly into the Cloud Shell terminal.

    aliyun help 
  • Use the <tutorial-nav> directive to generate a navigation structure for your tutorial.

    <tutorial-nav></tutorial-nav>
  • Use the <tutorial-editor-open-file> directive to add a link that opens a specific file in the Cloud Shell text editor.

    <tutorial-editor-open-file filePath="path/test.md">Open File</tutorial-editor-open-file>

    The file must be in the $HOME directory or one of its subdirectories. The filePath attribute accepts an absolute path or a relative path. Cloud Shell resolves a relative path relative to the $HOME directory.

Use the following example as a reference when writing your tutorial. Write it using the vim command or the Cloud Shell text editor.

# Manage cloud resources using Alibaba Cloud CLI

## View Alibaba Cloud CLI help

aliyun help

### First Description

### Then Description

echo world

## Congratulations on completing the tutorial

Congratulations! You have completed the tutorial on how to use Alibaba Cloud CLI.

Step 3: Publish the tutorial

  1. Before running git push, preview and test your tutorial with the following command.

    teachme tutorial.md
    shell@Alicloud:~/tutorials$ cat tutorial.md
    # Manage cloud resources using Alibaba Cloud CLI
    ## View Alibaba Cloud CLI help
    aliyun help
    ### First Description
    ### Then Description
    echo world
    ## Congratulations on completing the tutorial
    Congratulations! You have completed the tutorial on how to use Alibaba Cloud CLI.
    shell@Alicloud:~/tutorials$ teachme tutorial.md
  2. Use the built-in Git commands in Cloud Shell to push your tutorial to a remote Git repository.

    Note

    Your Git repository must be public. If it is private, users cannot clone it into Cloud Shell.