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

# Command Reference

> Complete reference for just commands and development utilities

ShipSec Studio uses [just](https://github.com/casey/just) as its command runner. Run `just` or `just help` to see all available commands.

***

## Getting Started

### Initialize Project

```bash theme={null}
just init
```

Sets up the development environment:

* Installs dependencies with Bun
* Creates environment files from examples (`backend/.env`, `worker/.env`, `frontend/.env`)

***

## Development Commands

### Start Development Environment

```bash theme={null}
just dev
```

Starts the full development environment with hot-reload:

* Checks for environment files
* Starts Docker infrastructure (Postgres, Temporal, MinIO, Loki)
* Waits for services to be ready
* Runs database migrations
* Starts backend, worker, and frontend via PM2

**Access points (all via nginx on port 80):**

| Service     | URL                                                        |
| ----------- | ---------------------------------------------------------- |
| Frontend    | [http://localhost/](http://localhost/)                     |
| Backend API | [http://localhost/api/](http://localhost/api/)             |
| Analytics   | [http://localhost/analytics/](http://localhost/analytics/) |
| Temporal UI | [http://localhost:8081](http://localhost:8081)             |

### Stop Development

```bash theme={null}
just dev stop
```

Stops all PM2 processes and Docker infrastructure.

### View Logs

```bash theme={null}
just dev logs
```

Streams logs from all application processes via PM2.

### Check Status

```bash theme={null}
just dev status
```

Shows status of PM2 processes and Docker containers.

***

## Production Commands

### Start Production

```bash theme={null}
just prod
```

Starts the production environment using Docker Compose with pre-built images.

**Access points (all via nginx on port 80):**

| Service     | URL                                                        |
| ----------- | ---------------------------------------------------------- |
| Frontend    | [http://localhost/](http://localhost/)                     |
| Backend API | [http://localhost/api/](http://localhost/api/)             |
| Analytics   | [http://localhost/analytics/](http://localhost/analytics/) |
| Temporal UI | [http://localhost:8081](http://localhost:8081)             |

### Build and Start

```bash theme={null}
just prod build
```

Builds Docker images and starts the production environment.

### Stop Production

```bash theme={null}
just prod stop
```

Stops all production containers.

### View Production Logs

```bash theme={null}
just prod logs
```

Streams logs from all production containers.

### Check Production Status

```bash theme={null}
just prod status
```

Shows status of production containers.

### Clean Production

<Danger>This deletes all data.</Danger>

```bash theme={null}
just prod clean
```

Stops containers, removes volumes, and prunes Docker system.

***

## Infrastructure Commands

### Start Infrastructure

```bash theme={null}
just infra up
```

Starts only the infrastructure containers:

* PostgreSQL
* Temporal
* MinIO
* Redis
* Loki

### Stop Infrastructure

```bash theme={null}
just infra down
```

Stops all infrastructure containers.

### View Infrastructure Logs

```bash theme={null}
just infra logs
```

Streams logs from infrastructure containers.

### Clean Infrastructure

```bash theme={null}
just infra clean
```

Stops infrastructure and removes all volumes.

<Danger>This deletes all data.</Danger>

***

## Utility Commands

### Show All Status

```bash theme={null}
just status
```

Comprehensive status check showing:

* PM2 services
* Infrastructure containers
* Production containers

### Reset Database

```bash theme={null}
just db-reset
```

Drops and recreates the database, then runs migrations. **This deletes all data.**

<Warning>
  This command requires PostgreSQL to be running (`just dev` or `just infra up`).
</Warning>

### Build Images Only

```bash theme={null}
just build
```

Builds production Docker images without starting containers.

***

## Quick Reference

| Command            | Description                |
| ------------------ | -------------------------- |
| `just init`        | Initialize environment     |
| `just dev`         | Start development          |
| `just dev stop`    | Stop development           |
| `just dev logs`    | View dev logs              |
| `just dev status`  | Check dev status           |
| `just prod`        | Start production           |
| `just prod build`  | Build and start production |
| `just prod stop`   | Stop production            |
| `just prod logs`   | View production logs       |
| `just prod clean`  | Clean production data      |
| `just infra up`    | Start infrastructure       |
| `just infra down`  | Stop infrastructure        |
| `just infra logs`  | View infrastructure logs   |
| `just infra clean` | Clean infrastructure data  |
| `just status`      | Show all status            |
| `just db-reset`    | Reset database             |
| `just build`       | Build images               |
| `just help`        | Show help                  |

***

## Environment Files

The `just init` command creates these environment files:

| File            | Purpose                   |
| --------------- | ------------------------- |
| `backend/.env`  | Backend API configuration |
| `worker/.env`   | Worker configuration      |
| `frontend/.env` | Frontend configuration    |

Each file is created from its corresponding `.env.example` template.
