{"id":42397260,"url":"https://github.com/ttab/eleconf","last_synced_at":"2026-03-06T16:03:45.421Z","repository":{"id":320534361,"uuid":"1017293302","full_name":"ttab/eleconf","owner":"ttab","description":"Elephant repository configuration tool","archived":false,"fork":false,"pushed_at":"2026-01-19T22:30:05.000Z","size":216,"stargazers_count":0,"open_issues_count":5,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-28T12:22:48.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ttab.png","metadata":{"files":{"readme":"README.md","changelog":"change.go","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-10T10:06:36.000Z","updated_at":"2025-11-14T10:14:40.000Z","dependencies_parsed_at":"2025-10-24T11:10:47.431Z","dependency_job_id":"bcf7df7c-29f3-4bd2-9621-2ec2b797ed9f","html_url":"https://github.com/ttab/eleconf","commit_stats":null,"previous_names":["ttab/eleconf"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ttab/eleconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feleconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feleconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feleconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feleconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttab","download_url":"https://codeload.github.com/ttab/eleconf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feleconf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30184885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-28T01:02:01.885Z","updated_at":"2026-03-06T16:03:45.414Z","avatar_url":"https://github.com/ttab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eleconf\n\nTool for applying configuration to changes to the [Elephant repository](https://github.com/ttab/elephant-repository).\n\nEnforces configuration for:\n\n    * Schema versions\n    * Meta type configuration\n    * Document statuses\n    * Document workflows\n    * Document type configuration (bounded collections, time/label expressions, eviction)\n    * Metric kinds\n\n## Configuration\n\nEleconf uses HCL as its configuration language.\n\nSee example configuration files in the examples/tt folder.\n\n### Schema sets\n\nAn organisations schemas are often split into several files for readability, but versioned together. Therefore schemas are configured as schema sets.\n\nSchemas can either be loaded from a git repository, or over http(s).\n\nExample schema set block:\n\n``` hcl\nschema_set \"core\" {\n  version      = \"v1.0.5-pre1\"\n  repository   = \"https://github.com/ttab/revisorschemas.git\"\n\n  schemas = [\n    \"core\",\n    \"core-planning\",\n    \"core-metadoc\",\n  ]\n}\n```\n\nAs we specify a `repository` here the version must be a valid git tag. And the schemas files themselves are assumed to be located in the root of the repository.\n\nIf the schemas are to be loaded over http we can instead provide an URL template like so:\n\n``` hcl\nurl_template = \"https://raw.githubusercontent.com/ttab/revisorschemas/refs/tags/{{.Version}}/{{.Name}}.json\"\n```\n\n### Document types\n\nDocument blocks are used to configure document types.\n\n* `meta_doc` string: the document type that should be used for meta documents, optional.\n* `statuses` string slice: all the statuses that are valid for the document type.\n* `workflow` object: defintion of the workflow for the document, optional.\n* `attachment` block: attachment configuration with `name` (label), `required` (bool), and `match_mimetype` (string slice).\n* `bounded_collection` bool: whether the document type is a bounded collection (finite and small number of documents).\n* `evict_noncurrent_after` int: evict non-current document versions after this many seconds, optional.\n* `time_expression` [object](https://pkg.go.dev/github.com/ttab/eleconf#TimeExpression): time expression used to extract timestamps.\n* `label_expression` [object](https://pkg.go.dev/github.com/ttab/eleconf#LabelExpression): label expression used to extract labels.\n\n#### Workflow object\n\n* `step_zero` string: the workflow step that a document starts on, and reverts to after a new revision is created after a checkpoint status.\n* `checkpoint` string: the name of the status to use as a checkpoint step, usually \"usable\" to signal that something is published.\n* `negative_checkpoint` string: the checkpoint name to use when the checkpoint status is set with a negative version.\n* `steps` string slice: the statuses that should be used as steps between checkpoints.\n\n#### Example\n\n``` hcl\ndocument \"core/article\" {\n  meta_doc = \"core/article+meta\"\n\n  statuses = [\n    \"draft\",\n    \"done\",\n    \"approved\",\n    \"withheld\",\n    \"cancelled\",\n    \"usable\",\n  ]\n\n  workflow = {\n    step_zero  = \"draft\"\n    checkpoint = \"usable\"\n    negative_checkpoint = \"unpublished\"\n    steps      = [\n      \"draft\",\n      \"done\",\n      \"approved\",\n      \"withheld\",\n      \"cancelled\",\n    ]\n  }\n}\n```\n\n### Metrics\n\nMetric blocks are used to configure metric kinds:\n\n``` hcl\nmetric \"charcount\" {\n  aggregation = \"replace\"\n}\n```\n\n`aggregation` can be \"replace\" or \"increment\", defaults to \"replace\".\n\n## Usage\n\nAll changes to schemas require lockfile update. So the first thing you have to do for a new configuration directory is to run the update command. This will not change anything in the repository, but will check that the referenced schema versions exist and update the lock file.\n\n``` shellsession\neleconf update -dir examples/tt\n```\n\nTo apply the configuration to a repository installation run `apply`:\n\n``` shellsession\neleconf apply -env stage -dir examples/tt\n```\n\nThe `apply` command accepts `--env` to select the environment configuration, and optionally `--client-id` and `--client-secret` for client credentials authentication. The repository endpoint is resolved from the environment configuration.\n\nThis will compare the current configuration with the one declared in the configuration directory, detail the changes, and ask for confirmation before applying.\n\nExample use:\n\n``` shellsession\n❯ go run ./cmd/eleconf apply -dir tt\n\n~ schema downgrade tt v1.1.1 =\u003e v1.0.5-pre1\n Warning:  downgrading schema\n+ status \"print_done\" for \"tt/print-article\"\n- status \"nonsense\" for \"tt/print-article\"\n~ update workflow for \"core/event\":\n  \u0026eleconf.DocumentWorkflow{\n  \tStepZero:           \"draft\",\n  \tCheckpoint:         \"usable\",\n  \tNegativeCheckpoint: \"unpublished\",\n  \tSteps: []string{\n+ \t\t\"draft\",\n  \t\t\"done\",\n  \t\t\"cancelled\",\n  \t},\n  }\n\n\nDo you want to apply these changes? [y/n]: y\n\n~ schema downgrade tt v1.1.1 =\u003e v1.0.5-pre1\n+ status \"print_done\" for \"tt/print-article\"\n- status \"nonsense\" for \"tt/print-article\"\n~ update workflow for \"core/event\"\n\nConfiguration has been updated\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttab%2Feleconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttab%2Feleconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttab%2Feleconf/lists"}