Skip to content

Commit de8607a

Browse files
committed
🐛 FIX: formatting
1 parent df193dd commit de8607a

File tree

17 files changed

+705
-600
lines changed

17 files changed

+705
-600
lines changed

packages/cli/README.md

Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,55 +9,60 @@ The Langbase CLI is a command-line interface for Langbase. It provides a set of
99
Integrate the Langbase Docs MCP server into your IDEs and Claude Desktop.
1010

1111
#### Cursor
12+
1213
- Open Cursor settings
1314
- Navigate to the MCP settings
1415
- Click on the `+` button to add a new global MCP server
1516
- Paste the following configuration in the `mcp.json` file:
17+
1618
```json
1719
{
18-
"mcpServers": {
19-
"Langbase": {
20-
"command": "npx",
21-
"args": ["@langbase/cli","docs-mcp-server"]
22-
}
23-
}
20+
"mcpServers": {
21+
"Langbase": {
22+
"command": "npx",
23+
"args": ["@langbase/cli", "docs-mcp-server"]
24+
}
25+
}
2426
}
2527
```
2628

2729
#### Windsurf
30+
2831
- Navigate to Windsurf - Settings > Advanced Settings
2932
- You will find the option to Add Server
3033
- Click “Add custom server +”
3134
- Paste the following configuration in the `mcp_config.json` file:
35+
3236
```json
3337
{
34-
"mcpServers": {
35-
"Langbase": {
36-
"command": "npx",
37-
"args": ["@langbase/cli", "docs-mcp-server"]
38-
}
39-
}
38+
"mcpServers": {
39+
"Langbase": {
40+
"command": "npx",
41+
"args": ["@langbase/cli", "docs-mcp-server"]
42+
}
43+
}
4044
}
4145
```
4246

4347
#### Claude Desktop
48+
4449
- Open Claude Desktop File Menu
4550
- Navigate to the settings
4651
- Go to Developer Tab
4752
- Click on the Edit Config button
4853
- Paste the following configuration in the `claude_desktop_config.json` file:
54+
4955
```json
5056
{
51-
"mcpServers": {
52-
"Langbase": {
53-
"command": "npx",
54-
"args": ["@langbase/cli", "docs-mcp-server"]
55-
}
56-
}
57+
"mcpServers": {
58+
"Langbase": {
59+
"command": "npx",
60+
"args": ["@langbase/cli", "docs-mcp-server"]
61+
}
62+
}
5763
}
5864
```
5965

60-
6166
## CLI Commands
6267

6368
Get started with the Langbase CLI by running the following command:
@@ -67,63 +72,75 @@ npx @langbase/cli help
6772
```
6873

6974
### Pipe Agent
75+
7076
The CLI provides commands to manage your Langbase pipes.
7177

72-
- Create a new pipe agent
78+
- Create a new pipe agent
79+
7380
```bash
74-
npx @langbase/cli pipe
81+
npx @langbase/cli pipe
7582
```
7683

7784
- Run a pipe agent
85+
7886
```bash
7987
npx @langbase/cli pipe --run
8088
```
8189

8290
- List all pipe agents
91+
8392
```bash
8493
npx @langbase/cli pipe --listPipes
8594
```
8695

8796
- Update a pipe agent
97+
8898
```bash
8999
npx @langbase/cli pipe --update
90100
```
91101

92-
93102
### Memory
103+
94104
The CLI provides commands to manage your Langbase memories.
95105

96106
- Create a new memory
107+
97108
```bash
98109
npx @langbase/cli memory
99110
```
100111

101112
- Upload a document to memory
113+
102114
```bash
103115
npx @langbase/cli memory --upload
104116
```
105117

106118
- List all memories
119+
107120
```bash
108121
npx @langbase/cli memory --listMemories
109122
```
110123

111124
- Retrieve chunks from memory
125+
112126
```bash
113127
npx @langbase/cli memory --retrieve
114128
```
115129

116130
- List all documents in memory
131+
117132
```bash
118133
npx @langbase/cli memory --listDocs
119134
```
120135

121136
- Retry embedding of a document in a memory
137+
122138
```bash
123139
npx @langbase/cli memory --embed
124140
```
125141

126142
- Delete a memory
143+
127144
```bash
128145
npx @langbase/cli memory --delete
129146
```

packages/cli/src/index.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ const flag = (flg: string): boolean => Boolean(flags[flg]);
6161
await docsMcpServer();
6262
}
6363

64-
if (command('pipe') && !flag('run') && !flag('update') && !flag('listPipes')) {
64+
if (
65+
command('pipe') &&
66+
!flag('run') &&
67+
!flag('update') &&
68+
!flag('listPipes')
69+
) {
6570
await createPipe();
6671
}
6772

@@ -77,15 +82,22 @@ const flag = (flg: string): boolean => Boolean(flags[flg]);
7782
await listPipes();
7883
}
7984

80-
81-
if (command('memory') && !flag('upload') && !flag('embed') && !flag('retrieve') && !flag('listDocs') && !flag('delete') && !flag('listMemories')) {
85+
if (
86+
command('memory') &&
87+
!flag('upload') &&
88+
!flag('embed') &&
89+
!flag('retrieve') &&
90+
!flag('listDocs') &&
91+
!flag('delete') &&
92+
!flag('listMemories')
93+
) {
8294
await createMemory();
8395
}
8496

8597
if (command('memory') && flag('listMemories')) {
8698
await listMemories();
8799
}
88-
100+
89101
if (command('memory') && flag('delete')) {
90102
await deleteMemory();
91103
}
@@ -105,5 +117,4 @@ const flag = (flg: string): boolean => Boolean(flags[flg]);
105117
if (command('memory') && flag('listDocs')) {
106118
await listDocs();
107119
}
108-
109120
})();

0 commit comments

Comments
 (0)