@gitlab/duo-cli 8.41.0 → 8.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -41
- package/dist/index.js +1008 -876
- package/dist/index.js.map +168 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
# GitLab CLI
|
|
1
|
+
# GitLab Duo CLI
|
|
2
2
|
|
|
3
|
-
GitLab Duo
|
|
3
|
+
GitLab Duo for your command line. An AI-powered CLI tool that brings GitLab Duo's capabilities to your terminal.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Install globally using npm:
|
|
8
8
|
|
|
9
9
|
```shell
|
|
10
10
|
npm install -g @gitlab/duo-cli
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
After
|
|
13
|
+
After installation, the CLI can be run using the `duo` command.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### Alternative: Run without installing
|
|
16
|
+
|
|
17
|
+
You can run the CLI directly without installing it globally:
|
|
16
18
|
|
|
17
19
|
```shell
|
|
18
20
|
npx -y @gitlab/duo-cli
|
|
@@ -20,71 +22,104 @@ npx -y @gitlab/duo-cli
|
|
|
20
22
|
|
|
21
23
|
### Updating
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
To update to the latest version:
|
|
24
26
|
|
|
25
27
|
```shell
|
|
26
28
|
npm install -g @gitlab/duo-cli@latest
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
## Usage
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
### Interactive Mode (TUI)
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
Start the interactive terminal UI:
|
|
34
36
|
|
|
35
37
|
```shell
|
|
36
|
-
duo
|
|
37
|
-
duo run --help
|
|
38
|
+
duo
|
|
38
39
|
```
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
On first run, you'll be prompted for a [GitLab authentication token](https://docs.gitlab.com/user/profile/personal_access_tokens/). Your token must have the `api` scope granted.
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
### Headless Mode
|
|
44
|
+
|
|
45
|
+
The run command is ideal for non-interactive CI environments or integration with scripts and automated workflows. For example, you can run an eslint command and pipe any errors to Duo: `duo run --goal "Fix these errors: $eslint_output"`
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
Note that each time you execute `duo run` it will start a fresh workflow, so Duo won't know what the previous conversation or context was.
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
Run a workflow in non-interactive mode:
|
|
50
|
+
|
|
51
|
+
```shell
|
|
52
|
+
duo run --goal "Your goal or prompt here"
|
|
53
|
+
```
|
|
47
54
|
|
|
48
|
-
|
|
49
|
-
1. Install dependencies using bun package manager: `npm run install:bun`
|
|
55
|
+
Additional options for headless mode:
|
|
50
56
|
|
|
51
|
-
|
|
57
|
+
- `--ai-context-items <contextItems>` - JSON encoded array of additional context items
|
|
58
|
+
- `--existing-session-id <sessionId>` - Resume an existing session
|
|
52
59
|
|
|
53
|
-
###
|
|
60
|
+
### Configuration
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
Edit the CLI configuration:
|
|
56
63
|
|
|
57
64
|
```shell
|
|
58
|
-
|
|
65
|
+
duo config edit
|
|
59
66
|
```
|
|
60
67
|
|
|
61
|
-
|
|
68
|
+
### Log Management
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
- `duo-linux-arm64` - Linux ARM64
|
|
65
|
-
- `duo-darwin-x64` - macOS Intel
|
|
66
|
-
- `duo-darwin-arm64` - macOS Apple Silicon
|
|
67
|
-
- `duo-windows-x64.exe` - Windows 64-bit
|
|
70
|
+
View and manage logs:
|
|
68
71
|
|
|
69
|
-
|
|
72
|
+
```shell
|
|
73
|
+
duo log last # Open the last log file
|
|
74
|
+
duo log list # List all log files
|
|
75
|
+
duo log tail [args...] # Tail the last log file (supports standard tail arguments)
|
|
76
|
+
duo log clear # Remove all existing log files
|
|
77
|
+
```
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
### Global Options
|
|
72
80
|
|
|
73
|
-
|
|
74
|
-
- `dev:watch-tools` - as above, but react devtools will be started alongside connected to the application
|
|
75
|
-
- `start` - compiles the application to js and starts it. This is exactly the version of the app that will be packaged to the npm package. It is recommended to test your changes with it before creating an MR
|
|
81
|
+
### Duo command
|
|
76
82
|
|
|
77
|
-
|
|
83
|
+
- `-C, --cwd <path>` - Change working directory
|
|
84
|
+
- `--log-level <level>` - Set logging level (debug, info, warn, error)
|
|
78
85
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
### Duo run command
|
|
87
|
+
|
|
88
|
+
- `--gitlab-base-url <url>` - Base URL of GitLab instance (default: `https://gitlab.com`)
|
|
89
|
+
- `--gitlab-auth-token <token>` - Authentication token for GitLab instance
|
|
90
|
+
|
|
91
|
+
### Other options
|
|
83
92
|
|
|
84
|
-
|
|
93
|
+
- `-v, --version` - Display version number
|
|
94
|
+
- `--help` - Display help information
|
|
85
95
|
|
|
86
|
-
|
|
96
|
+
#### MCP
|
|
97
|
+
|
|
98
|
+
Duo CLI supports connecting to local or remote MCP servers using the same MCP configuration as the GitLab IDE extensions. Configuration instructions can be found at [MCP Documentation](https://docs.gitlab.com/user/gitlab_duo/model_context_protocol/mcp_clients/#configure-mcp-servers)
|
|
99
|
+
|
|
100
|
+
### Environment Variables
|
|
101
|
+
|
|
102
|
+
You can also configure the CLI using environment variables:
|
|
103
|
+
|
|
104
|
+
- `GITLAB_URL` or `GITLAB_BASE_URL` - GitLab instance URL
|
|
105
|
+
- `GITLAB_TOKEN` or `GITLAB_OAUTH_TOKEN` - Authentication token
|
|
106
|
+
- `LOG_LEVEL` - Logging level
|
|
107
|
+
- `DUO_WORKFLOW_GIT_HTTP_USER` - Git HTTP authentication username
|
|
108
|
+
- `DUO_WORKFLOW_GIT_HTTP_PASSWORD` - Git HTTP authentication password
|
|
109
|
+
|
|
110
|
+
### Getting Help
|
|
111
|
+
|
|
112
|
+
Display help for any command:
|
|
87
113
|
|
|
88
114
|
```shell
|
|
89
|
-
|
|
115
|
+
duo --help # Global help
|
|
116
|
+
duo run --help # Help for a specific command
|
|
90
117
|
```
|
|
118
|
+
|
|
119
|
+
## Contributing
|
|
120
|
+
|
|
121
|
+
See [Development Guide](./docs/development.md) for information on contributing to this project.
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
See the [License](../../LICENSE) for details.
|