{"id":19682625,"url":"https://github.com/sun0day/svg-sketchy","last_synced_at":"2026-03-04T01:17:21.553Z","repository":{"id":227481371,"uuid":"771425414","full_name":"sun0day/svg-sketchy","owner":"sun0day","description":"A Node.js CLI to sketch svg.","archived":false,"fork":false,"pushed_at":"2026-02-25T16:49:40.000Z","size":2877,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-25T20:06:52.131Z","etag":null,"topics":["mermaidjs","nodejs-cli","roughjs","svg","vizjs"],"latest_commit_sha":null,"homepage":"https://sun0day.github.io/svg-sketchy/","language":"TypeScript","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/sun0day.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":"2024-03-13T09:24:17.000Z","updated_at":"2026-02-14T15:36:35.000Z","dependencies_parsed_at":"2024-03-13T15:30:32.416Z","dependency_job_id":"092e6c2b-95f3-4253-be52-656225999530","html_url":"https://github.com/sun0day/svg-sketchy","commit_stats":null,"previous_names":["sun0day/svg-sketchy"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sun0day/svg-sketchy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun0day%2Fsvg-sketchy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun0day%2Fsvg-sketchy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun0day%2Fsvg-sketchy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun0day%2Fsvg-sketchy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sun0day","download_url":"https://codeload.github.com/sun0day/svg-sketchy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun0day%2Fsvg-sketchy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30068033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"ssl_error","status_checked_at":"2026-03-04T01:03:23.410Z","response_time":61,"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":["mermaidjs","nodejs-cli","roughjs","svg","vizjs"],"created_at":"2024-11-11T18:11:31.201Z","updated_at":"2026-03-04T01:17:21.534Z","avatar_url":"https://github.com/sun0day.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"240\" alt=\"image\" src=\"https://github.com/sun0day/svg-sketchy/assets/102238922/fabd88bb-478e-475b-bdb6-976b4ddc5d22\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e A Node.js CLI to sketch svg.\u003c/p\u003e\n\n## Features\n\n- :pencil2: Converting svgs to [hand-drawn](https://roughjs.com/) style.\n- :four_leaf_clover: Compatible with [.dot](https://graphviz.org/doc/info/lang.html) and [.mmd](https://mermaid.js.org/ecosystem/integrations-create.html#file-extension) formats.\n\n:point_right: Try it [online](https://sun0day.github.io/svg-sketchy)\n\n## Install\n\n```shell\n$ npm i -g svg-sketchy\n```\n\n## Usage\n\n### Used as CLI\n\n#### sketch `.svg`\n\n```shell\n$ sket hello_world.svg # sketch single svg and override it\n$ sket hello_world.svg -r /home  # sketch svg in another directory\n$ sket hello_*.svg # sketch multiple svgs which paths start with \"hello_\" and override them\n$ sket world.svg -o /home/hello_[name].svg # sketch svg and output it to a new directory with a new name \"hello_world.svg\"\n```\n\n#### sketch `.dot` \u0026 `.mmd`\n\nSketching `.dot` \u0026 `.mmd` files is not much different than sketching `.svg`. Suppose we have two files named `hello_world.dot` and `hello_world.mmd`, after sketching, the outputs would look like:\n\n||`hello_world.dot`|`hello_world.mmd`|\n|----|:-----:|:-----:|\n|dsl|`digraph G {Hello-\u003eWorld}`| `graph TB\\nhello--\u003eworld`\n|cmd|`sket hello_world.dot` | `sket hello_world.mmd`\n|outputs without sketching|![dot](https://github.com/sun0day/svg-sketchy/assets/102238922/143f8e53-a562-46af-af79-b4bf9751d767)|\u003cimg src=\"https://github.com/sun0day/svg-sketchy/assets/102238922/0a5fc6e4-8dcd-45d5-b46a-3976bfb03d42\" height=\"160px\"/\u003e\n| \u0026nbsp;| \u0026nbsp;|\n|outputs after sketching|![dot_sketch](https://github.com/sun0day/svg-sketchy/assets/102238922/acf78da2-3ac8-485d-8fcd-bb3fabe9b09f)|\u003cimg src=\"https://github.com/sun0day/svg-sketchy/assets/102238922/452ec4e0-670d-4f40-9a2f-31c75ff5c871\" height=\"160px\" /\u003e\n\n#### customize sketch style\n\nTry it [online](https://sun0day.github.io/svg-sketchy) to see how different sketch configs affect the final svg output.\n\n#### CLI options\n\n|option|default|description|\n|----|----|----|\n-r, --root \u003csvg_root_dir\u003e | cwd |Svg files root directory, ignored when [svg_files] is absolute.\n-o, --output \u003csvg_out_file\u003e |\"{cwd}/[name].svg\"| Svg files output directory and filename, use **\"[name]\"** to keep the original svg filename.\n-f, --font \u003cfont_family\u003e    |\"Comic Sans MS, cursive\"| Font with which text elements should be drawn, setting to **\"null\"** will use the text element's original font family.\n--rough \u003croughjs_config\u003e    |-| Rough.js config, see [roughjs options](https://github.com/rough-stuff/rough/wiki#options). e.g: \"roughness=0.5,bowing=5\".\n--no-rand                   |false| Whether to disable randomize Rough.js' **fillWeight**, **hachureAngle** and **hachureGap**.\n--no-fill                   |false|Whether to disable sketch pattern **fills/strokes** or just copy them to the output.\n--pencil                    |false|Whether to apply a **pencil effect** on the SVG rendering.\n\n### Used as API\n\nYou can also use `svg-sketchy` in Node.js env.\n\n```js\nimport { SVGSketcher } from 'svg-sketchy'\n\n// create a SVGSketcher instance\nconst sketcher = new SVGSketcher({\n  target: 'world.svg',\n  root: './', // \u003c--\u003e -r, --root\n  output: '/home/hello_[name].svg', // \u003c--\u003e -o, --output\n  fontFamily: 'arial', // \u003c--\u003e -f, --font\n  roughConfig: { // \u003c--\u003e --rough\n    roughness: 0.5,\n    bowing: 5\n  },\n  randomize: false, // \u003c--\u003e --no-rand\n  sketchPatterns: false, // \u003c--\u003e --no-fill\n  pencilFilter: true, // \u003c--\u003e --pencil\n})\n\n// transforming\nawait sketcher.run()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsun0day%2Fsvg-sketchy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsun0day%2Fsvg-sketchy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsun0day%2Fsvg-sketchy/lists"}