3
3
A Visual Studio Code extension that integrates [ containerlab] ( https://containerlab.dev/ ) directly into your editor, providing a convenient tree view for managing labs and their containers.
4
4
5
5
---
6
-
7
- - ** Auto-discovery** of local ` *.clab.yml ` or ` *.clab.yaml ` files in your workspace.
8
- - ** Tree view** showing labs (green/red/grey icons) based on container states.
9
- - ** Right-click context menus** on labs to deploy, destroy, redeploy (with or without cleanup), or open lab files.
10
- - ** Right-click context menus** on containers to start/stop, attach a shell, SSH, or view logs.
11
- - ** Color-coded statuses** :
12
- - ** Green** : all containers in the lab are running.
13
- - ** Grey** : undeployed (no containers found).
14
- - ** Yellow** : partially running (some containers running, others stopped).
15
-
6
+ ## Features
7
+
8
+ - ** Auto-discovery** of local ` *.clab.yml ` or ` *.clab.yaml ` files in your workspace.
9
+ - ** Tree view** showing labs (green/red/gray/yellow icons) based on container states:
10
+ - ** Green** : all containers in the lab are running
11
+ - ** Gray** : undeployed (no containers found)
12
+ - ** Red** : all containers are stopped
13
+ - ** Yellow** : partially running (some containers running, others stopped)
14
+ - ** Right-click context menus** on labs:
15
+ - ** Deploy** , ** Destroy** , ** Redeploy** (with or without cleanup)
16
+ - ** Open Lab File** , ** Copy Lab File Path**
17
+ - ** Graph** topologies (local Web or draw.io modes)
18
+ - ** Inspect** single lab
19
+ - ** Add Lab to Workspace**
20
+ - ** Open Folder in New Window**
21
+ - ** Right-click context menus** on containers:
22
+ - ** Start** , ** Stop**
23
+ - ** Attach shell** (with user-defined exec commands per node kind)
24
+ - ** SSH**
25
+ - ** View logs**
26
+ - ** Copy** submenu for container properties:
27
+ - Name, ID, IPv4, IPv6, Kind, Image
28
+ - ** Inspect** commands:
29
+ - ** Inspect (All Labs)** : shows a webview with ** all** labs in a grouped table
30
+ - ** Inspect Lab** : show only the selected lab’s containers in a webview
31
+ - ** Graph** :
32
+ - ** Graph Lab (Web)** : runs ` containerlab graph ` in a Terminal
33
+ - ** Graph Lab (draw.io)** : runs ` containerlab graph --drawio ` , then opens the ` .drawio ` file
34
+ - ** Graph Lab (draw.io, Interactive)** : runs in Terminal with in interactive mode
16
35
17
36
---
18
37
@@ -22,6 +41,7 @@ A Visual Studio Code extension that integrates [containerlab](https://containerl
22
41
- ** Docker** (or another container runtime) must be set up and running if your labs rely on container-based nodes.
23
42
- (Optional) A local folder with ` *.clab.yml ` or ` *.clab.yaml ` topologies, opened in VS Code.
24
43
44
+
25
45
---
26
46
27
47
## Getting Started
@@ -31,30 +51,56 @@ A Visual Studio Code extension that integrates [containerlab](https://containerl
31
51
3 . ** Click** on the _ Containerlab_ icon in the Activity Bar to view your labs.
32
52
4 . ** Right-click** on a lab or container to see context menu commands (Deploy, Destroy, Redeploy, etc.).
33
53
54
+ ---
34
55
35
- ## Extension Settings
56
+ ## Commands
36
57
37
- You can customize the following settings under ` containerlab.* ` :
58
+ These are some key commands contributed by the extension :
38
59
39
- - ** ` containerlab.defaultSshUser ` ** (string): Default SSH user to use when connecting to containerlab nodes. Default: ` admin ` .
40
- - ** ` containerlab.sudoEnabledByDefault ` ** (boolean): Whether to prepend ` sudo ` to containerlab commands by default. Default: ` true ` .
41
- - ** ` containerlab.refreshInterval ` ** (number): Refresh interval (in milliseconds) for the Containerlab Explorer. Default: ` 10000 ` .
60
+ ### Lab Management
61
+ - ** Deploy / Deploy (cleanup)**
62
+ - ** Redeploy / Redeploy (cleanup)**
63
+ - ** Destroy / Destroy (cleanup)**
64
+ - ** Deploy lab file** (choose a ` .clab.yml/.yaml ` from a file picker)
42
65
43
- ---
66
+ ### Lab Inspection
67
+ - ** Inspect (All Labs)** : Summaries all labs in one webview
68
+ - ** Inspect Lab** : Summaries the containers for a single lab
44
69
45
- ## Commands
70
+ ### Graph
71
+ - ** Graph Lab (Web)** : runs in Terminal
72
+ - ** Graph Lab (draw.io)** : uses a spinner and opens the ` .drawio ` file
73
+ - ** Graph Lab (draw.io, Interactive)** : same but with additional ` --drawio-args "-I" ` .
74
+
75
+ ### Node / Container Management
76
+ - ** Start node** , ** Stop node**
77
+ - ** Attach shell** (exec into container—respects ` containerlab.node.execCommandMapping ` in settings)
78
+ - ** SSH**
79
+ - ** View logs** (tails ` docker logs -f ... ` )
80
+ - ** Copy** menu (Name, ID, IPv4, IPv6, Kind, Image)
81
+
82
+ ### Other
83
+ - ** Add Lab to Workspace** : adds the lab’s folder to the current VS Code workspace
84
+ - ** Open Folder in New Window** : opens a separate VS Code window rooted at the lab’s folder
85
+
86
+ All these commands are accessible via:
87
+ - ** Context menus** on labs/containers (in the _ Containerlab Explorer_ )
88
+ - ** Editor title** (top-right) when editing a ` .clab.(yml|yaml) `
89
+ - ** Command Palette** (` Ctrl+Shift+P ` or ` Cmd+Shift+P ` , then type “Containerlab:”)
90
+
91
+ ## Extension Settings
92
+
93
+ You can customize the following settings under ` containerlab.* ` :
46
94
47
- - ** Deploy** / ** Deploy (cleanup)**
48
- - ** Destroy** / ** Destroy (cleanup)**
49
- - ** Redeploy** / ** Redeploy (cleanup)**
50
- - ** Deploy lab file** (pick a file from the file‐open dialog)
51
- - ** Attach shell** , ** SSH** , ** View logs** for individual containers
52
- - ** Graph** in either local web mode or draw.io mode
53
-
54
- These commands are available via:
55
- - ** Context menus** on labs and containers
56
- - ** Editor Title** actions (when editing a ` *.clab.yml ` or ` *.clab.yaml ` file)
57
- - ** Command Palette** (` F1 ` or ` Ctrl+Shift+P ` / ` Cmd+Shift+P ` )
95
+ - ** ` containerlab.defaultSshUser ` ** (string)
96
+ Default SSH user for the ** SSH** command (e.g. ` "admin" ` ).
97
+ - ** ` containerlab.sudoEnabledByDefault ` ** (boolean)
98
+ Whether to prepend ` sudo ` to containerlab commands. Default: ` true ` .
99
+ - ** ` containerlab.refreshInterval ` ** (number)
100
+ How often (in ms) the Containerlab Explorer refreshes. Default: ` 10000 ` .
101
+ - ** ` containerlab.node.execCommandMapping ` ** (object)
102
+ Mapping of node ` kind ` to the exec command used by ** Attach shell** .
103
+ For example, if you have ` "nokia_srlinux": "sr_cli" ` , then ` docker exec -it <container> sr_cli ` is used.
58
104
59
105
---
60
106
0 commit comments