Skip to content

Commit 1f3875d

Browse files
authored
Merge pull request #4 from srl-labs/refactor
Refactor and so much more
2 parents dd4bc4e + 57ead75 commit 1f3875d

23 files changed

+2605
-314
lines changed

README.md

+30-15
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,16 @@
22

33
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.
44

5-
> [!TIP]
6-
> The **vscode-containerlab** extension auto-refreshes every few seconds, so your container statuses (running, exited, etc.) stay up-to-date in the tree!
7-
85
---
96

10-
## Features
11-
127
- **Auto-discovery** of local `*.clab.yml` or `*.clab.yaml` files in your workspace.
138
- **Tree view** showing labs (green/red/grey icons) based on container states.
14-
- **Right-click context menus** on labs to deploy, destroy, redeploy, or open lab files.
9+
- **Right-click context menus** on labs to deploy, destroy, redeploy (with or without cleanup), or open lab files.
1510
- **Right-click context menus** on containers to start/stop, attach a shell, SSH, or view logs.
1611
- **Color-coded statuses**:
1712
- **Green**: all containers in the lab are running.
1813
- **Grey**: undeployed (no containers found).
19-
- **Yellow**: partial states (some running, some stopped).
14+
- **Yellow**: partially running (some containers running, others stopped).
2015

2116

2217
---
@@ -32,29 +27,49 @@ A Visual Studio Code extension that integrates [containerlab](https://containerl
3227
## Getting Started
3328

3429
1. **Install** the extension.
35-
2. **Open** a folder or workspace in VS Code containing `.clab.yml` files.
30+
2. **Open** a folder or workspace in VS Code containing `.clab.yml` or `.clab.yaml` files.
3631
3. **Click** on the _Containerlab_ icon in the Activity Bar to view your labs.
37-
4. **Right-click** on a lab or container to see context menu commands (Deploy Lab, Stop Node, etc.).
38-
32+
4. **Right-click** on a lab or container to see context menu commands (Deploy, Destroy, Redeploy, etc.).
3933

4034

4135
## Extension Settings
4236

43-
Currently, there are no user-facing settings. Future updates may add preferences (e.g. refresh interval, custom commands, etc.).
37+
You can customize the following settings under `containerlab.*`:
4438

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`.
4542

46-
## Known Issues
43+
---
44+
45+
## Commands
4746

48-
- None reported. If you spot any bug or feature request, please open an issue on our repository.
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
4953

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`)
5058

59+
---
60+
61+
## Known Issues
62+
63+
- None reported. If you spot any bug or have a feature request, please open an issue on our repository.
64+
65+
---
5166

5267
## Release Notes
5368

54-
### 0.0.1
69+
### 0.1.0
5570

5671
- Initial release of **vscode-containerlab**.
57-
- Basic lab discovery, container auto-refresh, and right-click commands.
72+
5873

5974
---
6075

0 commit comments

Comments
 (0)