{"id":15689624,"url":"https://github.com/chappio/directus-extension-seed","last_synced_at":"2025-10-18T16:26:52.817Z","repository":{"id":65813156,"uuid":"600479044","full_name":"ChappIO/directus-extension-seed","owner":"ChappIO","description":"Seed simple data into the database (useful for setting permissions and settings)","archived":false,"fork":false,"pushed_at":"2025-02-07T17:04:19.000Z","size":131,"stargazers_count":18,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T23:05:16.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ChappIO.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":"2023-02-11T16:14:05.000Z","updated_at":"2025-05-05T07:00:19.000Z","dependencies_parsed_at":"2024-10-30T22:35:47.556Z","dependency_job_id":null,"html_url":"https://github.com/ChappIO/directus-extension-seed","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.0625,"last_synced_commit":"f175bcb5e857ff854f65e7037d160e1524ac0a68"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChappIO%2Fdirectus-extension-seed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChappIO%2Fdirectus-extension-seed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChappIO%2Fdirectus-extension-seed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChappIO%2Fdirectus-extension-seed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChappIO","download_url":"https://codeload.github.com/ChappIO/directus-extension-seed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968117,"owners_count":21833251,"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":[],"created_at":"2024-10-03T18:03:41.675Z","updated_at":"2025-10-18T16:26:52.714Z","avatar_url":"https://github.com/ChappIO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Directus CLI Extension: Seed\n\n**Note:** This extension is very much under development.\nUse at own risk.\n\nSeed your directus instance from .yml files from the CLI.\n\n## Usage:\n\n1. Install the extension: `npm install directus-extension-seed`.\n2. Create your seed file: `00_directus_settings.yml`:\n   ```yaml\n   # This key is the collection to import into\n   directus_settings:\n    # directus_settings is a singleton collection so its id is always 1\n     - id: 1\n       project_name: My Backoffice\n       project_url: https://thing.com\n       project_color: \"#7B219F\"\n   ```\n3. Run `directus data apply ./path/to/your/file.yml`\n\nEssentially, the .yml file contains your collection data which should be upserted.\nNote that primary keys are required as they are used to determine if the image should be updated or added.\n\n## Dumping data\n\n1. Install the extension: `npm install directus-extension-seed`.\n2. Run `directus data snapshot --output \u003ctargetFile\u003e \u003ccollections...\u003e` (For example: `directus data snapshot --output dump.yml directus_settings`)\n\n## Some Examples:\n\nTo grant public read access to the `projects` collection:\n\n```yaml\ndirectus_permissions:\n   - id: 1\n     collection: projects\n     role: null\n     action: read\n     fields: \"*\"\n```\n\nTo create a role with full rights on the `projects` collection:\n\n```yaml\ndirectus_roles:\n   - id: 8a4cabd2-53d9-4be4-9d23-5d27b459ef7f\n     name: Project Manager\n        \ndirectus_permissions:\n   - id: 2\n     role: 8a4cabd2-53d9-4be4-9d23-5d27b459ef7f\n     collection: projects\n     action: create\n     fields: \"*\"\n   - id: 3\n     role: 8a4cabd2-53d9-4be4-9d23-5d27b459ef7f\n     collection: projects\n     action: read\n     fields: \"*\"\n   - id: 4\n     role: 8a4cabd2-53d9-4be4-9d23-5d27b459ef7f\n     collection: projects\n     action: update\n     fields: \"*\"\n   - id: 5\n     role: 8a4cabd2-53d9-4be4-9d23-5d27b459ef7f\n     collection: projects\n     action: delete\n     fields: \"*\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchappio%2Fdirectus-extension-seed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchappio%2Fdirectus-extension-seed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchappio%2Fdirectus-extension-seed/lists"}