> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ubiquex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ubx output

> Show stack outputs from the last apply.

`ubx output` shows the output values exported by the current stack.

## Usage

```bash theme={null}
ubx output [flags]
```

## Examples

```bash theme={null}
ubx output                       # show all outputs
ubx output --format json         # JSON format
ubx output --env prod            # prod stack outputs
```

## Flags

| Flag              | Description                               |
| ----------------- | ----------------------------------------- |
| `--format string` | Output format: `text` (default) or `json` |
| `--env string`    | Target environment                        |
| `--stack string`  | Target stack name                         |

## Output

```
  ─── Outputs ────────────────────────

  db_endpoint  =  "db.xxxx.eu-west-1.rds.amazonaws.com"
  bucket_name  =  "prod-my-assets"
  db_password  =  [sensitive]
```

Sensitive outputs (marked `sensitive = true`) are shown as `[sensitive]` and never printed in plain text.

## JSON Format

```bash theme={null}
ubx output --format json
```

```json theme={null}
{
  "db_endpoint": "db.xxxx.eu-west-1.rds.amazonaws.com",
  "bucket_name": "prod-my-assets"
}
```

## Cross-Stack Usage

Outputs from one stack feed into another via `remote` blocks:

```hcl theme={null}
remote "platform" {
  source = "github.com/myorg/platform//stacks/networking"
  stack  = input.env
}

unit "aws_subnet" "app" {
  vpc_id = ~@platform.vpc_id
}
```
