{"id":16111791,"url":"https://github.com/cliffano/nestor","last_synced_at":"2025-04-09T09:04:47.578Z","repository":{"id":57310201,"uuid":"2036115","full_name":"cliffano/nestor","owner":"cliffano","description":"Jenkins CLI and node.js client","archived":false,"fork":false,"pushed_at":"2022-10-11T09:31:43.000Z","size":1424,"stargazers_count":180,"open_issues_count":5,"forks_count":27,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-02T08:10:35.219Z","etag":null,"topics":["cli","jenkins","nodejs"],"latest_commit_sha":null,"homepage":"http://blog.cliffano.com/tag/nestor/","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/cliffano.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":"2011-07-12T13:22:57.000Z","updated_at":"2024-11-16T07:54:23.000Z","dependencies_parsed_at":"2022-09-07T23:40:57.167Z","dependency_job_id":null,"html_url":"https://github.com/cliffano/nestor","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fnestor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fnestor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fnestor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fnestor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cliffano","download_url":"https://codeload.github.com/cliffano/nestor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"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":["cli","jenkins","nodejs"],"created_at":"2024-10-09T19:45:32.674Z","updated_at":"2025-04-09T09:04:47.560Z","avatar_url":"https://github.com/cliffano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"right\" src=\"https://raw.github.com/cliffano/nestor/master/avatar.jpg\" alt=\"Avatar\"/\u003e\n\n[![Build Status](https://img.shields.io/travis/cliffano/nestor.svg)](http://travis-ci.org/cliffano/nestor)\n[![Dependencies Status](https://img.shields.io/david/cliffano/nestor.svg)](http://david-dm.org/cliffano/nestor)\n[![Coverage Status](https://img.shields.io/coveralls/cliffano/nestor.svg)](https://coveralls.io/r/cliffano/nestor?branch=master)\n[![Published Version](https://img.shields.io/npm/v/nestor.svg)](http://www.npmjs.com/package/nestor)\n\u003cbr/\u003e\n[![npm Badge](https://nodei.co/npm/nestor.png)](http://npmjs.org/package/nestor)\n\nNestor\n------\n\nNestor is a [Jenkins](http://jenkins-ci.org) CLI and node.js client.\n\nThis is handy for Jenkins users who prefer to touch type on the command line over GUI and mouse clicks on the browser. It also serves as an alternative to Jenkins Java CLI where Nestor has shorter commands and executes faster.\n\n![console command screenshot](https://raw.github.com/cliffano/nestor/master/screenshots/console.png)\n\nInstallation\n------------\n\n    npm install -g nestor\n\nUsage\n-----\n\nTrigger a build:\n\n    nestor build \u003cjob\u003e\n\nTrigger a parameterised build:\n\n    nestor build \u003cjob\u003e [\"param1=value1\u0026param2=value2\"]\n\nTrigger a build followed by console output:\n\n    nestor build --console \u003cjob\u003e\n\nTrigger a build, wait for 5 seconds, then display console output:\n\n    nestor build --pending 5000 --console \u003cjob\u003e\n\nTrigger a parameterised build followed by console output:\n\n    nestor build \u003cjob\u003e [\"param1=value1\u0026param2=value2\"] --console\n\nDisplay latest build console output:\n\n    nestor console \u003cjob\u003e\n\nDisplay console output of a particular build number:\n\n    nestor console \u003cjob\u003e [build_number]\n\nStop currently running build:\n\n    nestor stop \u003cjob\u003e\n\nView status of all jobs:\n\n    nestor dashboard\n\nView job status reports:\n\n    nestor job \u003cjob\u003e\n\nEnable a job:\n\n    nestor enable \u003cjob\u003e\n\nDisable a job:\n\n    nestor disable \u003cjob\u003e\n\nCreate a new job with a specified config.xml:\n\n    nestor create \u003cjob\u003e \u003cpath/to/config.xml\u003e\n\nUpdate an existing job with a specified config.xml:\n\n    nestor update \u003cjob\u003e \u003cpath/to/config.xml\u003e\n\nCopy an existing job1 to a new job2:\n\n    nestor copy \u003cjob1\u003e \u003cjob2\u003e\n\nDelete an existing job:\n\n    nestor delete \u003cjob\u003e\n\nFetch the config.xml of an existing job: (experimental)\n\n    nestor config \u003cjob\u003e\n\nCreate a new view with a specified config.xml: (experimental)\n\n    nestor create-view \u003cview\u003e \u003cpath/to/config.xml\u003e\n\nUpdate an existing view with a specified config.xml: (experimental)\n\n    nestor update-view \u003cview\u003e \u003cpath/to/config.xml\u003e\n\nFetch the config.xml of an existing view: (experimental)\n\n    nestor fetch-view-config \u003cview\u003e\n\nView queued jobs:\n\n    nestor queue\n\nView executors' status (running builds):\n\n    nestor executor\n\nDiscover Jenkins instance running on a specified host:\n\n    nestor discover \u003chost\u003e\n\nView Jenkins version number:\n\n    nestor ver\n\nView builds feed of all jobs:\n\n    nestor feed\n\nView builds feed of a job:\n\n    nestor --job \u003cjob\u003e feed\n\nMonitor build status and notify Ninja Blocks RGB LED device:\n\n    export NINJABLOCKS_TOKEN=\u003ctoken_from_https://a.ninja.is/hacking\u003e\n    nestor ninja\n\nNote: `\u003cjob\u003e` in the examples is a part of your Jenkins job URL after the first `job/`.\n\nFor example, if you use nested folders on Jenkins and your URL is `/job/myproject/job/releases/job/master`,\nthen you should pass `myproject/job/releases/job/master` as `\u003cjob\u003e`.\n\nProgrammatically:\n\n    var nestor = new (require('nestor'))(\n      'http://user:pass@host:port/path'\n    );\n\n    // trigger a standard build\n    nestor.buildJob('job', '', function (err, result) {\n    });\n\n    // trigger a parameterised build\n    nestor.buildJob('job', 'param1=value1\u0026param2=value2', function (err, result) {\n    });\n\nCheck out [lib/jenkins](https://github.com/cliffano/nestor/blob/master/lib/jenkins.js) for other available methods.\n\nNOTE: Starting from version 2.0.0, Nestor started using [Swaggy Jenkins](https://github.com/cliffano/swaggy-jenkins) as an API client. You can still use Nestor programmatically, but it's much better and cleaner if you use Swaggy Jenkins instead.\n\nConfiguration\n-------------\n### Jenkins URL\n\nSet Jenkins URL in JENKINS_URL environment variable (defaults to http://localhost:8080):\n\n(*nix)\n\n    export JENKINS_URL=http://user:pass@host:port/path\n\n(Windows)\n\n    set JENKINS_URL=http://user:pass@host:port/path\n\nAs an alternative to password, you can use Jenkins API token instead. Jenkins API token can be found on Jenkins user configuration page.\n\nIf http_proxy or https_proxy environment variable is set, then Nestor will automatically use it.\n\nIf you want authentication details to be prompted interactively:\n\n    JENKINS_URL=http://host:port/path nestor --interactive build job\n\nJenkins URL can also be specified as an arg:\n\n    nestor --url http://user:pass@host:port/path dashboard\n\n### SSL client certificate authentication\n\nSet JENKINS_CERT and JENKINS_KEY\n\n(*nix)\n\n    export JENKINS_CERT=certificate.pem\n    export JENKINS_KEY=key.pem\n\n(Windows)\n\n    set JENKINS_CERT=certificate.pem\n    set JENKINS_KEY=key.pem\n\nWhen you have both key and certificate in one file, currently you have to set both ENV variables to the same file\n\n(*nix)\n\n    export JENKINS_CERT=combined.pem\n    export JENKINS_KEY=combined.pem\n\n(Windows)\n\n    set JENKINS_CERT=combined.pem\n    set JENKINS_KEY=combined.pem\n\nIt is possible to specify a custom CA. Just set the JENKINS_CA env variable\n\n(*nix)\n\n    export JENKINS_CA=custom.ca.pem\n\n(Windows)\n\n    set JENKINS_CA=custom.ca.pem\n\nTranslation\n-----------\n\nTo add a new language translation:\n\n1. Create a locale JSON file in conf/locales/ directory, with the locale's [ISO 639-1 code](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) as file name.\n2. Copy paste the content of the existing non-English locale file (anything other than en.json) and modify the translation values accordingly.\n3. Test by executing a command with LANG environment variable, e.g. `LANG=\u003ccode\u003e nestor dashboard`\n\nContribution\n------------\n\nWhen opening an issue to report a bug, please provide the following information:\n\n* node.js version: `node --version`\n* npm version: `npm --version`\n* Nestor version: `nestor --version`\n* Jenkins version: `nestor ver`\n\nThanks in advance for reporting an issue, opening a feature request, or even better, a pull request!\n\nColophon\n--------\n\n[Developer's Guide](https://cliffano.github.io/developers_guide.html#nodejs)\n\nBuild reports:\n\n* [Code complexity report](https://cliffano.github.io/nestor/complexity/plato/index.html)\n* [Unit tests report](https://cliffano.github.io/nestor/test/buster.out)\n* [Test coverage report](https://cliffano.github.io/nestor/coverage/buster-istanbul/lcov-report/lib/index.html)\n* [Integration tests report](https://cliffano.github.io/nestor/test-integration/cmdt.out)\n* [API Documentation](https://cliffano.github.io/nestor/doc/dox-foundation/index.html)\n\nArticles:\n\n* [Nestor – A Faster And Simpler CLI For Jenkins](http://blog.cliffano.com/2011/10/22/nestor-a-faster-and-simpler-cli-for-jenkins/)\n* [Monitor Jenkins From The Terminal](http://blog.cliffano.com/2013/09/13/monitor-jenkins-from-the-terminal/)\n* [Using Node.js To Discover Jenkins On The Network](http://blog.cliffano.com/2011/08/04/using-nodejs-to-discover-jenkins-on-the-network/)\n\nVideos:\n\n* [Jenkins World 2017: Bringing Jenkins Remote Access API To The Masses](https://www.youtube.com/watch?v=D93t1jElt4Q)\n* [Evolution of nestor (Gource Vizualisation)](https://www.youtube.com/watch?v=omwXDBnjp5A) by Landon Wilkins\n\nPresentations:\n\n* [Bringing Jenkins Remote Access API To The Masses](https://www.slideshare.net/cliffano/bringing-jenkins-remote-access-api-to-the-masses)\n\nRelated Projects:\n\n* [nestor-buildlight](http://github.com/cliffano/nestor-buildlight) - CLI for Jenkins build light notifier\n* [nestor-lifx](http://github.com/cliffano/nestor-lifx) - CLI for Jenkins LIFX notifier\n* [nestor-ninjablocks](http://github.com/cliffano/nestor-ninjablocks) - CLI for Jenkins Ninja Blocks notifier\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcliffano%2Fnestor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcliffano%2Fnestor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcliffano%2Fnestor/lists"}