URLs Command
v0.4.8Updated for ɳSelf v0.4.8
The nself urls command displays all service URLs for your ɳSelf project. Quickly access GraphQL endpoints, admin interfaces, storage URLs, and custom service routes based on your current environment configuration.
URL Categories
- - Core Services: Hasura GraphQL, Auth, PostgreSQL
- - Optional Services: MinIO, MeiliSearch, Redis, Mailpit
- - Admin Interfaces: nself-admin, Hasura Console, Grafana
- - Custom Services: CS_N user-defined services
- - Frontend Apps: FRONTEND_APP_N external applications
Usage
nself urls [options]
Options
| Option | Description | Default |
|---|
--category CAT | Filter by category (core, optional, admin, custom, frontend) | all |
--open SERVICE | Open specific service URL in browser | - |
--copy SERVICE | Copy specific service URL to clipboard | - |
--json | Output in JSON format | false |
--env NAME | Show URLs for specific environment | current |
--internal | Show internal Docker network URLs | false |
--quiet, -q | Show only URLs (no labels) | false |
Examples
List All URLs
nself urls
# Output:
➞ ɳSelf URLs - local.nself.org
Core Services
-------------
GraphQL API https://api.local.nself.org/v1/graphql
GraphQL Console https://api.local.nself.org/console
Auth Service https://auth.local.nself.org
PostgreSQL postgresql://localhost:5432/nself_db
Optional Services
-----------------
Storage (MinIO) https://storage.local.nself.org
MinIO Console https://storage.local.nself.org:9001
Search (Meili) https://search.local.nself.org
Email (Mailpit) https://mail.local.nself.org
Admin Interfaces
----------------
ɳSelf Admin https://admin.local.nself.org
Custom Services
---------------
ping_api https://ping.local.nself.org
Frontend Apps
-------------
org https://org.local.nself.org
docs https://docs.local.nself.org
cloud https://cloud.local.nself.org
chat https://chat.local.nself.org
Monitoring
----------
Grafana https://grafana.local.nself.org
Prometheus https://prometheus.local.nself.org
Filter by Category
# Show only core services
nself urls --category core
# Output:
Core Services
-------------
GraphQL API https://api.local.nself.org/v1/graphql
GraphQL Console https://api.local.nself.org/console
Auth Service https://auth.local.nself.org
PostgreSQL postgresql://localhost:5432/nself_db
# Show only custom services
nself urls --category custom
# Output:
Custom Services
---------------
ping_api https://ping.local.nself.org
# Show only frontend apps
nself urls --category frontend
# Output:
Frontend Apps
-------------
org https://org.local.nself.org
docs https://docs.local.nself.org
cloud https://cloud.local.nself.org
chat https://chat.local.nself.org
Open URL in Browser
# Open Hasura console
nself urls --open api
# Open admin UI
nself urls --open admin
# Open Grafana
nself urls --open grafana
# Open custom service
nself urls --open ping_api
Copy URL to Clipboard
# Copy GraphQL endpoint
nself urls --copy api
# Copied: https://api.local.nself.org/v1/graphql
# Copy auth URL
nself urls --copy auth
# Copied: https://auth.local.nself.org
Environment-Specific URLs
# Show staging URLs
nself urls --env staging
# Output:
➞ ɳSelf URLs - staging.nself.org
Core Services
-------------
GraphQL API https://api.staging.nself.org/v1/graphql
Auth Service https://auth.staging.nself.org
...
# Show production URLs
nself urls --env prod
# Output:
➞ ɳSelf URLs - nself.org
Core Services
-------------
GraphQL API https://api.nself.org/v1/graphql
Auth Service https://auth.nself.org
...
Internal Docker URLs
# Show internal Docker network URLs
nself urls --internal
# Output:
➞ Internal Docker URLs
Service Internal URL
------- ------------
postgres postgres:5432
hasura hasura:8080
auth auth:4000
minio minio:9000
redis redis:6379
meilisearch meilisearch:7700
URL Formats by Service
Hasura GraphQL
| Endpoint | URL |
|---|
| GraphQL API | https://api.{domain}/v1/graphql |
| GraphQL Console | https://api.{domain}/console |
| Metadata API | https://api.{domain}/v1/metadata |
| Schema API | https://api.{domain}/v2/query |
| Health Check | https://api.{domain}/healthz |
Authentication
| Endpoint | URL |
|---|
| Auth Base | https://auth.{domain} |
| Sign In | https://auth.{domain}/signin |
| Sign Up | https://auth.{domain}/signup |
| Token Refresh | https://auth.{domain}/token |
Storage (MinIO)
| Endpoint | URL |
|---|
| S3 API | https://storage.{domain} |
| Console | https://storage.{domain}:9001 |
Search (MeiliSearch)
| Endpoint | URL |
|---|
| Search API | https://search.{domain} |
| Health Check | https://search.{domain}/health |
JSON Output
nself urls --json
# Output:
{
"environment": "local",
"domain": "local.nself.org",
"timestamp": "2026-01-24T10:30:00Z",
"urls": {
"core": {
"graphql": "https://api.local.nself.org/v1/graphql",
"graphql_console": "https://api.local.nself.org/console",
"auth": "https://auth.local.nself.org",
"postgres": "postgresql://localhost:5432/nself_db"
},
"optional": {
"storage": "https://storage.local.nself.org",
"storage_console": "https://storage.local.nself.org:9001",
"search": "https://search.local.nself.org",
"mail": "https://mail.local.nself.org"
},
"admin": {
"nself_admin": "https://admin.local.nself.org"
},
"custom": {
"ping_api": "https://ping.local.nself.org"
},
"frontend": {
"org": "https://org.local.nself.org",
"docs": "https://docs.local.nself.org",
"cloud": "https://cloud.local.nself.org",
"chat": "https://chat.local.nself.org"
},
"monitoring": {
"grafana": "https://grafana.local.nself.org",
"prometheus": "https://prometheus.local.nself.org"
}
}
}
Quiet Mode
# URLs only (no labels)
nself urls --quiet
# Output:
https://api.local.nself.org/v1/graphql
https://auth.local.nself.org
https://storage.local.nself.org
https://search.local.nself.org
https://mail.local.nself.org
https://admin.local.nself.org
https://ping.local.nself.org
https://org.local.nself.org
https://docs.local.nself.org
URL Configuration
URLs are generated from your .env configuration:
# Base configuration
BASE_DOMAIN=local.nself.org
# Service routes (subdomains)
HASURA_ROUTE=api # https://api.local.nself.org
AUTH_ROUTE=auth # https://auth.local.nself.org
MINIO_ROUTE=storage # https://storage.local.nself.org
MEILISEARCH_ROUTE=search # https://search.local.nself.org
MAILPIT_ROUTE=mail # https://mail.local.nself.org
NSELF_ADMIN_ROUTE=admin # https://admin.local.nself.org
# Custom service routes
CS_1_ROUTE=ping # https://ping.local.nself.org
# Frontend app routes
FRONTEND_APP_1_ROUTE=org # https://org.local.nself.org
FRONTEND_APP_2_ROUTE=docs # https://docs.local.nself.org
Environment URL Patterns
| Environment | BASE_DOMAIN | Example GraphQL URL |
|---|
| dev/local | local.nself.org | https://api.local.nself.org |
| staging | staging.nself.org | https://api.staging.nself.org |
| prod | nself.org | https://api.nself.org |
Service Availability by Environment
| Service | Local | Staging | Production |
|---|
| GraphQL API | Always | Always | Always |
| Hasura Console | Enabled | Enabled | Disabled |
| Auth | Always | Always | Always |
| nself-admin | Enabled | Optional | Disabled |
| Mailpit | Enabled | Optional | Never |
| Grafana | If monitoring | If monitoring | If monitoring |
Integration Examples
Get GraphQL Endpoint for Scripts
# Extract GraphQL URL
GRAPHQL_URL=$(nself urls --json | jq -r '.urls.core.graphql')
echo $GRAPHQL_URL
# Use in a script
curl -X POST $GRAPHQL_URL \
-H "Content-Type: application/json" \
-H "x-hasura-admin-secret: $HASURA_SECRET" \
-d '{"query": "{ users { id } }"}'
Configure Frontend Environment
# Generate .env.local for frontend app
nself urls --json | jq -r '
"NEXT_PUBLIC_GRAPHQL_URL=" + .urls.core.graphql,
"NEXT_PUBLIC_AUTH_URL=" + .urls.core.auth,
"NEXT_PUBLIC_STORAGE_URL=" + .urls.optional.storage
' > .env.local
Open All Admin Interfaces
# Open all admin UIs
nself urls --open admin
nself urls --open api # Opens Hasura console
nself urls --open grafana # If monitoring enabled
Troubleshooting
URL Returns 502 Bad Gateway
# Check if service is running
nself status
# Check service logs
nself logs hasura
# Restart the service
nself restart hasura
SSL Certificate Error
# Regenerate and trust certificates
nself build
ɳSelf trust
# Or check certificate status
nself doctor --category ssl
DNS Not Resolving
# Check DNS resolution
dig local.nself.org
# local.nself.org should resolve to 127.0.0.1
# This is configured via Cloudflare DNS wildcard
Related Commands