0
# Project Information
1
2
Display comprehensive information about your NestJS project including dependencies, versions, system information, and project configuration. The info command provides a detailed overview of your development environment and project setup.
3
4
## Capabilities
5
6
### Info Command
7
8
Displays detailed project and system information in a formatted, easy-to-read layout.
9
10
```bash { .api }
11
# Display project information
12
nest info [options]
13
nest i [options]
14
15
# Options:
16
-h, --help # Output usage information
17
```
18
19
**Usage Examples:**
20
21
```bash
22
# Display full project information
23
nest info
24
25
# Using alias
26
nest i
27
28
# Get help for info command
29
nest info --help
30
```
31
32
## Information Categories
33
34
### System Information
35
36
The command displays comprehensive system details:
37
38
```bash { .api }
39
# System Information Output:
40
[System Information]
41
OS Version : Linux 5.4.0
42
NodeJS Version : v18.17.0
43
YARN Version : 1.22.19
44
NPM Version : 9.8.1
45
46
[Nest CLI]
47
Nest CLI Version : 10.1.0
48
49
[Nest Platform Information]
50
platform-express version : 10.1.0
51
platform-fastify version : Not Found
52
platform-socket.io version : Not Found
53
platform-ws version : Not Found
54
```
55
56
### NestJS Ecosystem
57
58
Information about installed NestJS packages and their versions:
59
60
```bash { .api }
61
# NestJS Package Versions:
62
@nestjs/core version : 10.1.0
63
@nestjs/common version : 10.1.0
64
@nestjs/microservices version: 10.1.0
65
@nestjs/websockets version : 10.1.0
66
@nestjs/testing version : 10.1.0
67
@nestjs/platform-express version: 10.1.0
68
@nestjs/cli version : 10.1.0
69
@nestjs/schematics version : 10.0.2
70
```
71
72
### Development Dependencies
73
74
Information about key development tools and their versions:
75
76
```bash { .api }
77
# Development Tools:
78
TypeScript version : 5.1.6
79
Webpack version : 5.88.0
80
Jest version : 29.6.0
81
Prettier version : 3.0.0
82
ESLint version : 8.44.0
83
```
84
85
### Project Configuration
86
87
Details about the current project setup:
88
89
```bash { .api }
90
# Project Configuration:
91
Nest CLI Configuration:
92
Source Root: src
93
Collection: @nestjs/schematics
94
Entry File: main
95
```
96
97
## Output Format
98
99
### Formatted Display
100
101
The command uses a clean, organized format with:
102
- Section headers in brackets
103
- Aligned key-value pairs
104
- Version information clearly displayed
105
- Color-coded output for better readability
106
107
### Table Format
108
109
Some information is displayed in table format for better organization:
110
111
```
112
┌─────────────────────────┬─────────────────────────┐
113
│ Package │ Version │
114
├─────────────────────────┼─────────────────────────┤
115
│ @nestjs/core │ ^10.1.0 │
116
│ @nestjs/common │ ^10.1.0 │
117
│ @nestjs/platform-express│ ^10.1.0 │
118
└─────────────────────────┴─────────────────────────┘
119
```
120
121
## Use Cases
122
123
### Environment Verification
124
125
Quickly verify your development environment setup:
126
127
```bash { .api }
128
# Check if all required tools are installed
129
nest info
130
131
# Verify specific version requirements
132
# Useful before starting development or deployment
133
```
134
135
### Troubleshooting
136
137
Gather system information for bug reports and support:
138
139
```bash { .api }
140
# Collect information for GitHub issues
141
nest info > system-info.txt
142
143
# Share environment details with team members
144
# Useful for debugging environment-specific issues
145
```
146
147
### Project Auditing
148
149
Audit project dependencies and versions:
150
151
```bash { .api }
152
# Check for outdated packages
153
nest info
154
155
# Verify consistent versions across environments
156
# Useful during project maintenance
157
```
158
159
## Dependency Detection
160
161
### Automatic Discovery
162
163
The command automatically detects:
164
- Installed NestJS packages and their versions
165
- Development tools (TypeScript, Webpack, Jest, etc.)
166
- System information (OS, Node.js version)
167
- Package managers (npm, yarn, pnpm)
168
169
### Missing Dependencies
170
171
When dependencies are not found:
172
173
```bash { .api }
174
# Example output for missing packages:
175
@nestjs/graphql version : Not Found
176
@nestjs/typeorm version : Not Found
177
Webpack version : Not Found
178
```
179
180
## Project Structure Analysis
181
182
### Monorepo Support
183
184
For monorepo projects, the command shows:
185
- Root-level dependencies
186
- CLI configuration for the workspace
187
- Global tool versions
188
- Individual project configurations
189
190
### Configuration Files
191
192
The command reads and displays information from:
193
- `package.json` - for dependency versions
194
- `nest-cli.json` - for CLI configuration
195
- `tsconfig.json` - for TypeScript settings
196
- `angular.json` - for workspace configuration (if present)
197
198
## Integration with CI/CD
199
200
### Automated Environment Checks
201
202
```bash { .api }
203
# In CI/CD pipelines
204
nest info
205
# Use exit code to verify required tools are present
206
# Include in deployment scripts for environment validation
207
```
208
209
### Version Consistency
210
211
```bash { .api }
212
# Check version consistency across environments
213
nest info | grep "@nestjs/core"
214
# Useful for ensuring production matches development versions
215
```
216
217
## Output Customization
218
219
### Environment Variables
220
221
The command respects environment variables:
222
- `NODE_ENV` - affects some package detection
223
- `NPM_CONFIG_PREFIX` - for global package locations
224
- Package manager specific configurations
225
226
### JSON Output
227
228
While not built-in, you can process the output for programmatic use:
229
230
```bash { .api }
231
# Parse specific information
232
nest info | grep "NodeJS Version" | cut -d: -f2
233
nest info | grep "@nestjs/core" | cut -d: -f2
234
```
235
236
## Common Information Displayed
237
238
### Runtime Environment
239
240
- Operating System version and architecture
241
- Node.js version and installation path
242
- Package manager versions (npm, yarn, pnpm)
243
- Global CLI tool versions
244
245
### NestJS Ecosystem
246
247
- Core framework packages
248
- Platform adapters (Express, Fastify)
249
- Add-on packages (GraphQL, TypeORM, etc.)
250
- Development and testing tools
251
252
### Build Tools
253
254
- TypeScript compiler version
255
- Build system tools (Webpack, SWC)
256
- Testing frameworks (Jest, etc.)
257
- Code quality tools (ESLint, Prettier)
258
259
### Project Metadata
260
261
- CLI configuration settings
262
- Source root directory
263
- Default schematics collection
264
- Entry file configuration
265
266
## Troubleshooting Common Issues
267
268
### Version Mismatches
269
270
The command helps identify:
271
- Incompatible package versions
272
- Missing peer dependencies
273
- Outdated CLI versions
274
- Conflicting tool versions
275
276
### Environment Problems
277
278
Diagnose environment issues:
279
- Node.js version compatibility
280
- Package manager configuration
281
- Global vs. local installations
282
- Path and permission issues