Skip to content

Commit 8f81ab0

Browse files
Merge pull request redis-developer#615 from wjohnsto/master
Adding cheat sheet
2 parents 0eefdd2 + e317d79 commit 8f81ab0

File tree

15 files changed

+2141
-1
lines changed

15 files changed

+2141
-1
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
id: index-quick-start-cheat-sheet
3+
title: Redis Commands Cheat sheet
4+
sidebar_label: Cheat sheet
5+
slug: /howtos/quick-start/cheat-sheet
6+
authors: [prasan, will]
7+
---
8+
9+
import Authors from '@site/src/theme/Authors';
10+
11+
import CheatSheetConnect from './connect.mdx';
12+
import CheatSheetStrings from './strings.mdx';
13+
import CheatSheetGeneric from './generic.mdx';
14+
import CheatSheetHashes from './hashes.mdx';
15+
import CheatSheetSets from './sets.mdx';
16+
import CheatSheetSortedSets from './sorted-sets.mdx';
17+
import CheatSheetLists from './lists.mdx';
18+
import CheatSheetStreams from './streams.mdx';
19+
20+
import CheatSheetJSON from './json.mdx';
21+
import CheatSheetSearchAndQuery from './search-and-query.mdx';
22+
import CheatSheetTriggersAndFunctions from './triggers-and-functions.mdx';
23+
24+
<Authors frontMatter={frontMatter} />
25+
26+
## Connect
27+
28+
<CheatSheetConnect />
29+
30+
:::note
31+
To setup Redis either locally or in the cloud, refer to the [<u>tutorial</u>](/howtos/quick-start#setup-redis)
32+
:::
33+
34+
## Strings/Numbers
35+
36+
<CheatSheetStrings />
37+
38+
## Generic
39+
40+
<CheatSheetGeneric />
41+
42+
## Hashes
43+
44+
<CheatSheetHashes />
45+
46+
## Sets
47+
48+
<CheatSheetSets />
49+
50+
## Sorted sets
51+
52+
<CheatSheetSortedSets />
53+
54+
## Lists
55+
56+
<CheatSheetLists />
57+
58+
## Streams
59+
60+
<CheatSheetStreams />
61+
62+
### &nbsp;
63+
64+
<hr />
65+
66+
:::info Redis stack commands
67+
68+
[<u>Redis stack</u>](https://redis.io/docs/about/about-stack/) extends the core features
69+
of Redis OSS like querying across hashes and JSON documents, time series data support,
70+
full-text search ..etc
71+
72+
:::
73+
74+
## JSON
75+
76+
<CheatSheetJSON />
77+
78+
## Search and Query
79+
80+
<CheatSheetSearchAndQuery />
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
4+
<Tabs
5+
defaultValue="CLI"
6+
groupId="REDIS_CHEAT_SHEET"
7+
values={[
8+
{label: 'CLI', value: 'CLI'},
9+
{label: 'RedisInsight', value: 'REDIS_INSIGHT'},
10+
{label: 'NodeRedis', value: 'NODE_JS'},
11+
]}>
12+
13+
<TabItem value="CLI">
14+
15+
```sh
16+
# Syntax
17+
redis-cli -u redis://host:port
18+
redis-cli -u redis://username:password@host:port
19+
20+
# Examples
21+
redis-cli
22+
redis-cli -u redis://localhost:6379
23+
redis-cli -u redis://myuser:mypassword@localhost:6379
24+
25+
# If you run Redis through Docker
26+
docker exec -it <container-id-or-name> redis-cli
27+
28+
```
29+
30+
</TabItem>
31+
32+
<TabItem value="REDIS_INSIGHT">
33+
34+
Download <u>[RedisInsight](https://redis.com/redis-enterprise/redis-insight/)</u> to visually explore your Redis data or to engage with raw Redis commands in the workbench. Dive deeper into RedisInsight with these <u>[tutorials](/explore/redisinsight/)</u>.
35+
36+
![redis-insight-connect](./images/redis-insight-connect.png)
37+
38+
</TabItem>
39+
40+
<TabItem value="NODE_JS">
41+
42+
```js
43+
import { createClient } from 'redis';
44+
45+
let client = createClient({ url: 'redis://localhost:6379' });
46+
47+
await client.connect();
48+
49+
//await client.set('key', 'value');
50+
51+
await client.disconnect();
52+
```
53+
54+
</TabItem>
55+
56+
</Tabs>

0 commit comments

Comments
 (0)