Intuitive over Provider-Specific
Use concepts that make sense to developers rather than platform-specific jargon
Cigen uses its own universal configuration format that compiles to provider-specific CI configurations. This format is designed to be intuitive, reduce duplication, and work consistently across all CI platforms.
Our configuration format follows these core principles:
Intuitive over Provider-Specific
Use concepts that make sense to developers rather than platform-specific jargon
DRY (Don't Repeat Yourself)
Reduce duplication through better abstractions and smart defaults
Least Surprise
Support multiple syntaxes where it makes sense, inspired by Ruby/Rails
Provider-Agnostic
Avoid leaking provider-specific concepts into the universal configuration
$schema: https://cigen.dev/schemas/v1/config-schema.json
# Provider configuration
provider: circlecioutput_path: .circlecioutput_filename: config.yml
# Global variables
vars:app_name: myappversion: "1.0.0"
# Service definitions
services:postgres:image: postgres:15environment:POSTGRES_PASSWORD: test
# Job definitions
jobs:test:image: cimg/ruby:3.3services: [postgres]steps: [shallow_checkout, { run: bundle exec rspec }]
# Workflow definitions
workflows:main:jobs: - testCigen supports both single-file and multi-file configurations:
.cigen/└── config.yml.cigen/├── config.yml # Main configuration├── config/ # Split configuration files│ ├── services.yml│ └── cache.yml├── commands/ # Reusable command templates│ ├── install_deps.yml│ └── deploy.yml└── workflows/ # Workflow definitions ├── test/ │ └── jobs/ │ ├── rspec.yml │ └── lint.yml └── deploy/ └── jobs/ └── production.ymlBy default, cigen performs a fast, shallow checkout via a built-in shallow_checkout command. You can override behavior globally or per job using the checkout section (see CircleCI provider docs for parameters). Set shallow: false to use the standard checkout step.
# Cigen format (clean and readable)steps:- name: Run tests run: | bundle exec rspec- name: Upload coverage run: coverage-reporter upload
# CircleCI format (more nested)
steps:
- run:name: Run testscommand: |bundle exec rspec- run:name: Upload coveragecommand: coverage-reporter upload# Cigen format (clear separation)services:postgres: image: postgres:15 environment: POSTGRES_PASSWORD: test
jobs:test:image: cimg/ruby:3.3services: [postgres, redis]
# CircleCI format (mixed primary + services)
docker:
- image: cimg/ruby:3.3 # Primary container- image: postgres:15 # Service containerenvironment:POSTGRES_PASSWORD: test- image: redis:7 # Another service# Cigen format (define once, use everywhere)docker:default_auth: dockerhubauth: dockerhub: username: $DOCKERHUB_USERNAME password: $DOCKERHUB_TOKEN ghcr: username: $GITHUB_ACTOR password: $GITHUB_TOKEN
# CircleCI format (repeated for every image)
docker:
- image: myimage:latestauth:username: $DOCKERHUB_USERNAMEpassword: $DOCKERHUB_TOKEN# Cigen format (automatic and intelligent)cache:- gems # Automatically detects Ruby version, Gemfile.lock- node_modules # Automatically detects Node version, package-lock.json
# Or with customization
cache:gems:paths: [vendor/bundle, .bundle]key_files: [Gemfile.lock, .ruby-version]
# CircleCI format (verbose and manual)
steps:
- restore_cache:keys: - v1-gems-{{ checksum "Gemfile.lock" }}-{{ checksum ".ruby-version" }}- run: bundle install- save_cache:key: v1-gems-{{ checksum "Gemfile.lock" }}-{{ checksum ".ruby-version" }}paths: [vendor/bundle]jobs:build_image: image: cimg/base:stable architectures: [amd64, arm64] # Creates build_image_amd64 and build_image_arm64 resource_class: medium # Automatically maps to correct provider classes steps: - run: docker build -t myapp:latest .# Use variables and functions in any configuration valuevars:postgres_version: "15"environment: production
jobs:test:image: cimg/postgres:{{ postgres_version }}environment:NODE_ENV: {{ environment }}steps: - name: Setup hostsrun: |echo "{{ read('etc-hosts.txt') | trim }}" >> /etc/hosts# Directory structureworkflows/├── test/│ └── jobs/│ ├── rspec.yml│ └── lint.yml└── deploy/ └── jobs/ └── production.yml
# Automatically creates these workflows:
workflows:test:jobs: [rspec, lint]deploy:jobs: [production]All cigen configurations are validated against JSON schemas:
$schema: https://cigen.dev/schemas/v1/config-schema.json
# This enables:
# - Real-time validation in VS Code, Cursor, etc.
# - Autocomplete and documentation
# - Immediate error feedbackWhen migrating from existing CI platforms:
services sectioncache definitionsdocker.auth sectionname/run formatcommands/ directory