{"id":15551289,"url":"https://github.com/robinradic/node-radic","last_synced_at":"2025-10-04T02:51:36.447Z","repository":{"id":25001602,"uuid":"28420574","full_name":"RobinRadic/node-radic","owner":"RobinRadic","description":"A NodeJS library","archived":false,"fork":false,"pushed_at":"2015-02-22T03:59:42.000Z","size":3116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T08:17:03.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://robin.radic.nl/node-radic","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/RobinRadic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-12-23T21:29:25.000Z","updated_at":"2015-02-22T03:59:44.000Z","dependencies_parsed_at":"2022-08-23T15:40:15.745Z","dependency_job_id":null,"html_url":"https://github.com/RobinRadic/node-radic","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinRadic%2Fnode-radic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinRadic%2Fnode-radic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinRadic%2Fnode-radic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinRadic%2Fnode-radic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobinRadic","download_url":"https://codeload.github.com/RobinRadic/node-radic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246126669,"owners_count":20727594,"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-02T14:03:57.902Z","updated_at":"2025-10-04T02:51:36.355Z","avatar_url":"https://github.com/RobinRadic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# radic\n[![Travis build status](https://img.shields.io/travis/RobinRadic/node-radic.svg)](http://travis-ci.org/RobinRadic/node-radic)\n[![NPM Version](https://img.shields.io/npm/v/radic.svg)](http://npmjs.org/package/radic)\n[![NPM Downloads](https://img.shields.io/npm/dm/radic.svg)](http://npmjs.org/package/radic)\n[![Goto documentation](http://img.shields.io/badge/goto-documentation-orange.svg)](http://robin.radic.nl/node-radic)\n[![Goto repository](http://img.shields.io/badge/goto-repository-orange.svg)](https://github.com/robinradic/node-radic)\n[![License](http://img.shields.io/badge/license-MIT-blue.svg)](http://radic.mit-license.org)\n\n\n### Overview\n`radic` is the core library and application for many of my node applications.\n \n- It exports a variety of objects, classes and instances for external use.   \n- `radic` is also a stand-alone application which manages global configuration and such.\n  \n  \n## How to use\n\n### Documentation\n- [Detailed documentation](http://robin.radic.nl/node-radic)\n- [Tutorials and examples](http://robin.radic.nl/node-radic/tutorial-radic.html)\n- [Test coverage](http://robin.radic.nl/node-radic/coverage/)\n  \n  \n### Installation\n```bash\n# Globally install radic for using radic command line tools\nsudo npm install -g radic\n\n# Local install into project for using libraries and helpers\nnpm install --save radic\n```\n  \n  \n  \n### Overview\n  \n| Module | Description |\n|:-------|:------------|\n| [config](http://robin.radic.nl/node-radic/Config.html) | persitent file based configuration |\n| [db](http://robin.radic.nl/node-radic/DB.html) | file based database. Uses models/schemas with validation |\n| [git](http://robin.radic.nl/node-radic/git.html) | local commands like add, commit etc. also includes API for github/bitbucket |\n| [util](http://robin.radic.nl/node-radic/util.html) | extends the core util functionality with extras |\n| [ui](http://robin.radic.nl/node-radic/ui.html) | .. |\n| [cli](http://robin.radic.nl/node-radic/cli.html) | cli commands, output, input etc |\n| [net](http://robin.radic.nl/node-radic/net.html) | network functionality, like downloading |\n| [sh](http://robin.radic.nl/node-radic/sh.html) | shell exec, execsync, execlist etc |\n| [binwraps](http://robin.radic.nl/node-radic/binwraps.html) | wraps cli commands in a nice coat. |\n| [google](http://robin.radic.nl/node-radic/google.html) | google api functions |\n  \n  \n### Basic usage\n  \n##### Config\n```javascript\nvar radic = require('radic'),\n    Config = radic.Config,\n    config = new Config('config', { /** options */ });\n    \nvar abc = config.get('a.b.c'); \nconfig.set('a.b', 'c'); \nconfig.set('a', { b: 'c' }, true); // saves the modified configuration to file\nconfig.del('a.b');\nconfig.clear();\nconfig.save(); // or this\n```\n  \n  \n##### Cli\n```javascript\n#!/usr/bin/env node\nvar radic = require('radic'),\n    cli = radic.cli;\n\ncli.command('version OR version :type')\n    .description('Shows current version')\n    .usage('radic version minor', 'shows version')\n    .method(function (cmd) {\n        cli.log.info(cli.red.bold('1.0.0'));\n    });\n    \ncli.parse(process.argv);\n```\n  \n  \n##### SH\n```javascript\nvar radic = require('radic');\nvar result;\n\n// Synchronous exec\nresult = radic.sh.execSync('apt-cache search mono | grep develop');\nconsole.log(result.code); console.log(result.stdout);\n\n// Inline scripts\n\nresult = radic.sh.inlineScript('echo \"hai\"\\n\\\necho \"bai\" \\n\\\necho \"draai\"');\nconsole.log(result.code);\nconsole.log(result.stdout);\n\nresult = radic.sh.inlineScript(function(){/*\n       echo \"hai\"\n       echo \"bai\"\n       echo \"draai\"\n       #apt-cache search mono\n*/});\nconsole.log(result.code);\nconsole.log(result.stdout);\n```\n  \n  \n##### Net\n```javascript\nvar radic = require('radic');\nradic.net.download('http://download.gigabyte.ru/driver/mb_driver_marvell_bootdisk_w7w8.exe', __dirname, { /* options */ }, function(){\n    // optional callback to make function execute asynchronously\n});\n```\n  \n  \n##### Binwraps\n```javascript\nvar radic = require('radic');    \nvar binwraps = radic.binwraps;\n\nbinwraps.createBinWrap('VBoxManage');\n     \nvar vbox = binwraps.vboxmanage;\nvar result = vbox('createvm', {\n  name: ops.name,\n  ostype: 'Debian_64',\n  basefolder: path.resolve(process.cwd()),\n  register: true\n});\nconsole.log(result.stdout, result.code);\n\n\nbinwraps.autoSyncExec = false;\nvbox('createvm', {\n  name: ops.name,\n  ostype: 'Debian_64',\n  basefolder: path.resolve(process.cwd()),\n  register: true\n}, function(){\n     // callllback\n});\n\n\nvar commands = binwraps.getCommands();\nbinwraps[ commands[0] ]('arg', { weed: 'bad' }); // just an example..\n```\n  \n  \n##### DB\nFile based database \n\n```javascript\nvar db = new require('radic').DB('myfileDB4', {\n    path: 'HOMEDIR/.radic/stores',\n    ext: '.db',\n    onLoaded: function(){}\n});\n\nvar user = db.model('user', {\n    type: 'object',\n    properties: {\n        username: { type: 'string', eq: 'ipsum' },\n        email: { type: 'string', eq: 'ipsum' },\n        password: {\n            type: 'array',\n            items: { type: 'number' }\n        }\n    }\n});\n```\n\n  \n\n### License\nCopyright 2014 Robin Radic \n\n[MIT Licensed](http://radic.mit-license.org)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinradic%2Fnode-radic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinradic%2Fnode-radic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinradic%2Fnode-radic/lists"}