---
title: Commands Overview
description: Django-CFG CLI commands organized by category. Quick access to all management commands.
sidebar_label: Overview
sidebar_position: 1
keywords:
  - django-cfg commands
  - cli overview
  - management commands
---


# CLI Commands Overview

Django-CFG provides management commands for development, testing, monitoring, and production operations.


<Callout type="info">
**Quick Start**
New to Django-CFG? Start with the **[Quick Reference](./quick-reference)** for most common commands!

</Callout>

## 📚 Command Categories

### 🚀 Essential

### Most Used Commands

```bash
# Check all API endpoints health
python manage.py check_endpoints

# Migrate all databases
python manage.py migrate_all

# Run development server
cli runserver

# Create superuser
cli superuser --email admin@example.com

# Check settings and diagnostics
python manage.py check_settings
```

**[View Quick Reference →](./quick-reference)**

### 🧪 Testing

### Testing & Monitoring

```bash
# Endpoint health checker (production-ready)
python manage.py check_endpoints --json

# Test email
cli test-email --to admin@test.com

# Test Telegram
cli test-telegram --message "Hello!"

```


<Callout type="info">
**Feature Highlight**
`check_endpoints` includes:
- Auto-resolves parametrized URLs (`<int:pk>`, `<uuid:id>`)
- JWT auto-authentication
- Multi-database awareness
- REST API for monitoring at `/cfg/endpoints/`

</Callout>

**[View Testing & Monitoring →](./testing-monitoring)**

### 🛠️ Development

### Development Tools

```bash
# Enhanced development server
cli runserver --port 3000

# Run with ngrok tunnel
python manage.py runserver_ngrok

# List all URLs
python manage.py list_urls --pattern "api/"

# Show project structure
python manage.py tree --depth 3

# Run custom script
python manage.py script my_script.py
```

**[View Development Tools →](./development)**

### 🚀 Production

### Production Operations

```bash
# Check settings and diagnostics
python manage.py check_settings --verbose

# Migrate all databases
python manage.py migrate_all

# Check endpoint health
python manage.py check_endpoints
```

**[View Core Commands →](./core-commands)**


---

## 📋 All Command Categories

<details>
  <summary>

### [🔧 Core Commands](./core-commands) — 7 commands

  </summary>

Project setup, configuration validation, and system checks.

| Command | Description |
|---------|-------------|
| `django-cfg create-project` | Create new Django project with full setup |
| `django-cfg info` | Show installation and system information |
| `show_config` | Display current configuration |
| `check_settings` | Comprehensive diagnostics |
| `show_urls` | List all URL patterns |
| `migrate_all` | Migrate all databases |
| `superuser` | Create superuser |

**[Full Documentation →](./core-commands)**

</details>

<details>
  <summary>

### [🧪 Testing & Monitoring](./testing-monitoring) — 4 commands

  </summary>

Health checks, endpoint validation, and service testing.

| Command | Description |
|---------|-------------|
| `check_endpoints` | **Production-ready endpoint health checker** |
| `test_email` | Test email configuration |
| `test_telegram` | Test Telegram bot |
| `otp_test` | Test OTP authentication |


<Callout type="info">
**REST API Available**
Access endpoint health via REST API:
```bash
curl http://localhost:8000/cfg/endpoints/
```

</Callout>

**[Full Documentation →](./testing-monitoring)**

</details>

<details>
  <summary>

### [🛠️ Development Tools](./development) — 8 commands

  </summary>

Development server and productivity tools.

| Command | Description |
|---------|-------------|
| `cli runserver` | Enhanced development server |
| `runserver_ngrok` | Run with ngrok tunnel |
| `script` | Run scripts with Django context |
| `tree` | Show project structure |
| `list_urls` | List all URL patterns |
| `generate` | Generate Django components |
| `create_token` | Create API tokens |
| `clear_constance` | Clear Constance cache |

**[Full Documentation →](./development)**

</details>

<details>
  <summary>

### 📡 Centrifugo / WebSocket — 3 commands

  </summary>

Real-time messaging and WebSocket RPC client generation.

| Command | Description |
|---------|-------------|
| `centrifugo_publish` | Publish messages to Centrifugo channels for testing |
| `generate_centrifugo_clients` | Generate type-safe WebSocket RPC clients (Python, TypeScript, Go, Swift) |
| `create_centrifugo_d1_schema` | Create Cloudflare D1 schema for Centrifugo logs |

**[Full Documentation →](/docs/features/modules/django-centrifugo/cli-commands)**

</details>

<details>
  <summary>

### 🔄 Background Tasks — Django-RQ — 9 commands

  </summary>

Django-RQ worker management, scheduling, and monitoring.

| Command | Description |
|---------|-------------|
| `rearq main:rearq worker` | Start background workers |
| `rearq main:rearq timer` | Start cron task scheduler |
| `rearq main:rearq server` | Start monitoring server |
| `test_tasks` | Test task processing |
| `rqworker` | Start RQ worker process |
| `rqworker_pool` | Start RQ worker pool (multiple workers) |
| `rqscheduler` | Start RQ scheduler for cron/interval tasks |
| `rqstats` | Show RQ queue statistics |
| `rq_cleanup_locks` | Clean stale RQ job locks |

**[Full Documentation →](/docs/features/modules/django-rq/overview)**

</details>

<details>
  <summary>

### 🌐 gRPC / Communication — 4 commands

  </summary>

gRPC server, protocol buffer compilation, and schema generation.

