{"id":13549667,"url":"https://github.com/frencojobs/derry","last_synced_at":"2025-10-07T02:34:49.888Z","repository":{"id":38086987,"uuid":"269398377","full_name":"frencojobs/derry","owner":"frencojobs","description":"A script manager for Dart.","archived":false,"fork":false,"pushed_at":"2023-06-25T19:24:31.000Z","size":6165,"stargazers_count":198,"open_issues_count":11,"forks_count":20,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T12:06:42.537Z","etag":null,"topics":["dart","ffi","flutter","rust"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/derry","language":"Dart","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/frencojobs.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,"publiccode":null,"codemeta":null}},"created_at":"2020-06-04T15:37:39.000Z","updated_at":"2025-03-17T03:46:22.000Z","dependencies_parsed_at":"2024-06-18T21:52:48.839Z","dependency_job_id":null,"html_url":"https://github.com/frencojobs/derry","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frencojobs%2Fderry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frencojobs%2Fderry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frencojobs%2Fderry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frencojobs%2Fderry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frencojobs","download_url":"https://codeload.github.com/frencojobs/derry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666015,"owners_count":20975788,"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":["dart","ffi","flutter","rust"],"created_at":"2024-08-01T12:01:24.236Z","updated_at":"2025-10-07T02:34:44.853Z","avatar_url":"https://github.com/frencojobs.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# Derry\n\nDerry is a script manager for Dart.\n\n## Overview\n\nDerry helps you define shortcut scripts, and save you from having to type very long and forgettable long lines of scripts, again and again.\n\nInstead of running this every time,\n\n```bash\ndart run build_runner build --delete-conflicting-outputs\n```\n\nAdd this to `pubspec.yaml`,\n\n```yaml\nscripts:\n  build: dart run build_runner build --delete-conflicting-outputs\n```\n\nand run\n\n```bash\nderry build\n```\n\n\u003cbr\u003e\n\n## Installation\n\nInstall derry as a global dependency from [pub.dev](https://pub.dev) like this.\n\n```bash\ndart pub global activate derry\n```\n\nThen use derry to run a command from the current dart/flutter project.\n\n```bash\nderry [script]\n```\n\n\u003cbr\u003e\n\n## Usage\n\nWhen called, derry will look for a `pubspec.yaml` file in the current directory, and will throw an error if it doesn't exist. The scripts can be declared within the `scripts` node of the `pubspec.yaml` file.\n\n```yaml\nscripts:\n  build: dart run build_runner build\n```\n\n```bash\nderry build\n# or even with additional arguments\nderry build -- --delete-conflicting-outputs\n```\n\n\u003cbr\u003e\n\n## API Documentation\n\n**Use definition file**\n\nScripts can be configured just inside the `pubspec.yaml` file or within a separate file. When using a separate file to configure scripts, pass the file name as the value of the `scripts` node in the `pubspec.yaml` file.\n\n```yaml\n# pubspec.yaml\nscripts: derry.yaml\n```\n\n```yaml\n# derry.yaml\nbuild: dart run build_runner build\n```\n\n**Use scripts as List**\n\nA script can either be a single string or a list of strings. If it is a list, the strings inside of the list will be executed synchronously in the given order of the list.\n\n```yaml\nbuild:\n  - dart test\n  - echo \"test completed\"\n  - dart run build_runner build\n```\n\n**Nested scripts**\n\nScripts can be nested as the user needed. For example, you can use them to use different implementations of the build script based on operating system.\n\n```yaml\nbuild:\n  windows:\n    - echo 0 # do something\n  mac:\n    - echo 1 # do something else\n```\n\nAnd you can use them by calling `derry build windows` on windows and `derry build mac` on macOS.\n\n**Pre and post scripts**\n\nWith pre \u0026 post scripts, you can easily define a script to run before and after a specific script without hassling with references. Derry automatically understands them from the names.\n\n```yaml\nprepublish:\n  - cargo build \u0026\u0026 copy target blob\n  - dart test\npublish:\n  - dart pub publish\npostpublish:\n  - rm -rf blob\n```\n\n**Configure script descriptions**\n\nYou can add a string to `(description)` option, which can be useful when viewing through a list of available via `derry ls -d` command. When you are using `(description)` field, you must use `(script)` field to define scripts.\n\n```yaml\nbuild:\n  (description): script to be called after every update to x.dart file\n  (scripts):\n    - cat generated.txt\n    - dart run build_runner build\n```\n\n**Configure multiline scripts**\n\nNote that in the list of scripts, executions will happen in separate processes. You can use `\u0026\u0026` to execute multiple scripts in the same process.\n\n```yaml\n# \u003e or | can be used to define multiline strings, this is a standard YAML syntax\nbuild: \u003e\n  cat generated.txt \u0026\u0026\n  dart run build_runner build\n\n# the second line won't be called if generated.txt does not exist\n```\n\n**Use references**\n\nWhen defining scripts, you can reference to other scripts via `$` syntax. These references to scripts won't be executed with a separate derry process. For example,\n\n```yaml\ntest:\n  - dart run test\n  - echo \"test completed\"\nbuild:\n  - $test # instead of using derry test\n  - $test --ignored # even with arguments\n  - flutter build\ngenerate:\n  env:\n    - echo env\nrelease:\n  - $generate:env # use nested references via :\n  - $build\n```\n\n`derry test` will spawn a new derry process to execute, while references won't, reducing the time took to run dart code, and spawn that process.\nBut note that references will take a whole line of script. For example, you have to give a separate line for a subcommand, you can't use them together with other scripts or sandwiched in a string.\n\n**List available scripts**\n\nUse this command to see what scripts are available in the current configuration.\n\n```bash\nderry ls # --description or -d to output descriptions\n```\n\n**Check the location of the derry scripts**\n\nUse this command to see the location (both absolute and relative) path of the derry script file. You can also use this to check if the scripts are correctly formatted or the location is correct.\n\n```bash\nderry source # --absolute or -a to show absolute path\n```\n\n**Upgrade derry**\n\n```bash\ndart pub global activate derry # or\nderry upgrade # will run `dart pub global activate derry`\n```\n\n\u003cbr\u003e\n\n## Why \u0026 How\n\nHonestly, I needed it. It was easy to make, though I had a hard time implementing the script execution. Since Dart's `Process` isn't good at executing system commands, I used Rust with the help of _Foreign Function Interfaces_. For execution, currently `cmd` is used for Windows and `bash` is used for Linux and Mac.\n\n\u003cbr\u003e\n\n## Currently Supported Platforms\n\n64bit Linux, Windows, and Mac are currently supported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrencojobs%2Fderry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrencojobs%2Fderry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrencojobs%2Fderry/lists"}