0
# System Management
1
2
Daemon management, system information, debugging utilities, and configuration tools for maintaining optimal Turbo performance and troubleshooting issues.
3
4
## Capabilities
5
6
### Daemon Management
7
8
Control the Turbo daemon process for improved performance through persistent analysis and caching.
9
10
```bash { .api }
11
turbo daemon [command] [options]
12
13
# Start daemon server (default when no command)
14
turbo daemon
15
16
# Daemon management commands
17
turbo daemon start
18
turbo daemon stop
19
turbo daemon restart
20
turbo daemon status
21
turbo daemon clean
22
turbo daemon logs
23
```
24
25
**Daemon Options:**
26
27
```bash { .api }
28
--idle-time <duration> # Daemon idle timeout (default: "4h0m0s")
29
--turbo-json-path <path> # Custom turbo.json file to watch
30
```
31
32
**Daemon Commands:**
33
34
```bash { .api }
35
# Daemon lifecycle
36
turbo daemon start # Ensure daemon is running
37
turbo daemon stop # Stop the daemon
38
turbo daemon restart # Restart the daemon
39
40
# Daemon status and monitoring
41
turbo daemon status # Show daemon status
42
turbo daemon status --json # Status in JSON format
43
turbo daemon logs # Show daemon logs
44
45
# Daemon maintenance
46
turbo daemon clean # Stop daemon and clean state
47
turbo daemon clean --clean-logs # Also clean log files
48
```
49
50
**Usage Examples:**
51
52
```bash
53
# Start daemon with custom idle timeout
54
turbo daemon --idle-time=2h
55
56
# Check if daemon is running
57
turbo daemon status
58
59
# Get daemon status as JSON for automation
60
turbo daemon status --json
61
62
# View daemon activity logs
63
turbo daemon logs
64
65
# Clean restart with state cleanup
66
turbo daemon clean && turbo daemon start
67
68
# Watch custom turbo.json file
69
turbo daemon --turbo-json-path=./config/turbo.json
70
```
71
72
### System Information
73
74
Display comprehensive system and environment information for debugging and support.
75
76
```bash { .api }
77
turbo info
78
79
# Displays information about:
80
# - Turbo version and installation
81
# - System environment (OS, CPU, memory)
82
# - Repository structure and configuration
83
# - Package manager and dependencies
84
# - Cache configuration and status
85
```
86
87
**Information Categories:**
88
89
- **Turbo Version**: Installed version, binary path, installation method
90
- **System**: Operating system, CPU architecture, memory
91
- **Repository**: Root path, package manager, workspace configuration
92
- **Configuration**: Active turbo.json, cache settings, daemon status
93
- **Environment**: Node.js version, npm/yarn/pnpm versions
94
- **Cache**: Local cache directory and size, remote cache status
95
96
**Usage Examples:**
97
98
```bash
99
# Show complete system information
100
turbo info
101
102
# Redirect to file for bug reports
103
turbo info > system-info.txt
104
105
# Use in CI for debugging builds
106
turbo info && turbo run build
107
```
108
109
### Repository Scanning
110
111
Analyze your monorepo for common issues, performance improvements, and best practices.
112
113
```bash { .api }
114
turbo scan
115
116
# Analyzes repository for:
117
# - Configuration issues and improvements
118
# - Performance optimization opportunities
119
# - Caching effectiveness
120
# - Task dependency optimization
121
# - Package structure recommendations
122
```
123
124
**Scan Categories:**
125
126
- **Configuration Analysis**: turbo.json validation and optimization suggestions
127
- **Performance Issues**: Slow tasks, inefficient dependencies, cache misses
128
- **Best Practices**: Workspace organization, task naming conventions
129
- **Security**: Dependency vulnerabilities, sensitive file exposure
130
- **Maintenance**: Outdated dependencies, unused packages
131
132
**Usage Examples:**
133
134
```bash
135
# Run comprehensive repository scan
136
turbo scan
137
138
# Use in CI for automated analysis
139
turbo scan && echo "Repository scan completed"
140
141
# Run scan after configuration changes
142
turbo scan > scan-results.txt
143
```
144
145
### Binary Information
146
147
Get the path to the Turbo binary for integration and debugging purposes.
148
149
```bash { .api }
150
turbo bin
151
152
# Returns the absolute path to the turbo binary
153
# Useful for:
154
# - Integration with other tools
155
# - Debugging installation issues
156
# - Custom wrapper scripts
157
```
158
159
**Usage Examples:**
160
161
```bash
162
# Get binary path
163
turbo bin
164
165
# Use in scripts
166
TURBO_BIN=$(turbo bin)
167
echo "Using Turbo at: $TURBO_BIN"
168
169
# Verify installation
170
ls -la $(turbo bin)
171
```
172
173
### Configuration Management
174
175
Manage Turbo configuration files and settings.
176
177
```bash { .api }
178
turbo config
179
180
# Configuration management (hidden command)
181
# Handles turbo.json validation and management
182
```
183
184
### GraphQL Query Interface
185
186
EXPERIMENTAL: Query your monorepo structure and metadata using GraphQL.
187
188
```bash { .api }
189
turbo query [query] [options]
190
191
# Interactive GraphQL interface
192
turbo query
193
194
# Execute specific query
195
turbo query "{ packages { name version } }"
196
197
# Query with variables
198
turbo query --variables=vars.json "query($filter: String) { packages(filter: $filter) { name } }"
199
200
# Show GraphQL schema
201
turbo query --schema
202
```
203
204
**Query Options:**
205
206
```bash { .api }
207
--variables <file> / -V # JSON file with query variables
208
--schema # Show GraphQL schema instead of running query
209
```
210
211
**Usage Examples:**
212
213
```bash
214
# Open interactive GraphQL explorer
215
turbo query
216
217
# Get all package names and versions
218
turbo query "{ packages { name version path } }"
219
220
# Query with filtering
221
turbo query "{ packages(filter: \"@myorg/*\") { name scripts } }"
222
223
# Show available schema
224
turbo query --schema
225
226
# Query with variables file
227
echo '{"scope": "@myorg"}' > vars.json
228
turbo query --variables=vars.json "query($scope: String) {
229
packages(filter: $scope) { name dependencies }
230
}"
231
```
232
233
### Shell Completion
234
235
Generate shell completion scripts for improved command-line experience.
236
237
```bash { .api }
238
turbo completion <shell>
239
240
# Supported shells
241
turbo completion bash
242
turbo completion zsh
243
turbo completion fish
244
turbo completion powershell
245
turbo completion elvish
246
```
247
248
**Installation Examples:**
249
250
```bash
251
# Bash completion
252
turbo completion bash > /etc/bash_completion.d/turbo
253
254
# Zsh completion (Oh My Zsh)
255
turbo completion zsh > ~/.oh-my-zsh/completions/_turbo
256
257
# Fish completion
258
turbo completion fish > ~/.config/fish/completions/turbo.fish
259
260
# PowerShell completion
261
turbo completion powershell >> $PROFILE
262
```
263
264
### Telemetry Management
265
266
Control anonymous telemetry collection for improving Turbo development.
267
268
```bash { .api }
269
turbo telemetry [command]
270
271
# Telemetry commands
272
turbo telemetry enable # Enable anonymous telemetry
273
turbo telemetry disable # Disable telemetry collection
274
turbo telemetry status # Show current telemetry status
275
```
276
277
**Usage Examples:**
278
279
```bash
280
# Check current telemetry status
281
turbo telemetry status
282
283
# Disable telemetry collection
284
turbo telemetry disable
285
286
# Re-enable telemetry
287
turbo telemetry enable
288
```
289
290
## System Management Types
291
292
```typescript { .api }
293
interface DaemonStatus {
294
running: boolean;
295
pid?: number;
296
uptime?: string;
297
idle_time: string;
298
version: string;
299
log_file?: string;
300
}
301
302
interface SystemInfo {
303
turbo: TurboInfo;
304
system: SystemEnvironment;
305
repository: RepositoryInfo;
306
configuration: ConfigurationInfo;
307
cache: CacheInfo;
308
}
309
310
interface TurboInfo {
311
version: string;
312
binary_path: string;
313
installation_method: "npm" | "yarn" | "pnpm" | "binary";
314
}
315
316
interface SystemEnvironment {
317
os: string;
318
arch: string;
319
cpus: number;
320
memory: number;
321
node_version: string;
322
npm_version?: string;
323
yarn_version?: string;
324
pnpm_version?: string;
325
}
326
327
interface RepositoryInfo {
328
root: string;
329
package_manager: "npm" | "yarn" | "pnpm";
330
workspaces: string[];
331
packages: number;
332
}
333
334
interface ConfigurationInfo {
335
turbo_json_path: string;
336
cache_dir: string;
337
daemon_enabled: boolean;
338
remote_cache_enabled: boolean;
339
}
340
341
interface CacheInfo {
342
local_cache_dir: string;
343
local_cache_size: number;
344
remote_cache_status: "enabled" | "disabled" | "read-only";
345
}
346
347
interface ScanResult {
348
issues: ScanIssue[];
349
recommendations: Recommendation[];
350
performance_score: number;
351
summary: ScanSummary;
352
}
353
354
interface ScanIssue {
355
type: "error" | "warning" | "info";
356
category: string;
357
message: string;
358
file?: string;
359
line?: number;
360
fix_suggestion?: string;
361
}
362
363
interface Recommendation {
364
category: string;
365
title: string;
366
description: string;
367
impact: "high" | "medium" | "low";
368
effort: "high" | "medium" | "low";
369
}
370
371
interface ScanSummary {
372
total_issues: number;
373
errors: number;
374
warnings: number;
375
recommendations: number;
376
scan_duration: number;
377
}
378
379
interface QueryResult {
380
data?: any;
381
errors?: QueryError[];
382
}
383
384
interface QueryError {
385
message: string;
386
locations?: QueryLocation[];
387
}
388
389
interface QueryLocation {
390
line: number;
391
column: number;
392
}
393
394
interface TelemetryStatus {
395
enabled: boolean;
396
anonymous_id?: string;
397
last_sent?: string;
398
}
399
```