{"id":15652940,"url":"https://github.com/typicode/shoutjs","last_synced_at":"2025-04-30T20:26:54.961Z","repository":{"id":11716168,"uuid":"14235768","full_name":"typicode/shoutjs","owner":"typicode","description":"Make your ShellJS commands explicit and get a beautiful output","archived":false,"fork":false,"pushed_at":"2013-11-18T13:23:21.000Z","size":132,"stargazers_count":30,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T20:26:53.173Z","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/typicode.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":"2013-11-08T15:05:55.000Z","updated_at":"2024-06-14T06:09:55.000Z","dependencies_parsed_at":"2022-08-02T23:30:32.499Z","dependency_job_id":null,"html_url":"https://github.com/typicode/shoutjs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fshoutjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fshoutjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fshoutjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fshoutjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typicode","download_url":"https://codeload.github.com/typicode/shoutjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251777442,"owners_count":21642158,"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-10-03T12:44:19.034Z","updated_at":"2025-04-30T20:26:54.930Z","avatar_url":"https://github.com/typicode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShoutJS\n\nMake your ShellJS commands explicit and get a beautiful output.\n\n## Example\n\nGet this:\n\n![](http://i.imgur.com/cS6MTiQ.png)\n\nWith this:\n\n```javascript\nvar shout = require('shoutjs');\n\nshout.mkdir('bleach');\nshout.to('bleach/ichigo', 'Bankai!');\nshout.rm('-rf', 'bleach');\n```\n\n## Commands\n\nSupported ShellJS commands are: `cp`, `rm`, `mv`, `mkdir`, `to`.\n\nShoutJS only wraps ShellJS commands which change the filesystem. \nFor usage information, you can go here [ShellJS](https://github.com/arturadib/shelljs). \n\nThere's only ```to``` which differs from ShellJS:\n\n```javascript\nvar shell = require('shelljs/global'),\n    shout = require('shoutjs');\n\n'Bankai!'.to('file');        // ShellJS\nshout.to('file', 'Bankai!'); // ShoutJS\n```\n\n## Theming\n\nShoutJS supports theming through [Logan](http://typicode.github.com/logan).\nSo it's possible to customize ShoutJS output pretty much the way you want.\n\nHere is the default theme:\n\n```javascript\n// Default theme\nshout.logan.set({\n  cp    : ['  copy   % to %', 'cyan . cyan .'],\n  rm    : ['  remove %     ', 'red          '],\n  mv    : ['  move   % to %', 'cyan . cyan .'],\n  mkdir : ['  create %     ', 'cyan         '],\n  to    : ['  create %     ', 'cyan         '],\n  exec  : ['  exec   %     ', 'blue .       ']\n});\n```\n\nTo override it:\n\n```javascript\n//  A bit more old fashioned theme...\nshout.logan.set({\n  cp    : ['cp % %', 'grey'],\n  rm    : ['rm %  ', 'grey'],\n  // ...\n});\n```\n\n## Adding new messages\n\nIn many cases, you may want to log more than ShellJS commands for your users.  \nThe recommanded way is to use [Logan](http://typicode.github.com/logan).\n\nHere's an example:\n\n```javascript\nvar shout = require('shoutjs'),\n    logan = require('logan');\n\nlogan.set({\n  info: ['  info %', 'yellow']\n});\n\nlogan.info('starting script...');\nshout.rm('file.txt');\nlogan.info('done');\n```\n\n## Configuration\n\nYou can disable ShoutJS output using ```logan.silent``` option.\n\n```javascript\nshout.logan.silent = true;\nshout.to('ichigo.txt', 'Bankai!'); // No output\n```\n\n## Issues\n\nHave a bug or missing a new command introduced in ShellJS? Please create an issue here on GitHub!\n\n## Themes\n\nIf you've created a theme for ShellJS feel free to drop me a message [@typicode](https://github.com/typicode).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypicode%2Fshoutjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypicode%2Fshoutjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypicode%2Fshoutjs/lists"}