@gitlab/duo-cli 8.62.1 → 8.63.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 CHANGED
@@ -1,122 +1,60 @@
1
1
  # GitLab Duo CLI (experimental)
2
2
 
3
- GitLab Duo for your command line. An AI-powered CLI tool that brings GitLab Duo's capabilities to your terminal.
3
+ GitLab Duo for your command line. An AI-powered CLI tool that brings
4
+ [GitLab Duo Chat (Agentic)](https://docs.gitlab.com/user/gitlab_duo_chat/agentic_chat/) to your
5
+ terminal.
4
6
 
5
- This tool is [experimental](https://docs.gitlab.com/policy/development_stages_support/#experiment) and some features might not work as expected.
7
+ The GitLab Duo CLI can help you:
6
8
 
7
- ## Installation
8
-
9
- Install globally using npm:
10
-
11
- ```shell
12
- npm install -g @gitlab/duo-cli
13
- ```
9
+ - Understand your codebase structure, cross-file functionality, and individual code snippets.
10
+ - Build, modify, refactor, and modernize code.
11
+ - Troubleshoot errors and fix code issues.
12
+ - Automate CI/CD configuration, troubleshoot pipeline errors, and optimize pipelines.
13
+ - Perform multi-step development tasks autonomously.
14
14
 
15
- After installation, the CLI can be run using the `duo` command.
15
+ This tool is [experimental](https://docs.gitlab.com/policy/development_stages_support/#experiment)
16
+ and some features might not work as expected.
16
17
 
17
- ### Alternative: Run without installing
18
-
19
- You can run the CLI directly without installing it globally:
18
+ ## Installation
20
19
 
21
- ```shell
22
- npx -y @gitlab/duo-cli
23
- ```
20
+ Prerequisites:
24
21
 
25
- ### Updating
22
+ - Node.js 22 or later.
23
+ - A [personal access token](https://docs.gitlab.com/user/profile/personal_access_tokens/) with `api`
24
+ scope.
26
25
 
27
- To update to the latest version:
26
+ To install the GitLab Duo CLI globally, run:
28
27
 
29
28
  ```shell
30
- npm install -g @gitlab/duo-cli@latest
29
+ npm install -g @gitlab/duo-cli
31
30
  ```
32
31
 
33
- ## Usage
34
-
35
- ### Interactive Mode (TUI)
36
-
37
- Start the interactive terminal UI:
32
+ After installation, start the GitLab Duo CLI in interactive mode:
38
33
 
39
34
  ```shell
40
35
  duo
41
36
  ```
42
37
 
43
- 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.
44
-
45
- ### Headless Mode
46
-
47
- 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"`
48
-
49
- Note that each time you execute `duo run` it will start a fresh workflow, so GitLab Duo won't know what the previous conversation or context was.
50
-
51
- Run a workflow in non-interactive mode:
38
+ Alternatively, you can run the GitLab Duo CLI without installing:
52
39
 
53
40
  ```shell
54
- duo run --goal "Your goal or prompt here"
55
- ```
56
-
57
- Additional options for headless mode:
58
-
59
- - `--ai-context-items <contextItems>` - JSON encoded array of additional context items
60
- - `--existing-session-id <sessionId>` - Resume an existing session
61
-
62
- ### Configuration
63
-
64
- Edit the CLI configuration:
65
-
66
- ```shell
67
- duo config edit
41
+ npx -y @gitlab/duo-cli
68
42
  ```
69
43
 
70
- ### Log Management
44
+ To run a workflow in headless mode, use the command `duo run`:
71
45
 
72
- View and manage logs:
46
+ > [!warning]
47
+ > Headless mode bypasses manual tool approval. Use this mode with caution and in a controlled
48
+ > sandbox environment.
73
49
 
74
50
  ```shell
75
- duo log last # Open the last log file
76
- duo log list # List all log files
77
- duo log tail [args...] # Tail the last log file (supports standard tail arguments)
78
- duo log clear # Remove all existing log files
51
+ duo run --goal "Your goal or prompt here"
79
52
  ```
80
53
 
81
- ### Global Options
82
-
83
- ### `duo` command
84
-
85
- - `-C, --cwd <path>` - Change working directory
86
- - `--log-level <level>` - Set logging level (debug, info, warn, error)
87
-
88
- ### `duo run` command
89
-
90
- - `--gitlab-base-url <url>` - Base URL of GitLab instance (default: `https://gitlab.com`)
91
- - `--gitlab-auth-token <token>` - Authentication token for GitLab instance
92
-
93
- ### Other options
54
+ ## Documentation
94
55
 
95
- - `-v, --version` - Display version number
96
- - `--help` - Display help information
97
-
98
- #### MCP
99
-
100
- The GitLab 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)
101
-
102
- ### Environment Variables
103
-
104
- You can also configure the CLI using environment variables:
105
-
106
- - `GITLAB_URL` or `GITLAB_BASE_URL` - GitLab instance URL
107
- - `GITLAB_TOKEN` or `GITLAB_OAUTH_TOKEN` - Authentication token
108
- - `LOG_LEVEL` - Logging level
109
- - `DUO_WORKFLOW_GIT_HTTP_USER` - Git HTTP authentication username
110
- - `DUO_WORKFLOW_GIT_HTTP_PASSWORD` - Git HTTP authentication password
111
-
112
- ### Getting Help
113
-
114
- Display help for any command:
115
-
116
- ```shell
117
- duo --help # Global help
118
- duo run --help # Help for a specific command
119
- ```
56
+ For detailed setup, usage, troubleshooting, and configuration instructions, see the
57
+ [GitLab Duo CLI documentation](https://docs.gitlab.com/user/gitlab_duo_cli/).
120
58
 
121
59
  ## Contributing
122
60