{"id":48829060,"url":"https://github.com/exoad/ship","last_synced_at":"2026-04-14T19:31:16.655Z","repository":{"id":327407628,"uuid":"1109178182","full_name":"exoad/ship","owner":"exoad","description":"A simple scripting DSL built for simple project management","archived":false,"fork":false,"pushed_at":"2025-12-03T12:58:43.000Z","size":24,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-06T16:48:07.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exoad.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-12-03T12:55:09.000Z","updated_at":"2025-12-05T20:36:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/exoad/ship","commit_stats":null,"previous_names":["exoad/ship"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/exoad/ship","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exoad%2Fship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exoad%2Fship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exoad%2Fship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exoad%2Fship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exoad","download_url":"https://codeload.github.com/exoad/ship/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exoad%2Fship/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31812968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: 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-04-14T19:31:13.291Z","updated_at":"2026-04-14T19:31:16.641Z","avatar_url":"https://github.com/exoad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ship\n\n## Overview\n\n**Ship** is a DSL for forming simple scripts. It uses brace-based syntax `{}` for blocks, supports conditional execution with `if/elif/else`, and distinguishes between built-in tags and custom tasks using the `$` prefix.\n\nTo use, simply make sure to install Python and just copy the root `ship.py` over to your project root and start using it!\n\n**Extension:** `.ship`\n\n## Syntax\n\n### Basic Structure\n\n```ship\nship {\n    title: \"My Build\"\n\n    var {\n        KEY = \"value\"\n        ANOTHER = true\n    }\n\n    run { command: \"flutter build\" }\n\n    if CONDITION {\n        // tasks when true\n    } elif OTHER {\n        // alternative\n    } else {\n        // fallback\n    }\n}\n```\n\n### Tag Types\n\n| Prefix | Type     | Example                     | Description                   |\n| ------ | -------- | --------------------------- | ----------------------------- |\n| (none) | Built-in | `run {}`, `delete {}`       | Special compiler-handled tags |\n| `$`    | Custom   | `$myTask {}`, `$cleanup {}` | User-defined task markers     |\n\n### Built-in Tags\n\n-   `ship {}` - Root container (optional)\n-   `title:` - Build title\n-   `var {}` - Variable declarations\n-   `if`, `elif`, `else` - Conditional execution\n-   `run {}` - Execute shell command\n-   `delete {}` - Delete file/directory\n-   `mkdir {}` - Create directory\n-   `copy {}` - Copy file\n-   `move {}` - Move file\n-   `move_all {}` - Move directory contents\n-   `zip {}` - Create ZIP archive\n\n### Variable Usage\n\n```ship\nvar {\n    DIST = \"./dist\"\n    VERSION = \"1.0.0\"\n}\n\n# Use the variable directly (no ${} needed). For complex strings, define a var with the full path.\nmkdir { path: DIST }\n```\n\n### Conditional Execution\n\n```ship\nif BUILD_RELEASE {\n    run { command: \"flutter build --release\" }\n} elif BUILD_DEBUG {\n    run { command: \"flutter build --debug\" }\n} else {\n    $skip_build {}\n}\n```\n\n### Comments\n\n```ship\n// Single-line comment\n# Hash-style comment\n\n/*\n   Multi-line\n   comment\n*/\n```\n\n## Available Actions\n\n### `run` - Execute shell commands\n\n```ship\nrun {\n    command: \"flutter build windows --release\"\n    verbose: true\n}\n```\n\n### `delete` - Delete files or directories\n\n```ship\ndelete {\n    path: \"./dist/old_build\"\n    forgive_missing: true\n}\n```\n\n### `mkdir` - Create directory\n\n```ship\nmkdir { path: \"./dist/windows\" }\n```\n\n### `copy` - Copy file\n\n```ship\ncopy {\n    src: \"./LICENSE.txt\"\n    dst: \"./dist/LICENSE.txt\"\n}\n```\n\n### `move` - Move file or directory\n\n```ship\nmove {\n    src: \"./old/location\"\n    dst: \"./new/location\"\n}\n```\n\n### `move_all` - Move all contents\n\n```ship\nmove_all {\n    src: \"./build/artifacts\"\n    dst: \"./dist\"\n}\n```\n\n### `zip` - Create ZIP archive\n\n```ship\nzip {\n    src: \"./dist/windows\"\n    zip_path: \"./dist/release.zip\"\n}\n```\n\n## Usage\n\n### From Python\n\nYou can still invoke scripts programmatically:\n\n```python\nimport ship_it as builder\n\n# Execute a script without CLI variable overrides\nbuilder.run_ship(\"build_windows.ship\", dry_run=True)\n```\n\n### From Command Line\n\n```bash\n# Run build\npython ship_it.py build_windows.ship\n\n# Dry run (show what would execute)\npython ship_it.py build_windows.ship --dry-run\n```\n\n## Example: Windows Build Script\n\nSee `build_windows.ship` for a complete working example that:\n\n1. Installs dependencies\n2. Runs tests\n3. Builds the Flutter Windows release\n4. Cleans up unnecessary files\n5. Conditionally creates a distribution ZIP\n\n## Design Philosophy\n\nShip is designed with these principles:\n\n-   **Kotlin-like braces** - Familiar syntax for developers\n-   **Explicit blocks** - Clear visual structure with `{}`\n-   **Custom tasks** - `$` prefix distinguishes user tags\n-   **Conditional logic** - Full `if/elif/else` support\n-   **Variable injection** - CLI overrides script defaults\n-   **Simple and readable** - Easy to understand at a glance\n\n## Legacy Support\n\nNote: Legacy `.script` (YAML-like) support has been removed. Please migrate to `.ship` scripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexoad%2Fship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexoad%2Fship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexoad%2Fship/lists"}