| Command | Description |
|---------|-------------|
| `rungrpc` | Start async gRPC server |
| `compile_proto` | Compile .proto files to Python stubs |
| `generate_protos` | Generate .proto definitions from Django models |
| `create_grpc_d1_schema` | Create Cloudflare D1 schema tables for gRPC |

</details>

<details>
  <summary>

### ☁️ Cloudflare D1 — 5 commands

  </summary>

Cloudflare D1 database integration, sync, and logging.

| Command | Description |
|---------|-------------|
| `cf_status` | Show Cloudflare D1 connection status |
| `cf_sync_users` | Sync Django users to D1 |
| `d1_logs` | View D1 operation logs |
| `create_rq_d1_schema` | Create D1 schema for RQ events |
| `create_centrifugo_d1_schema` | Create D1 schema for Centrifugo logs |

</details>

<details>
  <summary>

### 🖥️ Streamlit Admin — 3 commands

  </summary>

Streamlit-based admin panel scaffolding and management.

| Command | Description |
|---------|-------------|
| `create_streamlit_app` | Scaffold a new Streamlit admin app |
| `run_streamlit` | Start Streamlit admin server |
| `gen_streamlit` | Generate Streamlit pages from Django models |

</details>

<details>
  <summary>

### ⚙️ Code Generation — 2 commands

  </summary>

Generate code from Django models for other frameworks.

| Command | Description |
|---------|-------------|
| `generate_fastapi` | Generate FastAPI/SQLModel code from Django models |
| `generate_client` | Generate standalone API client |

</details>

<details>
  <summary>

### 📊 LLM & Monitoring — 2 commands

  </summary>

LLM balance checks and monitoring cleanup.

| Command | Description |
|---------|-------------|
| `check_llm_balance` | Check OpenAI/OpenRouter API balance |
| `monitor_cleanup` | Clean old monitor events |

</details>

<details>
  <summary>

### 🤖 Telegram — 1 command

  </summary>

Telegram bot management.

| Command | Description |
|---------|-------------|
| `telegram_bot` | Start Telegram bot in polling mode |

</details>

<details>
  <summary>

### 🔑 Auth / OTP — 1 command

  </summary>

Authentication and OTP utilities.

| Command | Description |
|---------|-------------|
| `otp_reset_throttle` | Reset OTP throttle for a user |

</details>

<details>
  <summary>

### 🌍 Geo — 1 command

  </summary>

Geographic and timezone data management.

| Command | Description |
|---------|-------------|
| `geo_populate` | Populate geo/timezone data |

</details>

---

## 🎯 Common Workflows

### Initial Project Setup

```bash
# 1. Create project
django-cfg create-project "My Project"
cd my_project

# 2. Check settings
python manage.py check_settings --verbose

# 3. Migrate databases
python manage.py migrate_all

# 4. Create superuser
cli superuser --email admin@example.com

# 5. Check endpoint health
python manage.py check_endpoints

# 6. Run server
cli runserver
```

### Pre-Deployment Checklist

```bash
# 1. Check settings
python manage.py check_settings --verbose

# 2. Check endpoint health
python manage.py check_endpoints

# 3. Test integrations
cli test-email --to admin@example.com

# 4. Run migrations
python manage.py migrate_all

# 5. Collect static files
python manage.py collectstatic --noinput
```

### CI/CD Integration

```bash
# Health check in pipeline
python manage.py check_endpoints --json | jq '.errors'

# Exit if unhealthy
test $(python manage.py check_endpoints --json | jq '.errors') -eq 0
```


<Callout type="warning">
**Production Tip**
Add endpoint health checks to your monitoring:
```bash
# Cron job - every 5 minutes
*/5 * * * * python manage.py check_endpoints --json > /var/log/health.json
```

</Callout>

---

## 💡 Best Practices

### Isolation

### Use Poetry for Isolation

```bash
# Recommended
poetry run cli runserver
poetry run python manage.py check_endpoints

# Also works but less isolated
python manage.py runserver
```

### Validation

### Always Validate

```bash
# Before deployment
python manage.py check_settings --verbose

# Before migrations
python manage.py migrate_all --dry-run
```

### Testing

### Test After Changes

```bash
# Test email
cli test-email --to admin@test.com

# Test messaging
cli test-telegram --message "Deploy successful"

# Test endpoints
python manage.py check_endpoints
```

### Monitoring

### Continuous Monitoring

```bash
# Endpoint health check
curl http://localhost:8000/cfg/endpoints/ | jq

# Check all endpoints
python manage.py check_endpoints --json
```


---

## 🔗 Quick Navigation

| I want to... | Go to... |
|-------------|----------|
| Find a command quickly | **[Quick Reference](./quick-reference)** |
| Set up a new project | **[Core Commands](./core-commands)** |
| Monitor API health | **[Testing & Monitoring](./testing-monitoring)** |
| Start development | **[Development Tools](./development)** |
| Run gRPC server | **gRPC / Communication** (above) |
| Manage background tasks | **Background Tasks** (above) |
| Use Cloudflare D1 | **Cloudflare D1** (above) |
| Generate code | **Code Generation** (above) |

---


<Callout type="info">
**Next Steps**
- 📖 **New to Django-CFG?** Start with [Quick Reference](./quick-reference)
- 🧪 **Need monitoring?** See [Testing & Monitoring](./testing-monitoring)
- 🚀 **Ready to deploy?** Check [Core Commands](./core-commands)

</Callout>

**One powerful CLI.**
