# The process Object — Node.js

Source: https://www.geekswithgeeks.com/en/nodejs/node-process-object

> argv, cwd, and other details about the running program.

## Command-line arguments

`process.argv` is an array — the first two entries are the node binary and script path, the rest are your arguments.

```javascript
// greet.js
const name = process.argv[2] || "stranger";
console.log(`Hello, ${name}!`);

// $ node greet.js Ada
// Hello, Ada!
```

## cwd & platform

Useful runtime details without any import.

```javascript
console.log(process.cwd());       // current working directory
console.log(process.platform);    // 'linux', 'darwin', 'win32'
console.log(process.version);     // v20.11.0
```
