Skip to content

Commit fed144a

Browse files
DEV: Redis in VS Code docs (#549)
* DEV: Redis in VS Code docs (preliminary) * Update vscode-extension.md * Apply suggestions from Andy's code review Co-authored-by: andy-stark-redis <[email protected]> * DOC-3505: move images to main folder; modify placement of the new articles, etc. * Apply suggestions from Viktar's code review * Apply more suggestions from Viktar's code review * modify images * DOC-3505 added fade to side menu image * Restructure for release notes * Add marketplace info --------- Co-authored-by: andy-stark-redis <[email protected]> Co-authored-by: Andy Stark <[email protected]>
1 parent bd7d56b commit fed144a

20 files changed

+240
-0
lines changed
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
categories:
3+
- docs
4+
- develop
5+
- stack
6+
- oss
7+
- rs
8+
- rc
9+
- oss
10+
- kubernetes
11+
- clients
12+
description: Connect to Redis from Visual Studio Code.
13+
hideListLinks: true
14+
linkTitle: Redis for VS Code
15+
stack: true
16+
title: Redis for VS Code
17+
weight: 5
18+
---
19+
20+
Redis for VS Code is an extension that allows you to connect to your Redis databases from within Microsoft Visual Studio Code.
21+
After connecting to a database, you can view, add, modify, and delete keys, and interact with your Redis databases using a Redis Insight like UI and also a built-in CLI interface.
22+
The following data types are supported:
23+
24+
- [Hash]({{< relref "/develop/data-types/hashes" >}})
25+
- [List]({{< relref "/develop/data-types/lists" >}})
26+
- [Set]({{< relref "/develop/data-types/sets" >}})
27+
- [Sorted Set]({{< relref "/develop/data-types/sorted-sets" >}})
28+
- [String]({{< relref "/develop/data-types/strings" >}})
29+
- [JSON]({{< relref "/develop/data-types/json" >}})
30+
31+
## Install the Redis for VS Code extension
32+
33+
Open VS Code and click on the **Extensions** menu button. In the **Search Extensions in Marketplace** field, type "Redis for VS Code" and press the `enter` or `return` key. There may be more than one option shown, so be sure to click on the extension published by Redis. The correct extension is shown below. Click on the **Install** to install the extension.
34+
35+
{{< image filename="images/dev/connect/vscode/vscode-install1.png" >}}
36+
37+
Once installed, check the **Auto Update** button to allow VS Code to install future revisions of the extension automatically.
38+
39+
{{< image filename="images/dev/connect/vscode/vscode-install2.png" >}}
40+
41+
After installing the extension, your VS Code menu will look similar to the following.
42+
43+
{{< image filename="images/dev/connect/vscode/vscode-menu.png" >}}
44+
45+
## Connect to Redis databases {#connect-db}
46+
47+
Click on the Redis mark (the cursive **R**) in the VS Code menu to begin connecting a Redis database to VS Code. If you do not currently have access to a Redis database, consider giving Redis Cloud a try. [It's free](https://redis.io/try-free/).
48+
49+
{{< image filename="images/dev/connect/vscode/vscode-initial.png" >}}
50+
51+
Click on the **+ Connect database** button. A dialog will display in the main pane. In the image shown below, all the options have been checked to show the available details for each connection. These connection details are similar to those accessible from [`redis-cli`]({{< relref "/develop/connect/cli" >}}).
52+
53+
{{< note >}}
54+
In the first release of Redis for VS Code, there is no way to change the logical database after you have selected it. If you need to connect to a different logical database, you need to add a separate database connection.
55+
{{< /note >}}
56+
57+
{{< image filename="images/dev/connect/vscode/vscode-add-menu.png" >}}
58+
59+
After filling out the necessary fields, click on the **Add Redis database** button. The pane on the left side, where you would normally see the Explorer view, shows your database connections.
60+
61+
{{< image filename="images/dev/connect/vscode/vscode-cnx-view.png" >}}
62+
63+
{{< note >}}
64+
Local databases, excluding OSS cluster databases, with default usernames and no passwords will automatically be added to your list of database connections.
65+
{{< /note >}}
66+
67+
### Connection tools
68+
69+
Several tools are displayed for each open connection.
70+
71+
{{< image filename="images/dev/connect/vscode/vscode-cnx-tools.png" >}}
72+
73+
Left to right, they are:
74+
75+
- Refresh connection, which retrieves fresh data from the connected Redis database.
76+
- Edit connection, which shows a dialog similar to the one described in [Connect to Redis Databases](#connect-db) above.
77+
- Delete connection.
78+
- Open CLI. See [CLI tool](#cli) below for more information.
79+
- Sort keys, either ascending or descending.
80+
- Filter keys by key name or pattern, and by key type.
81+
- Add a new key by type: Hash, List, Set, Sorted Set, String, or JSON.
82+
83+
## Key view
84+
85+
Here's what you'll see when there are no keys in your database (the image on the left) and when keys are present (the image on the right).
86+
87+
{{< image filename="images/dev/connect/vscode/vscode-key-view-w-wo-keys.png" >}}
88+
89+
Redis for VS Code will automatically group the keys based on the one available setting, **Delimiter to separate namespaces**, which you can view by clicking on the gear icon in the top-right of the left side pane. Click on the current value to change it. The default setting is the colon (`:`) character.
90+
91+
{{< image filename="images/dev/connect/vscode/vscode-settings.png" >}}
92+
93+
Click on a key to display its contents.
94+
95+
{{< image filename="images/dev/connect/vscode/vscode-key-view.png" >}}
96+
97+
### Key editing tools
98+
99+
There are several editing tools that you can use to edit key data. Each data type has its own editing capabilities. The following examples show edits to JSON data. Note that changes to keys are immediately written to the server.
100+
101+
- **Rename**. Click on the key name field to change the name.
102+
103+
{{< image filename="images/dev/connect/vscode/vscode-edit-name.png" >}}
104+
105+
- **Set time-to-live (TTL)**. Click on the **TTL** field to set the duration in seconds.
106+
107+
{{< image filename="images/dev/connect/vscode/vscode-edit-ttl.png" >}}
108+
109+
- **Delete**. Click on the trash can icons to delete the entire key (highlighted in red) or portions of a key (highlighted in yellow).
110+
111+
{{< image filename="images/dev/connect/vscode/vscode-edit-del.png" >}}
112+
113+
- **Add to key**. Click on the `+` button next to the closing bracket (shown highlighted in green above) to add a new component to a key.
114+
115+
{{< image filename="images/dev/connect/vscode/vscode-edit-add.png" >}}
116+
117+
- **Refresh**. Click on the refresh icon (the circular arrow) to retrieve fresh data from the server. In the examples below, refresh was clicked (the image on the left) and the key now has a new field called "test" that was added by another Redis client (the image on the right).
118+
119+
{{< image filename="images/dev/connect/vscode/vscode-recycle-before-after.png" >}}
120+
121+
For strings, hashes, lists, sets, and sorted sets, the extension supports numerous value formatters (highlighted in red in the image below). They are:
122+
123+
- Unicode
124+
- ASCII
125+
- Binary (blob)
126+
- HEX
127+
- JSON
128+
- Msgpack
129+
- Pickle
130+
- Protobuf
131+
- PHP serialized
132+
- Java serialized
133+
- 32-bit vector
134+
- 64-bit vector
135+
136+
{{< image filename="images/dev/connect/vscode/vscode-edit-value-formatters.png" >}}
137+
138+
Also for Hash keys, you can set per-field TTLs (highlighted in yellow in the image above), a new feature added to Redis Community Edition 7.4.
139+
140+
## CLI tool {#cli}
141+
142+
The connection tool with the boxed `>_` icon opens a Redis CLI window in the **REDIS CLI** tab at the bottom of the primary pane.
143+
144+
{{< image filename="images/dev/connect/vscode/vscode-cli.png" >}}
145+
146+
The CLI interface works just like the [`redis-cli`]({{< relref "/develop/connect/cli" >}}) command.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
categories:
3+
- docs
4+
- develop
5+
- stack
6+
- oss
7+
- rs
8+
- rc
9+
- oss
10+
- kubernetes
11+
- clients
12+
description:
13+
linkTitle: Release notes
14+
title: Redis for VS Code release notes
15+
weight: 7
16+
hideListLinks: true
17+
---
18+
19+
Here are the most recent changes for Redis for VS Code:
20+
21+
{{< table-children columnNames="Version (Date),Release notes" columnSources="LinkTitle,Title" enableLinks="Title" >}}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
Title: RedisInsight v1.0.0, September 2024
3+
linkTitle: v1.0.0 (September 2024)
4+
date: 2024-09-06 00:00:00 +0000
5+
description: RedisInsight v1.0
6+
weight: 99
7+
---
8+
9+
## 1.0.0 (September 2024)
10+
11+
This is the first release of Redis for VS Code.
12+
13+
Redis for VS Code is the official Visual Studio Code extension that provides an intuitive and efficient GUI for Redis databases, developed by Redis.
14+
15+
### Headlines
16+
17+
* Universal Redis Support: Connect to any Redis instance, including Redis Community Edition, Redis Cloud, Redis Software, and Redis on Azure Cache.
18+
19+
* Advanced Connectivity: Supports TLS certificates and SSH tunnels, with an option for automatic data decompression for GZIP, SNAPPY, Brotli, and more.
20+
21+
* Data types: Supports strings, hashes, lists, sets, sorted sets, and JSON.
22+
23+
* Human-readable data representation: Offers formatters like ASCII, JSON, Binary, Hex, 32-bit, and 64-bit vectors, and others.
24+
25+
* Integrated Redis CLI: Leverage Redis CLI with syntax preview as you type commands.
26+
27+
### Details
28+
29+
- Database connections:
30+
31+
  - Connect to any Redis instance, including Redis Community Edition, Redis Cloud, Redis Software, and Redis on Azure Cache.
32+
33+
  - View, edit, and manage your Redis database connections.
34+
35+
  - Supports TLS connections and SSH tunnels for secure access.
36+
37+
  - Automatically handle data compressed with GZIP, LZ4, SNAPPY, ZSTD, Brotli, or PHP GZCompress.
38+
39+
  - Choose and work with a specific logical database within your Redis instance.
40+
41+
- Redis data structures:
42+
43+
  - Use an intuitive tree view interface to browse, filter, and visualize Redis key-value data structures.
44+
45+
  -  Perform create, read, update, and delete operations on the following Redis data types:
46+
47+
    - Strings
48+
49+
    - Hashes
50+
51+
    - Lists
52+
53+
    - Sets
54+
55+
    - Sorted sets
56+
57+
    - JSON
58+
59+
- View your data in multiple human-readable formats, including Unicode, ASCII, Binary, HEX, JSON, Msgpack, Pickle, Protobuf, PHP serialized, Java serialized, and Vector (32 and 64-bit).
60+
61+
 - Sort by key names and apply filters by pattern or data type for quick and precise data access.
62+
63+
 - Conduct detailed searches within fields in hashes, indexes in lists, and members in sets and sorted sets.
64+
65+
- Redis CLI:
66+
67+
  - Access a built-in Redis CLI with improved type-ahead command suggestions, helping you execute commands accurately and efficiently.
68+
69+
### Get started with Redis for VS Code
70+
71+
This repository contains the source code for the Redis for VS Code extension.
72+
73+
Install the extension from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=redis.redis-for-vscode) to use it.
89.6 KB
Loading
104 KB
Loading
2.61 KB
Loading
12.4 KB
Loading
52.5 KB
Loading
49.8 KB
Loading
51.8 KB
Loading

0 commit comments

Comments
 (0)