# Local development with pushq dev

> Run a local pushq task queue with `pushq dev` for development and testing. Real retries, delays and rate limits, with no account and no API key.

Source: https://pushqueue.dev/docs/getting-started/local-development/

`pushq dev` runs the real queue locally: delays, retries and rate limits behave exactly as they do in production, instead of being faked with synchronous calls.

```bash
pushq dev
```

That gives you SQLite in a temp file, no authentication, fast timers, and the dashboard at http://localhost:8080/. [Install pushq](https://pushqueue.dev/docs/self-hosting/install/) first if you don't have the binary.

## Point an SDK at your local server

SDKs default to the hosted API, so pass your local server's URL. `pushq dev` doesn't check API keys.


**TypeScript**

```ts

const pq = new Pushq({ baseUrl: "http://localhost:8080" });
```

**Python**

```python
from pushq import Pushq

pq = Pushq("http://localhost:8080")
```

**Go**

```go
pq := pushq.New("http://localhost:8080", "") // empty key: no Authorization header
```

**Java**

```java
Pushq pq = Pushq.builder()
    .baseUrl("http://localhost:8080")
    .build();
```

**.NET**

```csharp
using var pq = new PushqClient("http://localhost:8080");
```

**curl**

```bash
export PUSHQ_URL="http://localhost:8080"
```

## Try it with curl

```bash
# Create a queue that delivers to a receiver on port 9000
curl -X PUT localhost:8080/v1/queues/emails -d '{
  "rate_limits": {"max_dispatches_per_second": 5},
  "retry": {"max_attempts": 5, "min_backoff_seconds": 1, "max_backoff_seconds": 60},
  "target": {"base_url": "http://localhost:9000"}
}'

# Deliver now
curl -X POST localhost:8080/v1/queues/emails/tasks -d '{
  "path": "/send", "json_body": {"to": "a@example.com"}}'

# In 2 hours, deduplicated, with a per-task retry override
curl -X POST localhost:8080/v1/queues/emails/tasks -d '{
  "path": "/send",
  "json_body": {"to": "b@example.com"},
  "delay_seconds": 7200,
  "task_id": "welcome-user-42",
  "retry": {"max_attempts": 1}
}'
```

A second create with the same `task_id` returns `409 already_exists`; that's your deduplication.

For a receiver, the repository has [an Express example](https://github.com/blissfulrays/pushq/tree/main/examples/express-receiver) and [a FastAPI example](https://github.com/blissfulrays/pushq/tree/main/examples/fastapi-receiver), both of which verify signatures.

## Watch and operate local queues

```bash
curl localhost:8080/v1/queues/emails/stats
curl "localhost:8080/v1/queues/emails/tasks?state=succeeded"
curl localhost:8080/v1/queues/emails/tasks/welcome-user-42/attempts

curl -X POST localhost:8080/v1/queues/emails:pause
curl -X POST localhost:8080/v1/queues/emails:resume
curl -X POST localhost:8080/v1/queues/emails:purge
curl -X POST localhost:8080/v1/queues/emails/tasks/welcome-user-42:run   # dispatch now
```

Every server also serves its interactive API reference at `/docs` (http://localhost:8080/docs) and the OpenAPI spec at `/openapi.json`.

## Read more

- [Quickstart](https://pushqueue.dev/docs/getting-started/quickstart/): the same flow against the hosted API.
- [Install pushq](https://pushqueue.dev/docs/self-hosting/install/): binaries, Docker and building from source.
- [Configuration](https://pushqueue.dev/docs/self-hosting/configuration/): every setting for `pushq serve`.
