{"id":17690558,"url":"https://github.com/slashmo/chinchilla-cli","last_synced_at":"2026-02-17T22:02:41.336Z","repository":{"id":197030486,"uuid":"697845396","full_name":"slashmo/chinchilla-cli","owner":"slashmo","description":"Easy to use file-based SQL migrations toolkit","archived":false,"fork":false,"pushed_at":"2025-03-03T01:12:43.000Z","size":84,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-18T21:42:39.219Z","etag":null,"topics":["database","migrations","sql"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slashmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2023-09-28T15:35:17.000Z","updated_at":"2024-12-02T09:27:18.000Z","dependencies_parsed_at":"2024-05-06T02:38:43.847Z","dependency_job_id":"07821504-cb9a-4f47-a3ad-0c6b97d8aaf7","html_url":"https://github.com/slashmo/chinchilla-cli","commit_stats":null,"previous_names":["slashmo/chinchilla-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/slashmo/chinchilla-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmo%2Fchinchilla-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmo%2Fchinchilla-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmo%2Fchinchilla-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmo%2Fchinchilla-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slashmo","download_url":"https://codeload.github.com/slashmo/chinchilla-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmo%2Fchinchilla-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29559961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"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":["database","migrations","sql"],"created_at":"2024-10-24T11:51:11.338Z","updated_at":"2026-02-17T22:02:41.313Z","avatar_url":"https://github.com/slashmo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chinchilla CLI\n\nA CLI for generating SQL-based database migration files and applying/rolling-back those migrations, powered by\n[Chinchilla](https://github.com/slashmo/chinchilla).\n\n## Installation\n\n### Mint 🌱\n\nYou can install `chinchilla` via [`Mint`](https://github.com/yonaskolb/Mint):\n\n```sh\nmint install slashmo/chinchilla-cli@main\n```\n\n### From source 🏭\n\nYou can also build `chinchilla` directly from source:\n\n1. Clone this repository\n2. Open the repository folder in your Terminal\n3. Use `swift` to compile the project:\n\n```sh\nswift build -c release\n```\n\n4. Invoke `chinchilla`:\n\n```sh\n./.build/release/chinchilla --help\n```\n\n## Configuration\n\nChinchilla can be configured in a couple of ways.\n\u003e **Note**\n\u003e Feel free to mix different configuration methods, but be aware of the\n\u003e [order in which they apply](#configuration-value-specificity).\n\n### Explicit command arguments\n\nMost configuration options can be set directly via CLI arguments. Check out the `--help` text of the command you wish\nto run to see the available arguments.\n\n### Environment variables\n\nConfiguration options may also be passed via environment variables. This is the recommended way to pass sensitive\ninformation such as your database password.\n\n### YAML configuration file\n\nChinchilla supports file-based configuration in YAML. By default, all commands read `chinchilla.yml` within your\ncurrent directory. If this file doesn't exist, Chinchilla falls back to other configuration methods. You may also use\na YAML file at a different location by passing the `-c`/`--config` flag to `chinchilla`.\n\n#### Example file\n\n```yml\nversion: 1.0\nmigrations_path: /path/to/migrations\n```\n\n### Configuration Value Specificity\n\nConfiguration values are determined in the following order:\n\n1. Use the CLI argument, if set\n2. Use the environment variable, if set\n3. Use the value specified in the config file, if set\n4. Fall back to a sensible default if possible\n5. If no fall-back exists, fail execution\n\n## Migration files\n\nChinchilla uses plain SQL files to define database migrations in both directions.\nEach migration is split into two files, `*.up.sql` and `*.down.sql`.\n\nFor example, an \"up\" file may create a new table whereas its corresponding \"down\" file would delete that table.\n\n| File | SQL |\n| --- | --- |\n| `20230928202100_create_users_table.up.sql` | `CREATE TABLE users (id UUID PRIMARY KEY)` |\n| `20230928202100_create_users_table.down.sql` | `DROP TABLE users` |\n\n\u003e **Note**\n\u003e As you can see, migration files are prefixed with a date to make them unique and to preserve the order in which they\n\u003e are applied.\n\n### Generate migration files\n\n`chinchilla` ships with a handy command to generate migration files:\n\n```sh\nchinchilla generate create_users_table\n```\n\nThis command creates two files, one for \"up\" and one for \"down\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashmo%2Fchinchilla-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslashmo%2Fchinchilla-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashmo%2Fchinchilla-cli/lists"}