{"id":13902985,"url":"https://github.com/m-sureshraj/jenni","last_synced_at":"2025-07-06T20:33:25.530Z","repository":{"id":37692717,"uuid":"176408674","full_name":"m-sureshraj/jenni","owner":"m-sureshraj","description":"👩‍💻 Jenkins Personal Assistant - CLI to interact with Jenkins server","archived":false,"fork":false,"pushed_at":"2023-01-07T04:23:41.000Z","size":7426,"stargazers_count":46,"open_issues_count":17,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-25T21:40:44.712Z","etag":null,"topics":["cli","jenkins","jenkins-cli","node-js"],"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/m-sureshraj.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":"2019-03-19T02:40:08.000Z","updated_at":"2025-03-10T19:14:09.000Z","dependencies_parsed_at":"2023-02-06T11:46:11.014Z","dependency_job_id":null,"html_url":"https://github.com/m-sureshraj/jenni","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/m-sureshraj/jenni","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-sureshraj%2Fjenni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-sureshraj%2Fjenni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-sureshraj%2Fjenni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-sureshraj%2Fjenni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-sureshraj","download_url":"https://codeload.github.com/m-sureshraj/jenni/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-sureshraj%2Fjenni/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263966169,"owners_count":23536814,"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","jenkins-cli","node-js"],"created_at":"2024-08-06T22:01:32.483Z","updated_at":"2025-07-06T20:33:25.452Z","avatar_url":"https://github.com/m-sureshraj.png","language":"JavaScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# jenni\n\n\u003e Jenkins personal assistant - CLI tool to interact with Jenkins server\n\n[![npm](https://img.shields.io/npm/v/jenni.svg)](https://www.npmjs.com/package/jenni)\n[![Build](https://github.com/m-sureshraj/jenni/actions/workflows/build.yml/badge.svg)](https://github.com/m-sureshraj/jenni/actions?query=workflow:build+branch:master)\n\n![jenni in action](https://raw.githubusercontent.com/m-sureshraj/jenni/HEAD/media/jenni-in-action.png \"jenni in action\")\n\nNote - jenni will only work inside the **git** repository\n\n## Features\n* Print Jenkins build history of a Job.\n* Show estimated remaining time for running builds.\n* Open Jenkins build in the browser.\n* Trigger new builds. (without parameters)\n* Watch the console output or stage view after triggering a build.\n* View specific build console output.\n\n## Upcoming Features\n* Trigger new builds with parameters\n* Abort running builds\n\n## Prerequisites\n- Make sure you have Node.js `\u003e= v8.11` installed.\n- Jenkins **API Token** - [How to get a Jenkins API token](https://stackoverflow.com/questions/45466090/how-to-get-the-api-token-for-jenkins)\n\n## Installation\n```\n\u003e npm i -g jenni\n```\nAbove installation will give you **globally** available `jen` command to intract with Jenkins server.\n\n### Migration from v0.2.6 to v1\nThe v1 has breaking changes. If you're using an old version of Jenni, follow the steps below before upgrading to v1.\n\n```\nstep 1: Find the config dir path\n\u003e jen c\noutput: Config path - /home/suresh/.config/jenni-nodejs/config.json\n\nstep 2: Manually delete the config directory\n\u003e rm -rf /home/suresh/.config/jenni-nodejs\n\nstep 3:\n\u003e npm update -g jenni@latest\n```\n\n## Setup\n\u003e Each git project will requires separate initialization.\n\n`jen init` will walk you through to initialize jenni to your project.\n\n![jen init](https://raw.githubusercontent.com/m-sureshraj/jenni/HEAD/media/jen-init.png \"jen init\")\n\n## Usage\n```\n\u003e jen --help\n\nUsage: jen [options] [command]\n\nJenkins personal assistant\n\nOptions:\n  -v, --version         output the version number\n  -d, --debug           Enable debug mode\n  -h, --help            output usage information\n\nCommands:\n  init|i                Initialize jen\n  status|s              Print branch build status\n  open|o                Open jenkins build in browser\n  build|b [options]     Trigger a new build\n  console|co [options]  Show console output\n  config|c [options]    Show or Update repository configuration\n```\n\n| Command\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; | Options | Description |\n| --- | --- | --- |\n| `jen init` \\| `i` | - | Initialize jenni to your project. |\n| `jen status` \\| `s` | - | Print branch build history. |\n| `jen open` \\| `o` | Optional build number \u003cbr\u003e e.g. `jen open \u003cbuild number\u003e` | Open jenkins build in the browser. |\n| `jen build` \\| `b` | `--watch` \\| `-w` \u003cbr\u003e\u003cbr\u003e Watch the console output after triggering a build. \u003cbr\u003e\u003cbr\u003e `--stage` \\| `-s` \u003cbr\u003e\u003cbr\u003e Watch the stage view after triggering a build. | Trigger a new build and optionally watch its console output or stage view. Note it's not possible to view console output, stage view together. |\n| `jen console` \\| `co` | `--build` \\| `-b` \u003cbr\u003e\u003cbr\u003e View specific build console output. \u003cbr\u003e e.g. `jen console --build \u003cbuild id\u003e` | By default, this command will print the last build console output. If the job has more than one running builds, then it will prompt the user to select a build to retrieve its console output. Use `--build` option to view the specific build console output. \u003cbr\u003e\u003cbr\u003e Refer to this [flow chart](./media/console-cmd.png) that explains console command behavior. |\n| `jen config` \\| `c` | `--username` \\| `-n` \u003cbr\u003e `--token` \\| `-t`  \u003cbr\u003e `--url` \\| `-u` \u003cbr\u003e `--job-name` \u003cbr\u003e `--job-path` \u003cbr\u003e `--job-type` \u003cbr\u003e \u003cbr\u003e e.g. Reconfigure username \u0026 token \u003cbr\u003e `jen config --username \u003cfoo\u003e --token \u003cbar\u003e` | Overwrite project jenni config. Without any options it will print current config. |\n\n## Debug\nIt's basic for the moment, pass `-d` or `--debug` to log debug messages. Can also be enabled by setting the environment variable `DEBUG_JEN` to `true`. E.g.\n\n```\n\u003e jen status -d\n\n// OR\n\n\u003e DEBUG_JEN=true jen status\n```\n## Known Limitations\n\n* At the moment Jenni handles only `WorkflowJob` and `WorkflowMultiBranchProject` job types. So, if you get the error message `Unsupported job type: \u003cjob type\u003e` please file an issue.\n\n* When initializing Jenni (`jen init`) currently there is no way to interactively select jobs inside the folders [(Issue)](https://github.com/terkelg/prompts/issues/224). As a workaround, Jenni will print jobs up to 3 levels deep. For example\n\n    ```\n    ├── folder-1\n    │   ├── folder-1.1\n    │   │   └── job3\n    │   └── job2\n    └── job1\n\n    for the above structure, the output will be:\n\n    job1\n    folder-1 → job2\n    folder-1 → folder-1.1 - job3\n    ```\n    So if your job is deeply nested, you should manually configure the job. [Follow this guide](JOB_CONFIGURATION.md).\n\n## Feedback\nI'm no expert Jenkins user 🤫. I'm building this tool while learning Jenkins concepts. I'm really interested in hearing your use cases, insights, and suggestions for improvements.\n\n## Similar Projects\nThere're a few similar project you can found below:\n* [jenkins-cli](https://github.com/jenkins-zh/jenkins-cli)\n\n## license\nMIT © [Sureshraj](https://github.com/m-sureshraj)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-sureshraj%2Fjenni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-sureshraj%2Fjenni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-sureshraj%2Fjenni/lists"}