{"id":30799386,"url":"https://github.com/triole/coda","last_synced_at":"2025-10-08T23:03:17.189Z","repository":{"id":143197943,"uuid":"405216431","full_name":"triole/coda","owner":"triole","description":"a basic task runner with simple file type detection","archived":false,"fork":false,"pushed_at":"2024-12-28T20:59:56.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-28T21:25:30.057Z","etag":null,"topics":["command-line","developer-tools","task-runner"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/triole.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2021-09-10T21:25:30.000Z","updated_at":"2024-12-28T20:59:59.000Z","dependencies_parsed_at":"2024-06-23T16:57:33.980Z","dependency_job_id":null,"html_url":"https://github.com/triole/coda","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/triole/coda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fcoda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fcoda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fcoda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fcoda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triole","download_url":"https://codeload.github.com/triole/coda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fcoda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273806205,"owners_count":25171569,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["command-line","developer-tools","task-runner"],"created_at":"2025-09-05T19:11:39.588Z","updated_at":"2025-10-08T23:03:12.149Z","avatar_url":"https://github.com/triole.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coda ![build](https://github.com/triole/coda/actions/workflows/build.yaml/badge.svg) ![test](https://github.com/triole/coda/actions/workflows/test.yaml/badge.svg)\n\n\u003c!-- toc --\u003e\n\n- [Synopsis](#synopsis)\n- [Configuration](#configuration)\n- [How to use?](#how-to-use)\n- [Help](#help)\n\n\u003c!-- /toc --\u003e\n\n## Synopsis\n\n...brings the music back to coding by running your linter, format and whatever scripts with a single command. It detects the kind of file that was passed and executes the appropriate commands.\n\n## Configuration\n\nCoda's config location can be set by using `-c`. If the flag is not provided coda tries to lookup the file's location. The following paths are tried in order. First match will be taken.\n\n- coda binary folder + \"coda.toml\"\n- ${HOME}/.conf/coda/conf.yaml\n- ${HOME}/.conf/coda/conf.toml\n- ${HOME}/.config/coda/conf.yaml\n- ${HOME}/.config/coda/conf.toml\n\nThe configuration file can be toml or yaml and contains the filetype definitions and settings. A yaml example looks like this. Please look into [examples](https://github.com/triole/coda/blob/master/examples) for more information.\n\n```go mdox-exec=\"tail -n +2 examples/conf.yaml\"\nfiletypes:\n  - name: bash\n    regex: \".*\\\\.sh$\"\n    shebang: \"#!/bin/bash\"\n    cmds:\n      - [\"shellcheck\", \"-x\", \"-e\", \"SC1090,SC2154,SC2155\", \"{{.filename}}\"]\n      - [\"shfmt\", \"-w\", \"-ci\", \"-i\", \"2\", \"{{.filename}}\"]\n\n  - name: golang\n    regex: \".*\\\\.go$\"\n    cmds:\n      - [\"goimports\", \"-w\", \"{{.filename}}\"]\n      - [\"gofmt\", \"-w\", \"{{.filename}}\"]\n      - [\"staticcheck\", \"{{.filename}}\"]\n      - [\"go\", \"test\", \"-v\"]\n\n  - name: zone\n    regex: \".*\\\\.(zone)$\"\n    cmds:\n      - [\"dnsfmt\", \"{{.filename}}\"]\n    write_stdout_to: \"{{.filename}}\"\n\nsettings:\n  ignore_list:\n    - \".git/\"\n    - \".pytest\"\n    - \"__pycache__\"\n    - \"/target/debug/\"\n    - \"/target/release/\"\n    - \".lock$\"\n    - \".rs.racertmp\"\n```\n\nAs you can see the configuration is a list of entries. They function like this\n\n| entry          | function                                                          |\n|----------------|-------------------------------------------------------------------|\n| name           | only test relevant, provides a clearer output of the test results |\n| regex          | 1st method file type detection                                    |\n| shebang        | 2nd method file type detection                                    |\n| cmds           | list of commands to run                                           |\n| save_stdout_to | if no error occured on execution, save command stdout to file     |\n\nThere is a set of variables that can be used inside a config. They get replaced by their appropriate values. This is what they look like:\n\n```go mdox-exec=\"r -p\"\n\nAvailable variables\n\n variable              | description                                 \n-----------------------+---------------------------------------------\n {{.extension}}        | file's extension                            \n {{.filename}}         | full file name                              \n {{.filename_no_ext}}  | full file name without preceeding extension \n {{.shortname}}        | short name, file name without path          \n {{.shortname_no_ext}} | short name without extension                \n\n```\n\n## How to use?\n\n```shell\ncoda -h\ncoda eggs.py\ncoda main.rs\n\n# debug mode, to just print commands that would have been run\ncoda -d shell_script\n```\n\n## Help\n\n```go mdox-exec=\"r -h\"\n\nbrings the music back to coding\n\nArguments:\n  [\u003cfilename\u003e]    file to process, required positional arg\n\nFlags:\n  -h, --help            Show context-sensitive help.\n  -c, --config=\"/home/ole/.conf/coda/conf.yaml\"\n                        configuration file\n  -p, --print-vars      print available vars\n  -n, --dry-run         dry run, just print don't do\n  -V, --version-flag    display version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriole%2Fcoda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriole%2Fcoda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriole%2Fcoda/lists"}