Configuration

curo uses a curo.toml file at the root of your repository to define your project settings and the commands available for each environment.

Below is an example curo.toml that covers common scenarios:

curo_toml_version = "0.60.0"

[about]
name = "cli"
version = "{{ inherit }}"
description = "A command line tool for building projects."
code_dir = "."

[dev]
build = [
  "mkdir -p build-output",
  "go build -v -o build-output/testcuro"
]
deploy = "cp build-output/testcuro $REPO_BIN/testcuro"
generate = [ "argbash -i .curo/actions/cicd.build.sh" ]

[dev.test]
unit = "go test -v -run TestUnit curo curo/common curo/commands/actions curo/commands/general curo/tui curo/core"
integration = "go test -v -run TestIntegration curo curo/common curo/commands/actions curo/commands/general curo/tui curo/core"
functional = "poetry run py.test -vvvv tests/functional {{ args }}"

Sections

  • curo_toml_version: Specifies the version of the configuration format.
  • [about]: Basic information about the project.
    • name: Project name.
    • version: Project version (use "{{ inherit }}" to match the main version).
    • description: Short description.
    • code_dir: Root code directory.
  • [dev]: Commands for the development environment.
    • build: List or string of shell commands to build your project.
    • deploy: How to deploy built artifacts locally.
    • generate: Example of code generation or scripts.
  • [dev.test]: Defines test categories.
    • unit: Unit test command(s).
    • integration: Integration test command(s).
    • functional: Functional test command(s).

Editing & Extending

  • Add or update commands for other project verbs supported by curo, such as lint, format, etc.
  • You can use arrays for multi-step shell scripts or strings for single-step commands.
  • Environment variables and command-line arguments are supported (see Advanced Usage).

Tip: Don’t forget to run curo init > curo.toml to generate a starter file! You can also give your curo.toml files prefixes, such as myproject.curo.toml