{"id":13576708,"url":"https://github.com/srevinsaju/togomak","last_synced_at":"2025-10-16T11:58:56.472Z","repository":{"id":53818890,"uuid":"521618499","full_name":"srevinsaju/togomak","owner":"srevinsaju","description":"A declarative pipeline orchestrator with the magic of HCL as a configuration language, inspired from Terraform's architecture.","archived":false,"fork":false,"pushed_at":"2024-04-19T12:52:13.000Z","size":5596,"stargazers_count":148,"open_issues_count":10,"forks_count":5,"subscribers_count":2,"default_branch":"v2","last_synced_at":"2025-04-11T14:36:21.328Z","etag":null,"topics":["cicd","concurrency","continuous-delivery","continuous-integration","go","golang","hacktoberfest","hcl","orchestration","terraform"],"latest_commit_sha":null,"homepage":"https://togomak.srev.in","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srevinsaju.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-05T11:49:58.000Z","updated_at":"2025-02-10T04:43:04.000Z","dependencies_parsed_at":"2023-09-26T14:16:09.319Z","dependency_job_id":"694fe60a-8a7b-4948-9319-426a54e8c6b4","html_url":"https://github.com/srevinsaju/togomak","commit_stats":{"total_commits":262,"total_committers":2,"mean_commits":131.0,"dds":"0.026717557251908386","last_synced_commit":"32bbbd7f6ae01c31dfa82d51e5a8738e5f2e0401"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srevinsaju%2Ftogomak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srevinsaju%2Ftogomak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srevinsaju%2Ftogomak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srevinsaju%2Ftogomak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srevinsaju","download_url":"https://codeload.github.com/srevinsaju/togomak/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249872664,"owners_count":21338026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","concurrency","continuous-delivery","continuous-integration","go","golang","hacktoberfest","hcl","orchestration","terraform"],"created_at":"2024-08-01T15:01:13.055Z","updated_at":"2025-10-16T11:58:51.444Z","avatar_url":"https://github.com/srevinsaju.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# togomak \n\n![GitHub go.mod Go version (branch)](https://img.shields.io/github/go-mod/go-version/srevinsaju/togomak/v1)\n[![codecov](https://codecov.io/github/srevinsaju/togomak/branch/v2/graph/badge.svg?token=ABSszEKbdK)](https://codecov.io/github/srevinsaju/togomak)\n\n![Screenshot of togomak build pipeline for togomak using togomak, dogfooding?](./docs/img/screenshot-cover.png)\n\ntogomak is a declarative pipeline orchestration tool, powered by [HashiCorp Configuration Language (HCL)][hcl]\nbuilt on top of Terraform's architecture and features. It supports modules, custom HCL expressions.\n\n```hcl \ntogomak {\n  version = 2\n}\nstage \"hello\" {\n  script = \"echo hello world\"\n}\n```\n\n```ansi\n$ togomak\n0000 • togomak (version=dev)\n0000 • [stage.hello]  hello world\n0000 • took 2ms\n```\n\n\n## Contents \n* [Installation](#installation)\n* [Getting Started](#getting-started)\n* [Features](#features)\n* [Using modules](#modules)\n* [Documentation (wip)](https://togomak.srev.in)\n* [Examples](./examples)\n\n## Installation\nDownload a compatible binary for your operating system and architecture from [Releases](https://github.com/srevinsaju/togomak/releases).\nThe `v2.x` tag has the latest, bleeding edge features which are more relevant. \n\nOr, using `go`:\n```bash\ngo install github.com/srevinsaju/togomak/v2@latest\n```\n\n### Building and installing from source \n1. Clone the repository, https://github.com/srevinsaju/togomak\n2. ```bash\n   cd cmd/togomak\n   go build .\n   ./togomak\n   ```\n\n### Docker containers \nConsider using the `ghcr.io/srevinsaju/togomak:v2alpine` image. Other flavors are available are available [here](https://github.com/srevinsaju/togomak/pkgs/container/togomak).\n\n## Getting Started\n\n```hcl \ntogomak {\n  version = 2\n}\n\nlocals {\n  validate = toset([\"vet\", \"fmt\", \"test\"])\n}\n\nvariable \"service\" {\n  type = string\n  description = \"Name of the service\"\n}\n\nstage \"build\" {\n  depends_on = [stage.validate]\n  script = \"echo Running go build ... for ${var.service}\"\n  post_hook {\n    stage {\n      script = \"echo send slack message, build completed for ${upper(var.service)} with status: ${this.status}\"\n    }\n  }\n}\n\nstage \"validate\" {\n  for_each = local.validate\n  script = \"echo Running go ${each.value} ... for ${var.service}\"\n}\n```\n\n![Screenshot of the above execution](./docs/img/screenshot.png)\n\n\n## Installation \nCheck out the [releases](https://github.com/srevinsaju/togomak/releases) page\nfor the `v2.0.0-alpha.*` release binaries, and other pre-built packages for your \ndesired platform.\n\n### Building from Source\n```bash\ncd cmd/togomak \ngo build\n```\n### Building using `togomak` (what!)\n```bash \ntogomak\n```\n\n## Features\nIn `togomak`, a `stage` is a single independent task, and a `module` is a group of stages. \nHere is a non-exhaustive list of features. See the [work in progress documentation](https://togomak.srev.in) or [examples](./examples) for a list of examples. \nThese examples also run as part of an integration test, using [tests/togomak.hcl](./tests/togomak.chl). \n\n* **Concurrency**: All stages and modules run in parallel by default. \n* [**Modular**](https://togomak.srev.in/docs/schema/module): Create reusable parts of your CI/CD pipeline and use them from `git`, `https`, `s3` buckets or `gcs` buckets.\n  ```hcl\n  # modules/togomak.hcl\n  ...\n  variable \"name\" {\n    type = string\n    description = \"Name of person\"\n  }\n  stage \"hello\" {\n    script = \"echo ${var.name}\"\n  }\n  ```\n  ```hcl\n  # togomak.hcl\n  ...\n  module {\n    source = \"./modules\"\n    name = \"srev\"\n  }\n  ``` \n* [**Conditional**](https://togomak.srev.in/docs/schema/stage/arguments/meta#if): Run stages or modules by specifying a HCL expression in `if` meta-arguments.\n  ```hcl\n  stage \"hello\" {\n    if = env(\"USER\") == \"builder\"\n    ...\n  }\n  ```\n* **Built on top of Terraform's Architecture**: supports most of Terraform's functions, block types, language, syntax and expression, keeping it a low learning curve for new and experienced users alike. Supports many familiar features like\n  - `local.\u003cname\u003e` and [`locals {}`]( https://togomak.srev.in/docs/schema/locals)\n  - `var.\u003cname\u003e` and [`variable {}`](https://togomak.srev.in/docs/schema/variables)\n  - Functions like `sum()`, `flatten()`, `toset()`, `upper()`, `fileset()`, `setunion()` and [so on](https://togomak.srev.in/docs/language/functions/abs)\n  - [`for_each`](https://togomak.srev.in/tutorial/creating-your-first-module#-congratulations) to iterate over a `local`, `var` to perform a `stage` or a `module` over different configurations. \n* **[Lifecycles](https://togomak.srev.in/docs/language/meta-arguments/lifecycles) and [Rule Engine](https://togomak.srev.in/docs/cli/usage)**: Configure how your pipeline behaves when you type `togomak deploy` or `togomak build`, or when you would like to allow-list a specific stage with `togomak deploy +stage.some_stage` and block a specific stage with `togomak build ^stage.slack_hook`. See [Usage](https://togomak.srev.in/docs/cli/usage) on how togomak uses them.\n  ```\n  ❯ togomak\n  0000 • togomak (version=dev)\n  0000 • [stage.alice]\n  0000 • [stage.bob]  skipped\n  0000 • [stage.eve]\n  0000 • [stage.eve]  hello im default\n  0000 • [stage.alice]  hello im default, deploy\n  0000 • took 2ms\n  ❯ togomak deploy\n  0000 • togomak (version=dev)\n  0000 • [stage.alice]\n  0000 • [stage.bob]\n  0000 • [stage.eve]  skipped\n  0000 • [stage.bob]  hello im deploy\n  0000 • [stage.alice]  hello im default, deploy\n  0000 • took 2ms\n  ❯ togomak all\n  0000 • togomak (version=dev)\n  0000 • [stage.bob]\n  0000 • [stage.eve]\n  0000 • [stage.alice]\n  0000 • [stage.eve]  hello im default\n  0000 • [stage.alice]  hello im default, deploy\n  0000 • [stage.bob]  hello im deploy\n  0000 • took 2ms\n  ```\n* [**Pre and Post Hooks**](https://togomak.srev.in/docs/schema/stage/arguments/hooks#pre_hook): Runs commands or modules before and after the execution of a [stage](./examples/hooks) as well as an [entire pipeline](./examples/pre-post).\n* **Query Engine**: Pass custom `hcl` expressions to togomak to choose which stages can run, and which cannot using the `--query` parameter on the command line.\n* Comprehensive terraform-like error diagnostics with references to contents of the file where the error originates from.\n* [**Terraform Support**](https://togomak.srev.in/docs/schema/data/providers/built-in/tf): Use terraform `data` blocks (or `resource`) blocks as data sources in your CI/CD pipeline. See [examples/terraform](./examples/terraform) for an example.\n\nAnd don't forget to format your CICD files with `togomak fmt`.\n\n## Contributing\nContributions are welcome, and encouraged. Please check out the\n[contributing](./docs/src/contributing.md) guide for more information.\n\n## License\n`togomak` is licensed under the [MPL License v2.0](LICENSE)\n\n[hcl]: https://github.com/hashicorp/hcl\n[v0]: https://github.com/srevinsaju/togomak/tree/main\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrevinsaju%2Ftogomak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrevinsaju%2Ftogomak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrevinsaju%2Ftogomak/lists"}