{"id":22436522,"url":"https://github.com/tommywalkie/excalidraw-cli","last_synced_at":"2025-10-04T09:21:42.561Z","repository":{"id":40694263,"uuid":"272716199","full_name":"tommywalkie/excalidraw-cli","owner":"tommywalkie","description":"Experimental Excalidraw CLI tool","archived":false,"fork":false,"pushed_at":"2023-01-09T02:08:10.000Z","size":1866,"stargazers_count":31,"open_issues_count":16,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-27T14:15:48.579Z","etag":null,"topics":["cli","excalidraw","roughjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tommywalkie.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}},"created_at":"2020-06-16T13:32:01.000Z","updated_at":"2025-04-08T11:03:25.000Z","dependencies_parsed_at":"2023-02-08T08:15:55.196Z","dependency_job_id":null,"html_url":"https://github.com/tommywalkie/excalidraw-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tommywalkie/excalidraw-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommywalkie%2Fexcalidraw-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommywalkie%2Fexcalidraw-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommywalkie%2Fexcalidraw-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommywalkie%2Fexcalidraw-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tommywalkie","download_url":"https://codeload.github.com/tommywalkie/excalidraw-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommywalkie%2Fexcalidraw-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267535173,"owners_count":24103254,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","excalidraw","roughjs"],"created_at":"2024-12-06T00:08:05.587Z","updated_at":"2025-10-04T09:21:42.494Z","avatar_url":"https://github.com/tommywalkie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# excalidraw-cli\n\n[![npm version](https://img.shields.io/npm/v/@tommywalkie/excalidraw-cli)](https://www.npmjs.com/package/@tommywalkie/excalidraw-cli) [![Bundlephobia badge](https://badgen.net/bundlephobia/min/@tommywalkie/excalidraw-cli)](https://bundlephobia.com/result?p=@tommywalkie/excalidraw-cli@latest) ![build](https://github.com/tommywalkie/excalidraw-cli/workflows/build/badge.svg?branch=master)\n\nExperimental Excalidraw CLI tool.\n\nParses Excalidraw JSON schemas (`*.excalidraw`) into PNGs (`*.png`).\n\nThis project is a follow-up to [excalidraw#1261](https://github.com/excalidraw/excalidraw/issues/1261) and strives to provide a CLI for **[excalidraw](https://github.com/excalidraw/excalidraw)**.\n\n![demo](https://raw.githubusercontent.com/tommywalkie/excalidraw-cli/master/.github/assets/demo.gif)\n\n_Demo_ ⤴️\n\n## Install\n\n```bash\nnpm install -g @tommywalkie/excalidraw-cli\n```\n\n### Alpine\n\nIf using Alpine (e.g. for Docker stuff), install the following packages.\n\n```dockerfile\nFROM node:alpine\nRUN apk update\nRUN apk add --no-cache python g++ build-base cairo-dev jpeg-dev pango-dev \\\n    musl-dev giflib-dev pixman-dev pangomm-dev libjpeg-turbo-dev freetype-dev\n```\n\n## Usage\n\n```bash\n$ excalidraw-cli --help\nParses Excalidraw JSON schemas into PNGs\n\nUSAGE\n  $ excalidraw-cli [INPUT] [OUTPUT]\n\nARGUMENTS\n  INPUT   [default: {cwd}] Excalidraw file path / directory path\n  OUTPUT  [default: {cwd}] Output PNG file path / directory path\n\nOPTIONS\n  -h, --help     show CLI help\n  -q, --quiet    disable console outputs\n  -v, --version  show CLI version\n```\n\n### Docker\n\nFor convenience we have also a Docker image that includes all dependencies out of the box.\n\n#### Build\n\nTo build the Docker image run following command.\n\n#### Use\n\nTo use the docker image in a convenient way you can add following function to your `.bashrc` or `.zshrc`.\n\n```bash\nfunction excalidraw-cli {\n  docker run --rm -it -v $PWD:/data excalidraw-cli $@\n}\n```\n\nThen simply reload your terminal to have this function available.\n\n```bash\n$ excalidraw-cli drawings/my-drawing.excalidraw .\n✔ drawings/my-drawing.excalidraw =\u003e drawings/my-drawing.png\n```\n\n## How it works\n\nCurrently, [`excalidraw`](https://www.npmjs.com/package/excalidraw) NPM package only exports a React component. `excalidraw-cli` uses **[node-canvas](https://github.com/Automattic/node-canvas)** at its core, this allows to generate canvas without relying on the `window` context, and uses a home-made renderer which tries to _mimic_ Excalidraw's as much as possible, using [**Rough.js**](https://roughjs.com/) API primarily.\n\nHopefully, `excalidraw-cli` will directly use Excalidraw renderer methods for consistent results, once Excalidraw provides some Node-compatible API.\n\nSee the related issue thread [excalidraw#1780](https://github.com/excalidraw/excalidraw/issues/1780).\n\n## Contributing\n\n\u003e **Note**: Most of the codebase is currently in **ES2017**, it will soon be converted to **TypeScript** for educational purposes, but also for easier integration with Excalidraw.\n\nInstall dependencies with `npm` or `yarn`.\n\n```sh\nnpm install\n```\n\nExport fonts, transpile **TypeScript** / **ES2017** source into **CommonJS** for production.\n\n```sh\nnpm run prepack\n```\n\nTest the CLI with the transpiled source code.\n\n```sh\nnode ./bin/run           # Run with Node\nnpm run excalidraw-cli   # Run with NPM script\n```\n\nPrepack and launch Jest tests.\n\n```sh\nnpm run test\n```\n\nYou can check requested / planned / work-in-progress features in [Projects](https://github.com/tommywalkie/excalidraw-cli/projects).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommywalkie%2Fexcalidraw-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommywalkie%2Fexcalidraw-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommywalkie%2Fexcalidraw-cli/lists"}