CLI Reference

runnem init

Initialize a new runnem project configuration.

Usage

runnem init [project_name]

Description

The init command creates a new runnem project configuration file (runnem.yaml) in the current directory. If no project name is provided, it uses the current directory name as the project name.

Examples

# Initialize a project with a specific name
runnem init myproject

# Initialize a project using the current directory name
runnem init

What it does

  1. Creates a runnem.yaml file in the current directory
  2. Sets up a basic project configuration with:
    • Project name
    • Example services (database, API, frontend)
    • Basic service configurations with commands and URLs

Configuration Template

The generated configuration includes a template with example services:

project_name: {project_name}

services:
  database:
    command: cd ~/projects/myproject/database && docker-compose up
    url: postgresql://localhost:5432

  api:
    command: |
      cd ~/projects/myproject/api && \
      if [ ! -f "localhost.pem" ] || [ ! -f "localhost-key.pem" ]; then \
          echo "SSL certificates not found! Generating with mkcert..." && \
          mkcert localhost; \
      fi && \
      direnv exec . poetry run uvicorn app.main:api --reload --port 8000 --log-level debug \
      --ssl-keyfile localhost-key.pem --ssl-certfile localhost.pem
    url: https://localhost:8000/docs
    depends_on: ["database"]

  frontend:
    command: cd ~/projects/myproject/frontend && npm run dev
    url: http://localhost:3000
    depends_on: ["api"]
Previous
Service Definitions