{"id":19987580,"url":"https://github.com/css-doodle/cli","last_synced_at":"2025-05-04T08:31:29.996Z","repository":{"id":257813807,"uuid":"867406703","full_name":"css-doodle/cli","owner":"css-doodle","description":"Command-line tool for css-doodle to preview and generate images/videos.","archived":false,"fork":false,"pushed_at":"2025-04-14T01:21:43.000Z","size":247,"stargazers_count":16,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-21T09:22:14.087Z","etag":null,"topics":[],"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/css-doodle.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},"funding":{"open_collective":"css-doodle"}},"created_at":"2024-10-04T02:21:47.000Z","updated_at":"2025-04-14T01:21:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"5082c170-5075-4759-80ee-f1389dece956","html_url":"https://github.com/css-doodle/cli","commit_stats":null,"previous_names":["css-doodle/cli"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/css-doodle%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/css-doodle%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/css-doodle%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/css-doodle%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/css-doodle","download_url":"https://codeload.github.com/css-doodle/cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252307992,"owners_count":21727106,"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-11-13T04:37:10.806Z","updated_at":"2025-05-04T08:31:29.984Z","avatar_url":"https://github.com/css-doodle.png","language":"JavaScript","funding_links":["https://opencollective.com/css-doodle"],"categories":[],"sub_categories":[],"readme":"# @css-doodle/cli\n\nCommand-line tool for css-doodle to preview and generate images/videos.\n\n\u003cimg src=\"screenshot/preview.png\" width=\"480px\" alt=\"screenshot\" /\u003e\n\n## Installation\n\n```bash\nnpm install -g @css-doodle/cli\n```\n\n\u003e[!NOTE]\n\u003e After installation, you can use `cssd` or `css-doodle` command in the terminal.\n\n## Usage\n\n```console\nUsage: cssd [options] [command] [source]\n\nArguments:\n  source         css-doodle source file to preview (same as run command)\n\nOptions:\n  -V, --version  output the version number\n  -h, --help     display help for command\n\nCommands:\n  run            Open a window to preview the css|cssd file\n  render         Generate an image from a css|cssd|html file or a CodePen link\n  generate       Generate code using css-doodle generators\n  config         Display/set configurations\n  use            Shorthand to fetch and use a custom version of css-doodle\n  parse          Print the parsed tokens, help to debug in development\n  upgrade        Upgrade CLI to latest version\n```\n\n## Commands\n\n### run\nOpen a window to preview the css-doodle source file. The source file can be either `.css` or `.cssd`.\n\n* `--fullscreen`: Open in fullscreen mode.\n\n```bash\ncssd run code.css\ncssd run code.css --fullscreen\n```\n\nThe `run` can be omitted if you just want to preview.\n\n```bash\ncssd somefile.css\n```\n\n### render\nGenerate an image/video from the css-doodle source file. The source file can be a `.css`, `.cssd`, `.html` file or CodePen link.\n\n* `-o, --output \u003coutput\u003e`:      Custom output filename of the generated result\n* `-x, --scale \u003cscale\u003e`:        Scale factor of the generated result, defaults to `2` for images, `1` for videos\n* `-s, --selector \u003cselector\u003e`:  CSS selector to target the rendered node, defaults to `css-doodle`\n* `-d, --delay \u003cdelay\u003e`:        Delay time before taking screenshot/screencast, e.g, `2s`\n* `-t, --time \u003ctime\u003e`:          Record screen for a specific time, e.g, `10s`\n* `-q, --quiet`:                Quiet mode, suppresses non-error output\n* `-w, --window \u003csize\u003e`:        The size of the rendered window, defaults to `1600x1200` for images, `1200x900` for videos\n* `--mp4`:                      Use `mp4` as the generated video format\n\n\n```bash\ncssd render\ncssd render code.css\ncssd render code.css -o result.png\ncssd render code.css -x 4\ncssd render https://codepen.io/yuanchuan/pen/MQEeJo\n```\n\nScreen recording:\n\n```bash\ncssd render -t 10s\n```\n\nBy default the generated video is in `webm` format,\nyou can transform it automatically into `mp4` by adding `--mp4` option,\nor use an output filename with `.mp4` extension.\n\n```bash\ncssd render -t 10s --mp4\ncssd render -o result.mp4\n```\n\n### generate\n\nGenerate code using css-doodle generators.\n\n* `svg`: Generate SVG code using svg() function.\n* `polygon`: Generate CSS polygon() using shape() function.\n\n```bash\ncssd generate svg code.css\ncssd generate polygon code.css\n\n# read from STDIN\ncssd generate polygon\n```\n\n### config\n\nDisplay/set the configurations in key/value pairs.\n\n* `set \u003cfield\u003e \u003cvalue\u003e`: Set a configuration with key/value pair.\n* `get \u003cfield\u003e`: Get a configuration value by key.\n* `unset \u003cfield\u003e`: Unset a configuration field.\n* `list`: List all configurations.\n\nRecognizable `field` configurations:\n\n* `browserPath`: The path to the browser executable.\n* `css-doodle`: The path to the css-doodle to use.\n\n```bash\n# show all configurations\ncssd config list\n\n# use a custom browser\ncssd config set browserPath /Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome\n\n# unset\ncssd config unset browserPath\n\n# get the value\ncssd config get browserPath\n\n# download and use a custom version of css-doodle\ncssd config set css-doodle 0.40.6\n```\n\n### use\nShorthand of `cssd config set css-doodle \u003cversion\u003e`.\n\n* `\u003cversion\u003e`: The version of css-doodle to use. It can be a specific version or `latest`.\n\n```bash\ncssd use css-doodle@0.40.6\n\n# or just version\ncssd use 0.40.6\ncssd use latest\n```\n\n### upgrade\nUpgrade CLI to latest version.\n\n```bash\ncssd upgrade\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcss-doodle%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcss-doodle%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcss-doodle%2Fcli/lists"}