@caretive/caret-cli 0.0.1
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/.npmrc.tmp +2 -0
- package/README.md +72 -0
- package/cmd/cline/main.go +348 -0
- package/cmd/cline-host/main.go +71 -0
- package/e2e/default_update_test.go +154 -0
- package/e2e/helpers_test.go +378 -0
- package/e2e/main_test.go +47 -0
- package/e2e/mixed_stress_test.go +120 -0
- package/e2e/sqlite_helper.go +161 -0
- package/e2e/start_list_test.go +178 -0
- package/go.mod +64 -0
- package/go.sum +162 -0
- package/man/cline.1 +331 -0
- package/man/cline.1.md +332 -0
- package/package.json +54 -0
- package/pkg/cli/auth/auth_cline_provider.go +285 -0
- package/pkg/cli/auth/auth_menu.go +323 -0
- package/pkg/cli/auth/auth_subscription.go +130 -0
- package/pkg/cli/auth/byo_quick_setup.go +247 -0
- package/pkg/cli/auth/models_cline.go +141 -0
- package/pkg/cli/auth/models_list_fetch.go +156 -0
- package/pkg/cli/auth/models_list_static.go +69 -0
- package/pkg/cli/auth/providers_byo.go +184 -0
- package/pkg/cli/auth/providers_list.go +517 -0
- package/pkg/cli/auth/update_api_configurations.go +647 -0
- package/pkg/cli/auth/wizard_byo.go +764 -0
- package/pkg/cli/auth/wizard_byo_bedrock.go +193 -0
- package/pkg/cli/auth/wizard_byo_oca.go +366 -0
- package/pkg/cli/auth.go +43 -0
- package/pkg/cli/clerror/cline_error.go +187 -0
- package/pkg/cli/config/manager.go +208 -0
- package/pkg/cli/config/settings_renderer.go +198 -0
- package/pkg/cli/config.go +152 -0
- package/pkg/cli/display/ansi.go +27 -0
- package/pkg/cli/display/banner.go +211 -0
- package/pkg/cli/display/deduplicator.go +95 -0
- package/pkg/cli/display/markdown_renderer.go +139 -0
- package/pkg/cli/display/renderer.go +304 -0
- package/pkg/cli/display/segment_streamer.go +212 -0
- package/pkg/cli/display/streaming.go +134 -0
- package/pkg/cli/display/system_renderer.go +269 -0
- package/pkg/cli/display/tool_renderer.go +455 -0
- package/pkg/cli/display/tool_result_parser.go +371 -0
- package/pkg/cli/display/typewriter.go +210 -0
- package/pkg/cli/doctor.go +65 -0
- package/pkg/cli/global/cline-clients.go +501 -0
- package/pkg/cli/global/global.go +113 -0
- package/pkg/cli/global/registry.go +304 -0
- package/pkg/cli/handlers/ask_handlers.go +339 -0
- package/pkg/cli/handlers/handler.go +130 -0
- package/pkg/cli/handlers/say_handlers.go +521 -0
- package/pkg/cli/instances.go +506 -0
- package/pkg/cli/logs.go +382 -0
- package/pkg/cli/output/coordinator.go +167 -0
- package/pkg/cli/output/input_model.go +497 -0
- package/pkg/cli/sqlite/locks.go +366 -0
- package/pkg/cli/task/history_handler.go +72 -0
- package/pkg/cli/task/input_handler.go +577 -0
- package/pkg/cli/task/manager.go +1283 -0
- package/pkg/cli/task/settings_parser.go +754 -0
- package/pkg/cli/task/stream_coordinator.go +60 -0
- package/pkg/cli/task.go +675 -0
- package/pkg/cli/terminal/keyboard.go +695 -0
- package/pkg/cli/tui/HELP_WANTED.md +1 -0
- package/pkg/cli/types/history.go +17 -0
- package/pkg/cli/types/messages.go +329 -0
- package/pkg/cli/types/state.go +59 -0
- package/pkg/cli/updater/updater.go +409 -0
- package/pkg/cli/version.go +43 -0
- package/pkg/common/constants.go +6 -0
- package/pkg/common/schema.go +54 -0
- package/pkg/common/types.go +54 -0
- package/pkg/common/utils.go +185 -0
- package/pkg/generated/field_overrides.go +39 -0
- package/pkg/generated/providers.go +1584 -0
- package/pkg/hostbridge/diff.go +351 -0
- package/pkg/hostbridge/disabled/watch.go +39 -0
- package/pkg/hostbridge/disabled/window.go +63 -0
- package/pkg/hostbridge/disabled/workspace.go +66 -0
- package/pkg/hostbridge/env.go +166 -0
- package/pkg/hostbridge/grpc_server.go +113 -0
- package/pkg/hostbridge/simple.go +43 -0
- package/pkg/hostbridge/simple_workspace.go +85 -0
- package/pkg/hostbridge/window.go +129 -0
- package/scripts/publish-caret-cli.sh +39 -0
package/man/cline.1
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
.\" Automatically generated by Pandoc 3.8.2
|
|
2
|
+
.\"
|
|
3
|
+
.TH "CLINE" "1" "January 2025" "Cline CLI 1.0" "User Commands"
|
|
4
|
+
.SH NAME
|
|
5
|
+
cline \- orchestrate and interact with Cline AI coding agents
|
|
6
|
+
.SH SYNOPSIS
|
|
7
|
+
\f[B]cline\f[R] [\f[I]prompt\f[R]] [\f[I]options\f[R]]
|
|
8
|
+
.PP
|
|
9
|
+
\f[B]cline\f[R] \f[I]command\f[R] [\f[I]subcommand\f[R]]
|
|
10
|
+
[\f[I]options\f[R]] [\f[I]arguments\f[R]]
|
|
11
|
+
.SH DESCRIPTION
|
|
12
|
+
Try: cat README.md | cline \(lqSummarize this for me:\(rq
|
|
13
|
+
.PP
|
|
14
|
+
\f[B]cline\f[R] is a command\-line interface for orchestrating multiple
|
|
15
|
+
Cline AI coding agents.
|
|
16
|
+
Cline is an autonomous AI agent who can read, write, and execute code
|
|
17
|
+
across your projects.
|
|
18
|
+
He operates through a client\-server architecture where \f[B]Cline
|
|
19
|
+
Core\f[R] runs as a standalone service, and the CLI acts as a scriptable
|
|
20
|
+
interface for managing tasks, instances, and agent interactions.
|
|
21
|
+
.PP
|
|
22
|
+
The CLI is designed for both interactive use and automation, making it
|
|
23
|
+
ideal for CI/CD pipelines, parallel task execution, and terminal\-based
|
|
24
|
+
workflows.
|
|
25
|
+
Multiple frontends (CLI, VSCode, JetBrains) can attach to the same Cline
|
|
26
|
+
Core instance, enabling seamless task handoff between environments.
|
|
27
|
+
.SH MODES OF OPERATION
|
|
28
|
+
.TP
|
|
29
|
+
\f[B]Instant Task Mode\f[R]
|
|
30
|
+
The simplest invocation: \f[B]cline \(lqprompt here\(rq\f[R] immediately
|
|
31
|
+
spawns an instance, creates a task, and enters chat mode.
|
|
32
|
+
This is equivalent to running \f[B]cline instance new && cline task new
|
|
33
|
+
&& cline task chat\f[R] in sequence.
|
|
34
|
+
.TP
|
|
35
|
+
\f[B]Subcommand Mode\f[R]
|
|
36
|
+
Advanced usage with explicit control: \f[B]cline <command> [subcommand]
|
|
37
|
+
[options]\f[R] provides fine\-grained control over instances, tasks,
|
|
38
|
+
authentication, and configuration.
|
|
39
|
+
.SH AGENT BEHAVIOR
|
|
40
|
+
Cline operates in two primary modes:
|
|
41
|
+
.TP
|
|
42
|
+
\f[B]ACT MODE\f[R]
|
|
43
|
+
Cline actively uses tools to accomplish tasks.
|
|
44
|
+
He can read files, write code, execute commands, use a headless browser,
|
|
45
|
+
and more.
|
|
46
|
+
This is the default mode for task execution.
|
|
47
|
+
.TP
|
|
48
|
+
\f[B]PLAN MODE\f[R]
|
|
49
|
+
Cline gathers information and creates a detailed plan before
|
|
50
|
+
implementation.
|
|
51
|
+
He explores the codebase, asks clarifying questions, and presents a
|
|
52
|
+
strategy for user approval before switching to ACT MODE.
|
|
53
|
+
.SH INSTANT TASK OPTIONS
|
|
54
|
+
When using the instant task syntax \f[B]cline \(lqprompt\(rq\f[R] the
|
|
55
|
+
following options are available:
|
|
56
|
+
.TP
|
|
57
|
+
\f[B]\-o\f[R], \f[B]\-\-oneshot\f[R]
|
|
58
|
+
Full autonomous mode.
|
|
59
|
+
Cline completes the task and stops following after completion.
|
|
60
|
+
Example: cline \-o \(lqwhat\(cqs 6 + 8?\(rq
|
|
61
|
+
.TP
|
|
62
|
+
\f[B]\-s\f[R], \f[B]\-\-setting\f[R] \f[I]setting\f[R] \f[I]value\f[R]
|
|
63
|
+
Override a setting for this task
|
|
64
|
+
.TP
|
|
65
|
+
\f[B]\-y\f[R], \f[B]\-\-no\-interactive\f[R], \f[B]\-\-yolo\f[R]
|
|
66
|
+
Enable fully autonomous mode.
|
|
67
|
+
Disables all interactivity:
|
|
68
|
+
.RS
|
|
69
|
+
.IP \(bu 2
|
|
70
|
+
ask_followup_question tool is disabled
|
|
71
|
+
.IP \(bu 2
|
|
72
|
+
attempt_completion happens automatically
|
|
73
|
+
.IP \(bu 2
|
|
74
|
+
execute_command runs in non\-blocking mode with timeout
|
|
75
|
+
.IP \(bu 2
|
|
76
|
+
PLAN MODE automatically switches to ACT MODE
|
|
77
|
+
.RE
|
|
78
|
+
.TP
|
|
79
|
+
\f[B]\-m\f[R], \f[B]\-\-mode\f[R] \f[I]mode\f[R]
|
|
80
|
+
Starting mode.
|
|
81
|
+
Options: \f[B]act\f[R] (default), \f[B]plan\f[R]
|
|
82
|
+
.SH GLOBAL OPTIONS
|
|
83
|
+
These options apply to all subcommands:
|
|
84
|
+
.TP
|
|
85
|
+
\f[B]\-F\f[R], \f[B]\-\-output\-format\f[R] \f[I]format\f[R]
|
|
86
|
+
Output format.
|
|
87
|
+
Options: \f[B]rich\f[R] (default), \f[B]json\f[R], \f[B]plain\f[R]
|
|
88
|
+
.TP
|
|
89
|
+
\f[B]\-h\f[R], \f[B]\-\-help\f[R]
|
|
90
|
+
Display help information for the command.
|
|
91
|
+
.TP
|
|
92
|
+
\f[B]\-v\f[R], \f[B]\-\-verbose\f[R]
|
|
93
|
+
Enable verbose output for debugging.
|
|
94
|
+
.SH COMMANDS
|
|
95
|
+
.SS Authentication
|
|
96
|
+
\f[B]cline auth\f[R] [\f[I]provider\f[R]] [\f[I]key\f[R]]
|
|
97
|
+
.TP
|
|
98
|
+
\f[B]cline a\f[R] [\f[I]provider\f[R]] [\f[I]key\f[R]]
|
|
99
|
+
Configure authentication for AI model providers.
|
|
100
|
+
Launches an interactive wizard if no arguments provided.
|
|
101
|
+
If provider is specified without a key, prompts for the key or launches
|
|
102
|
+
the appropriate OAuth flow.
|
|
103
|
+
.SS Instance Management
|
|
104
|
+
Cline Core instances are independent agent processes that can run in the
|
|
105
|
+
background.
|
|
106
|
+
Multiple instances can run simultaneously, enabling parallel task
|
|
107
|
+
execution.
|
|
108
|
+
.PP
|
|
109
|
+
\f[B]cline instance\f[R]
|
|
110
|
+
.TP
|
|
111
|
+
\f[B]cline i\f[R]
|
|
112
|
+
Display instance management help.
|
|
113
|
+
.PP
|
|
114
|
+
\f[B]cline instance new\f[R] [\f[B]\-d\f[R]|\f[B]\-\-default\f[R]]
|
|
115
|
+
.TP
|
|
116
|
+
\f[B]cline i n\f[R] [\f[B]\-d\f[R]|\f[B]\-\-default\f[R]]
|
|
117
|
+
Spawn a new Cline Core instance.
|
|
118
|
+
Use \f[B]\-\-default\f[R] to set it as the default instance for
|
|
119
|
+
subsequent commands.
|
|
120
|
+
.PP
|
|
121
|
+
\f[B]cline instance list\f[R]
|
|
122
|
+
.TP
|
|
123
|
+
\f[B]cline i l\f[R]
|
|
124
|
+
List all running Cline Core instances with their addresses and status.
|
|
125
|
+
.PP
|
|
126
|
+
\f[B]cline instance default\f[R] \f[I]address\f[R]
|
|
127
|
+
.TP
|
|
128
|
+
\f[B]cline i d\f[R] \f[I]address\f[R]
|
|
129
|
+
Set the default instance to avoid specifying \f[B]\-\-address\f[R] in
|
|
130
|
+
task commands.
|
|
131
|
+
.PP
|
|
132
|
+
\f[B]cline instance kill\f[R] \f[I]address\f[R]
|
|
133
|
+
[\f[B]\-a\f[R]|\f[B]\-\-all\f[R]]
|
|
134
|
+
.TP
|
|
135
|
+
\f[B]cline i k\f[R] \f[I]address\f[R] [\f[B]\-a\f[R]|\f[B]\-\-all\f[R]]
|
|
136
|
+
Terminate a Cline Core instance.
|
|
137
|
+
Use \f[B]\-\-all\f[R] to kill all running instances.
|
|
138
|
+
.SS Task Management
|
|
139
|
+
Tasks represent individual work items that Cline executes.
|
|
140
|
+
Tasks maintain conversation history, checkpoints, and settings.
|
|
141
|
+
.PP
|
|
142
|
+
\f[B]cline task\f[R] [\f[B]\-a\f[R]|\f[B]\-\-address\f[R]
|
|
143
|
+
\f[I]ADDR\f[R]]
|
|
144
|
+
.TP
|
|
145
|
+
\f[B]cline t\f[R] [\f[B]\-a\f[R]|\f[B]\-\-address\f[R] \f[I]ADDR\f[R]]
|
|
146
|
+
Display task management help.
|
|
147
|
+
The \f[B]\-\-address\f[R] flag specifies which Cline Core instance to
|
|
148
|
+
use (e.g., localhost:50052).
|
|
149
|
+
.PP
|
|
150
|
+
\f[B]cline task new\f[R] \f[I]prompt\f[R] [\f[I]options\f[R]]
|
|
151
|
+
.TP
|
|
152
|
+
\f[B]cline t n\f[R] \f[I]prompt\f[R] [\f[I]options\f[R]]
|
|
153
|
+
Create a new task in the default or specified instance.
|
|
154
|
+
Options:
|
|
155
|
+
.RS
|
|
156
|
+
.TP
|
|
157
|
+
\f[B]\-s\f[R], \f[B]\-\-setting\f[R] \f[I]setting\f[R] \f[I]value\f[R]
|
|
158
|
+
Set task\-specific settings
|
|
159
|
+
.TP
|
|
160
|
+
\f[B]\-y\f[R], \f[B]\-\-no\-interactive\f[R], \f[B]\-\-yolo\f[R]
|
|
161
|
+
Enable autonomous mode
|
|
162
|
+
.TP
|
|
163
|
+
\f[B]\-m\f[R], \f[B]\-\-mode\f[R] \f[I]mode\f[R]
|
|
164
|
+
Starting mode (act or plan)
|
|
165
|
+
.RE
|
|
166
|
+
.PP
|
|
167
|
+
\f[B]cline task open\f[R] \f[I]task\-id\f[R] [\f[I]options\f[R]]
|
|
168
|
+
.TP
|
|
169
|
+
\f[B]cline t o\f[R] \f[I]task\-id\f[R] [\f[I]options\f[R]]
|
|
170
|
+
Resume a previous task from history.
|
|
171
|
+
Accepts the same options as \f[B]task new\f[R].
|
|
172
|
+
.PP
|
|
173
|
+
\f[B]cline task list\f[R]
|
|
174
|
+
.TP
|
|
175
|
+
\f[B]cline t l\f[R]
|
|
176
|
+
List all tasks in history with their id and snippet
|
|
177
|
+
.PP
|
|
178
|
+
\f[B]cline task chat\f[R]
|
|
179
|
+
.TP
|
|
180
|
+
\f[B]cline t c\f[R]
|
|
181
|
+
Enter interactive chat mode for the current task.
|
|
182
|
+
Allows back\-and\-forth conversation with Cline.
|
|
183
|
+
.PP
|
|
184
|
+
\f[B]cline task send\f[R] [\f[I]message\f[R]] [\f[I]options\f[R]]
|
|
185
|
+
.TP
|
|
186
|
+
\f[B]cline t s\f[R] [\f[I]message\f[R]] [\f[I]options\f[R]]
|
|
187
|
+
Send a message to Cline.
|
|
188
|
+
If no message is provided, reads from stdin.
|
|
189
|
+
Options:
|
|
190
|
+
.RS
|
|
191
|
+
.TP
|
|
192
|
+
\f[B]\-a\f[R], \f[B]\-\-approve\f[R]
|
|
193
|
+
Approve Cline\(cqs proposed action
|
|
194
|
+
.TP
|
|
195
|
+
\f[B]\-d\f[R], \f[B]\-\-deny\f[R]
|
|
196
|
+
Deny Cline\(cqs proposed action
|
|
197
|
+
.TP
|
|
198
|
+
\f[B]\-f\f[R], \f[B]\-\-file\f[R] \f[I]FILE\f[R]
|
|
199
|
+
Attach a file to the message
|
|
200
|
+
.TP
|
|
201
|
+
\f[B]\-y\f[R], \f[B]\-\-no\-interactive\f[R], \f[B]\-\-yolo\f[R]
|
|
202
|
+
Enable autonomous mode
|
|
203
|
+
.TP
|
|
204
|
+
\f[B]\-m\f[R], \f[B]\-\-mode\f[R] \f[I]mode\f[R]
|
|
205
|
+
Switch mode (act or plan)
|
|
206
|
+
.RE
|
|
207
|
+
.PP
|
|
208
|
+
\f[B]cline task view\f[R] [\f[B]\-f\f[R]|\f[B]\-\-follow\f[R]]
|
|
209
|
+
[\f[B]\-c\f[R]|\f[B]\-\-follow\-complete\f[R]]
|
|
210
|
+
.TP
|
|
211
|
+
\f[B]cline t v\f[R] [\f[B]\-f\f[R]|\f[B]\-\-follow\f[R]] [\f[B]\-c\f[R]|\f[B]\-\-follow\-complete\f[R]]
|
|
212
|
+
Display the current conversation.
|
|
213
|
+
Use \f[B]\-\-follow\f[R] to stream updates in real\-time, or
|
|
214
|
+
\f[B]\-\-follow\-complete\f[R] to follow until task completion.
|
|
215
|
+
.PP
|
|
216
|
+
\f[B]cline task restore\f[R] \f[I]checkpoint\f[R]
|
|
217
|
+
.TP
|
|
218
|
+
\f[B]cline t r\f[R] \f[I]checkpoint\f[R]
|
|
219
|
+
Restore the task to a previous checkpoint state.
|
|
220
|
+
.PP
|
|
221
|
+
\f[B]cline task pause\f[R]
|
|
222
|
+
.TP
|
|
223
|
+
\f[B]cline t p\f[R]
|
|
224
|
+
Pause task execution.
|
|
225
|
+
.SS Configuration
|
|
226
|
+
Configuration can be set globally.
|
|
227
|
+
Override these global settings for a task using the
|
|
228
|
+
\f[B]\-\-setting\f[R] flag
|
|
229
|
+
.PP
|
|
230
|
+
\f[B]cline config\f[R]
|
|
231
|
+
.PP
|
|
232
|
+
\f[B]cline c\f[R]
|
|
233
|
+
.PP
|
|
234
|
+
\f[B]cline config set\f[R] \f[I]key\f[R] \f[I]value\f[R]
|
|
235
|
+
.TP
|
|
236
|
+
\f[B]cline c s\f[R] \f[I]key\f[R] \f[I]value\f[R]
|
|
237
|
+
Set a configuration variable.
|
|
238
|
+
.PP
|
|
239
|
+
\f[B]cline config get\f[R] \f[I]key\f[R]
|
|
240
|
+
.TP
|
|
241
|
+
\f[B]cline c g\f[R] \f[I]key\f[R]
|
|
242
|
+
Read a configuration variable.
|
|
243
|
+
.PP
|
|
244
|
+
\f[B]cline config list\f[R]
|
|
245
|
+
.TP
|
|
246
|
+
\f[B]cline c l\f[R]
|
|
247
|
+
List all configuration variables and their values.
|
|
248
|
+
.SH TASK SETTINGS
|
|
249
|
+
Task settings are persisted in the \f[I]\(ti/.cline/x/tasks\f[R]
|
|
250
|
+
directory.
|
|
251
|
+
When resuming a task with \f[B]cline task open\f[R], task settings are
|
|
252
|
+
automatically restored.
|
|
253
|
+
.PP
|
|
254
|
+
Common settings include:
|
|
255
|
+
.TP
|
|
256
|
+
\f[B]yolo\f[R]
|
|
257
|
+
Enable autonomous mode (true/false)
|
|
258
|
+
.TP
|
|
259
|
+
\f[B]mode\f[R]
|
|
260
|
+
Starting mode (act/plan)
|
|
261
|
+
.SH NOTES & EXAMPLES
|
|
262
|
+
The \f[B]cline task send\f[R] and \f[B]cline task new\f[R] commands
|
|
263
|
+
support reading from stdin, enabling powerful pipeline compositions:
|
|
264
|
+
.IP
|
|
265
|
+
.EX
|
|
266
|
+
cat requirements.txt \f[B]|\f[R] cline task send
|
|
267
|
+
echo \(dqRefactor this code\(dq \f[B]|\f[R] cline \-y
|
|
268
|
+
.EE
|
|
269
|
+
.SS Instance Management
|
|
270
|
+
Manage multiple Cline instances:
|
|
271
|
+
.IP
|
|
272
|
+
.EX
|
|
273
|
+
\f[I]# Start a new instance and make it default\f[R]
|
|
274
|
+
cline instance new \-\-default
|
|
275
|
+
|
|
276
|
+
\f[I]# List all running instances\f[R]
|
|
277
|
+
cline instance list
|
|
278
|
+
|
|
279
|
+
\f[I]# Kill a specific instance\f[R]
|
|
280
|
+
cline instance kill localhost:50052
|
|
281
|
+
|
|
282
|
+
\f[I]# Kill all CLI instances\f[R]
|
|
283
|
+
cline instance kill \-\-all\-cli
|
|
284
|
+
.EE
|
|
285
|
+
.SS Task History
|
|
286
|
+
Work with task history:
|
|
287
|
+
.IP
|
|
288
|
+
.EX
|
|
289
|
+
\f[I]# List previous tasks\f[R]
|
|
290
|
+
cline task list
|
|
291
|
+
|
|
292
|
+
\f[I]# Resume a previous task\f[R]
|
|
293
|
+
cline task open 1760501486669
|
|
294
|
+
|
|
295
|
+
\f[I]# View conversation history\f[R]
|
|
296
|
+
cline task view
|
|
297
|
+
|
|
298
|
+
\f[I]# Start interactive chat with this task\f[R]
|
|
299
|
+
cline task chat
|
|
300
|
+
.EE
|
|
301
|
+
.SH ARCHITECTURE
|
|
302
|
+
Cline operates on a three\-layer architecture:
|
|
303
|
+
.TP
|
|
304
|
+
\f[B]Presentation Layer\f[R]
|
|
305
|
+
User interfaces (CLI, VSCode, JetBrains) that connect to Cline Core via
|
|
306
|
+
gRPC
|
|
307
|
+
.TP
|
|
308
|
+
\f[B]Cline Core\f[R]
|
|
309
|
+
The autonomous agent service handling task management, AI model
|
|
310
|
+
integration, state management, tool orchestration, and real\-time
|
|
311
|
+
streaming updates
|
|
312
|
+
.TP
|
|
313
|
+
\f[B]Host Provider Layer\f[R]
|
|
314
|
+
Environment\-specific integrations (VSCode APIs, JetBrains APIs, shell
|
|
315
|
+
APIs) that Cline Core uses to interact with the host system
|
|
316
|
+
.SH BUGS
|
|
317
|
+
Report bugs at: \c
|
|
318
|
+
.UR https://github.com/cline/cline/issues
|
|
319
|
+
.UE \c
|
|
320
|
+
.PP
|
|
321
|
+
For real\-time help, join the Discord community at: \c
|
|
322
|
+
.UR https://discord.gg/cline
|
|
323
|
+
.UE \c
|
|
324
|
+
.SH SEE ALSO
|
|
325
|
+
Full documentation: \c
|
|
326
|
+
.UR https://docs.cline.bot
|
|
327
|
+
.UE \c
|
|
328
|
+
.SH AUTHORS
|
|
329
|
+
Cline is developed by the Cline Bot Inc.\ and the open source community.
|
|
330
|
+
.SH COPYRIGHT
|
|
331
|
+
Copyright © 2025 Cline Bot Inc.\ Licensed under the Apache License 2.0.
|
package/man/cline.1.md
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CLINE
|
|
3
|
+
section: 1
|
|
4
|
+
header: User Commands
|
|
5
|
+
footer: Cline CLI 1.0
|
|
6
|
+
date: January 2025
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# NAME
|
|
10
|
+
|
|
11
|
+
cline - orchestrate and interact with Cline AI coding agents
|
|
12
|
+
|
|
13
|
+
# SYNOPSIS
|
|
14
|
+
|
|
15
|
+
**cline** [*prompt*] [*options*]
|
|
16
|
+
|
|
17
|
+
**cline** *command* [*subcommand*] [*options*] [*arguments*]
|
|
18
|
+
|
|
19
|
+
# DESCRIPTION
|
|
20
|
+
|
|
21
|
+
Try: cat README.md | cline "Summarize this for me:"
|
|
22
|
+
|
|
23
|
+
**cline** is a command-line interface for orchestrating multiple Cline AI coding agents. Cline is an autonomous AI agent who can read, write, and execute code across your projects. He operates through a client-server architecture where **Cline Core** runs as a standalone service, and the CLI acts as a scriptable interface for managing tasks, instances, and agent interactions.
|
|
24
|
+
|
|
25
|
+
The CLI is designed for both interactive use and automation, making it ideal for CI/CD pipelines, parallel task execution, and terminal-based workflows. Multiple frontends (CLI, VSCode, JetBrains) can attach to the same Cline Core instance, enabling seamless task handoff between environments.
|
|
26
|
+
|
|
27
|
+
# MODES OF OPERATION
|
|
28
|
+
|
|
29
|
+
**Instant Task Mode**
|
|
30
|
+
|
|
31
|
+
: The simplest invocation: **cline "prompt here"** immediately spawns an instance, creates a task, and enters chat mode. This is equivalent to running **cline instance new && cline task new && cline task chat** in sequence.
|
|
32
|
+
|
|
33
|
+
**Subcommand Mode**
|
|
34
|
+
|
|
35
|
+
: Advanced usage with explicit control: **cline \<command\> [subcommand] [options]** provides fine-grained control over instances, tasks, authentication, and configuration.
|
|
36
|
+
|
|
37
|
+
# AGENT BEHAVIOR
|
|
38
|
+
|
|
39
|
+
Cline operates in two primary modes:
|
|
40
|
+
|
|
41
|
+
**ACT MODE**
|
|
42
|
+
|
|
43
|
+
: Cline actively uses tools to accomplish tasks. He can read files, write code, execute commands, use a headless browser, and more. This is the default mode for task execution.
|
|
44
|
+
|
|
45
|
+
**PLAN MODE**
|
|
46
|
+
|
|
47
|
+
: Cline gathers information and creates a detailed plan before implementation. He explores the codebase, asks clarifying questions, and presents a strategy for user approval before switching to ACT MODE.
|
|
48
|
+
|
|
49
|
+
# INSTANT TASK OPTIONS
|
|
50
|
+
|
|
51
|
+
When using the instant task syntax **cline "prompt"** the following options are available:
|
|
52
|
+
|
|
53
|
+
**-o**, **\--oneshot**
|
|
54
|
+
|
|
55
|
+
: Full autonomous mode. Cline completes the task and stops following after completion. Example: cline -o "what's 6 + 8?"
|
|
56
|
+
|
|
57
|
+
**-s**, **\--setting** *setting* *value*
|
|
58
|
+
|
|
59
|
+
: Override a setting for this task
|
|
60
|
+
|
|
61
|
+
**-y**, **\--no-interactive**, **\--yolo**
|
|
62
|
+
|
|
63
|
+
: Enable fully autonomous mode. Disables all interactivity:
|
|
64
|
+
- ask_followup_question tool is disabled
|
|
65
|
+
- attempt_completion happens automatically
|
|
66
|
+
- execute_command runs in non-blocking mode with timeout
|
|
67
|
+
- PLAN MODE automatically switches to ACT MODE
|
|
68
|
+
|
|
69
|
+
**-m**, **\--mode** *mode*
|
|
70
|
+
|
|
71
|
+
: Starting mode. Options: **act** (default), **plan**
|
|
72
|
+
|
|
73
|
+
# GLOBAL OPTIONS
|
|
74
|
+
|
|
75
|
+
These options apply to all subcommands:
|
|
76
|
+
|
|
77
|
+
**-F**, **\--output-format** *format*
|
|
78
|
+
|
|
79
|
+
: Output format. Options: **rich** (default), **json**, **plain**
|
|
80
|
+
|
|
81
|
+
**-h**, **\--help**
|
|
82
|
+
|
|
83
|
+
: Display help information for the command.
|
|
84
|
+
|
|
85
|
+
**-v**, **\--verbose**
|
|
86
|
+
|
|
87
|
+
: Enable verbose output for debugging.
|
|
88
|
+
|
|
89
|
+
# COMMANDS
|
|
90
|
+
|
|
91
|
+
## Authentication
|
|
92
|
+
|
|
93
|
+
**cline auth** [*provider*] [*key*]
|
|
94
|
+
|
|
95
|
+
**cline a** [*provider*] [*key*]
|
|
96
|
+
|
|
97
|
+
: Configure authentication for AI model providers. Launches an interactive wizard if no arguments provided. If provider is specified without a key, prompts for the key or launches the appropriate OAuth flow.
|
|
98
|
+
|
|
99
|
+
## Instance Management
|
|
100
|
+
|
|
101
|
+
Cline Core instances are independent agent processes that can run in the background. Multiple instances can run simultaneously, enabling parallel task execution.
|
|
102
|
+
|
|
103
|
+
**cline instance**
|
|
104
|
+
|
|
105
|
+
**cline i**
|
|
106
|
+
|
|
107
|
+
: Display instance management help.
|
|
108
|
+
|
|
109
|
+
**cline instance new** [**-d**|**\--default**]
|
|
110
|
+
|
|
111
|
+
**cline i n** [**-d**|**\--default**]
|
|
112
|
+
|
|
113
|
+
: Spawn a new Cline Core instance. Use **\--default** to set it as the default instance for subsequent commands.
|
|
114
|
+
|
|
115
|
+
**cline instance list**
|
|
116
|
+
|
|
117
|
+
**cline i l**
|
|
118
|
+
|
|
119
|
+
: List all running Cline Core instances with their addresses and status.
|
|
120
|
+
|
|
121
|
+
**cline instance default** *address*
|
|
122
|
+
|
|
123
|
+
**cline i d** *address*
|
|
124
|
+
|
|
125
|
+
: Set the default instance to avoid specifying **\--address** in task commands.
|
|
126
|
+
|
|
127
|
+
**cline instance kill** *address* [**-a**|**\--all**]
|
|
128
|
+
|
|
129
|
+
**cline i k** *address* [**-a**|**\--all**]
|
|
130
|
+
|
|
131
|
+
: Terminate a Cline Core instance. Use **\--all** to kill all running instances.
|
|
132
|
+
|
|
133
|
+
## Task Management
|
|
134
|
+
|
|
135
|
+
Tasks represent individual work items that Cline executes. Tasks maintain conversation history, checkpoints, and settings.
|
|
136
|
+
|
|
137
|
+
**cline task** [**-a**|**\--address** *ADDR*]
|
|
138
|
+
|
|
139
|
+
**cline t** [**-a**|**\--address** *ADDR*]
|
|
140
|
+
|
|
141
|
+
: Display task management help. The **\--address** flag specifies which Cline Core instance to use (e.g., localhost:50052).
|
|
142
|
+
|
|
143
|
+
**cline task new** *prompt* [*options*]
|
|
144
|
+
|
|
145
|
+
**cline t n** *prompt* [*options*]
|
|
146
|
+
|
|
147
|
+
: Create a new task in the default or specified instance. Options:
|
|
148
|
+
|
|
149
|
+
**-s**, **\--setting** *setting* *value*
|
|
150
|
+
: Set task-specific settings
|
|
151
|
+
|
|
152
|
+
**-y**, **\--no-interactive**, **\--yolo**
|
|
153
|
+
: Enable autonomous mode
|
|
154
|
+
|
|
155
|
+
**-m**, **\--mode** *mode*
|
|
156
|
+
: Starting mode (act or plan)
|
|
157
|
+
|
|
158
|
+
**cline task open** *task-id* [*options*]
|
|
159
|
+
|
|
160
|
+
**cline t o** *task-id* [*options*]
|
|
161
|
+
|
|
162
|
+
: Resume a previous task from history. Accepts the same options as **task new**.
|
|
163
|
+
|
|
164
|
+
**cline task list**
|
|
165
|
+
|
|
166
|
+
**cline t l**
|
|
167
|
+
|
|
168
|
+
: List all tasks in history with their id and snippet
|
|
169
|
+
|
|
170
|
+
**cline task chat**
|
|
171
|
+
|
|
172
|
+
**cline t c**
|
|
173
|
+
|
|
174
|
+
: Enter interactive chat mode for the current task. Allows back-and-forth conversation with Cline.
|
|
175
|
+
|
|
176
|
+
**cline task send** [*message*] [*options*]
|
|
177
|
+
|
|
178
|
+
**cline t s** [*message*] [*options*]
|
|
179
|
+
|
|
180
|
+
: Send a message to Cline. If no message is provided, reads from stdin. Options:
|
|
181
|
+
|
|
182
|
+
**-a**, **\--approve**
|
|
183
|
+
: Approve Cline's proposed action
|
|
184
|
+
|
|
185
|
+
**-d**, **\--deny**
|
|
186
|
+
: Deny Cline's proposed action
|
|
187
|
+
|
|
188
|
+
**-f**, **\--file** *FILE*
|
|
189
|
+
: Attach a file to the message
|
|
190
|
+
|
|
191
|
+
**-y**, **\--no-interactive**, **\--yolo**
|
|
192
|
+
: Enable autonomous mode
|
|
193
|
+
|
|
194
|
+
**-m**, **\--mode** *mode*
|
|
195
|
+
: Switch mode (act or plan)
|
|
196
|
+
|
|
197
|
+
**cline task view** [**-f**|**\--follow**] [**-c**|**\--follow-complete**]
|
|
198
|
+
|
|
199
|
+
**cline t v** [**-f**|**\--follow**] [**-c**|**\--follow-complete**]
|
|
200
|
+
|
|
201
|
+
: Display the current conversation. Use **\--follow** to stream updates in real-time, or **\--follow-complete** to follow until task completion.
|
|
202
|
+
|
|
203
|
+
**cline task restore** *checkpoint*
|
|
204
|
+
|
|
205
|
+
**cline t r** *checkpoint*
|
|
206
|
+
|
|
207
|
+
: Restore the task to a previous checkpoint state.
|
|
208
|
+
|
|
209
|
+
**cline task pause**
|
|
210
|
+
|
|
211
|
+
**cline t p**
|
|
212
|
+
|
|
213
|
+
: Pause task execution.
|
|
214
|
+
|
|
215
|
+
## Configuration
|
|
216
|
+
|
|
217
|
+
Configuration can be set globally. Override these global settings for a task using the **\--setting** flag
|
|
218
|
+
|
|
219
|
+
**cline config**
|
|
220
|
+
|
|
221
|
+
**cline c**
|
|
222
|
+
|
|
223
|
+
**cline config set** *key* *value*
|
|
224
|
+
|
|
225
|
+
**cline c s** *key* *value*
|
|
226
|
+
|
|
227
|
+
: Set a configuration variable.
|
|
228
|
+
|
|
229
|
+
**cline config get** *key*
|
|
230
|
+
|
|
231
|
+
**cline c g** *key*
|
|
232
|
+
|
|
233
|
+
: Read a configuration variable.
|
|
234
|
+
|
|
235
|
+
**cline config list**
|
|
236
|
+
|
|
237
|
+
**cline c l**
|
|
238
|
+
|
|
239
|
+
: List all configuration variables and their values.
|
|
240
|
+
|
|
241
|
+
# TASK SETTINGS
|
|
242
|
+
|
|
243
|
+
Task settings are persisted in the *~/.cline/x/tasks* directory. When resuming a task with **cline task open**, task settings are automatically restored.
|
|
244
|
+
|
|
245
|
+
Common settings include:
|
|
246
|
+
|
|
247
|
+
**yolo**
|
|
248
|
+
|
|
249
|
+
: Enable autonomous mode (true/false)
|
|
250
|
+
|
|
251
|
+
**mode**
|
|
252
|
+
|
|
253
|
+
: Starting mode (act/plan)
|
|
254
|
+
|
|
255
|
+
# NOTES & EXAMPLES
|
|
256
|
+
|
|
257
|
+
The **cline task send** and **cline task new** commands support reading from stdin, enabling powerful pipeline compositions:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
cat requirements.txt | cline task send
|
|
261
|
+
echo "Refactor this code" | cline -y
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Instance Management
|
|
265
|
+
|
|
266
|
+
Manage multiple Cline instances:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# Start a new instance and make it default
|
|
270
|
+
cline instance new --default
|
|
271
|
+
|
|
272
|
+
# List all running instances
|
|
273
|
+
cline instance list
|
|
274
|
+
|
|
275
|
+
# Kill a specific instance
|
|
276
|
+
cline instance kill localhost:50052
|
|
277
|
+
|
|
278
|
+
# Kill all CLI instances
|
|
279
|
+
cline instance kill --all-cli
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Task History
|
|
283
|
+
|
|
284
|
+
Work with task history:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
# List previous tasks
|
|
288
|
+
cline task list
|
|
289
|
+
|
|
290
|
+
# Resume a previous task
|
|
291
|
+
cline task open 1760501486669
|
|
292
|
+
|
|
293
|
+
# View conversation history
|
|
294
|
+
cline task view
|
|
295
|
+
|
|
296
|
+
# Start interactive chat with this task
|
|
297
|
+
cline task chat
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
# ARCHITECTURE
|
|
301
|
+
|
|
302
|
+
Cline operates on a three-layer architecture:
|
|
303
|
+
|
|
304
|
+
**Presentation Layer**
|
|
305
|
+
|
|
306
|
+
: User interfaces (CLI, VSCode, JetBrains) that connect to Cline Core via gRPC
|
|
307
|
+
|
|
308
|
+
**Cline Core**
|
|
309
|
+
|
|
310
|
+
: The autonomous agent service handling task management, AI model integration, state management, tool orchestration, and real-time streaming updates
|
|
311
|
+
|
|
312
|
+
**Host Provider Layer**
|
|
313
|
+
|
|
314
|
+
: Environment-specific integrations (VSCode APIs, JetBrains APIs, shell APIs) that Cline Core uses to interact with the host system
|
|
315
|
+
|
|
316
|
+
# BUGS
|
|
317
|
+
|
|
318
|
+
Report bugs at: <https://github.com/cline/cline/issues>
|
|
319
|
+
|
|
320
|
+
For real-time help, join the Discord community at: <https://discord.gg/cline>
|
|
321
|
+
|
|
322
|
+
# SEE ALSO
|
|
323
|
+
|
|
324
|
+
Full documentation: <https://docs.cline.bot>
|
|
325
|
+
|
|
326
|
+
# AUTHORS
|
|
327
|
+
|
|
328
|
+
Cline is developed by the Cline Bot Inc. and the open source community.
|
|
329
|
+
|
|
330
|
+
# COPYRIGHT
|
|
331
|
+
|
|
332
|
+
Copyright © 2025 Cline Bot Inc. Licensed under the Apache License 2.0.
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@caretive/caret-cli",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Caretive CLI - autonomous coding agent for Caret with Caret mode prompts/branding",
|
|
5
|
+
"main": "caret-core.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"caret": "./bin/caret",
|
|
8
|
+
"caret-host": "./bin/caret-host"
|
|
9
|
+
},
|
|
10
|
+
"man": "./man/caret.1",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"postinstall": "node postinstall.js"
|
|
13
|
+
},
|
|
14
|
+
"bundleDependencies": [
|
|
15
|
+
"@grpc/grpc-js",
|
|
16
|
+
"@grpc/reflection",
|
|
17
|
+
"better-sqlite3",
|
|
18
|
+
"grpc-health-check",
|
|
19
|
+
"open",
|
|
20
|
+
"vscode-uri"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=20.0.0"
|
|
24
|
+
},
|
|
25
|
+
"keywords": ["caret", "caretive", "ai", "cli", "coding", "agent", "autonomous", "mcp"],
|
|
26
|
+
"author": {
|
|
27
|
+
"name": "Caretive Inc."
|
|
28
|
+
},
|
|
29
|
+
"license": "Apache-2.0",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/caretive/caret-cli"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://caretive.ai",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/caretive/caret-cli/issues"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@grpc/grpc-js": "^1.13.3",
|
|
40
|
+
"@grpc/reflection": "^1.0.4",
|
|
41
|
+
"better-sqlite3": "^12.2.0",
|
|
42
|
+
"grpc-health-check": "^2.0.2",
|
|
43
|
+
"open": "^10.1.2",
|
|
44
|
+
"vscode-uri": "^3.1.0"
|
|
45
|
+
},
|
|
46
|
+
"os": [
|
|
47
|
+
"darwin",
|
|
48
|
+
"linux"
|
|
49
|
+
],
|
|
50
|
+
"cpu": [
|
|
51
|
+
"x64",
|
|
52
|
+
"arm64"
|
|
53
|
+
]
|
|
54
|
+
}
|